/* telephony-csp.css — Telnyx-telefoni for psykologki.
   Portert fra fastlege-prod: telefoni-stilene lå der i css-bundelen (telephony-csp-
   seksjonen + Telefonbok/pb-* + «Ring ut»-seksjonene + Ring ut-redesign + in-call
   lyd-bytte). Her samlet i én fil som lastes via egen <link> i index.html.
   CSP: ingen inline styles tillatt — alt her som egne klasser. */

/* telephony-csp.css
   Stiler for Telnyx-telefoni (testfrontend kiverktoytlf).
   CSP: ingen inline styles tillatt — alt her som egne klasser.
   Gjenbruker app-ens .modal / .modal-content / .button der det går. */

/* ---- Modaler (ringemodal + sett-opp-modal) ---- */
.tlf-modal-content { max-width: 560px; }

.tlf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 20px;
}

.tlf-from {
    font-size: 14px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
}
.tlf-from strong { color: #0f172a; }

.tlf-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.tlf-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.tlf-input { flex: 1; font-size: 18px; letter-spacing: 0.5px; }

.tlf-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    min-height: 16px;
}
.tlf-hint-ok  { color: #15803d; font-weight: 600; }
.tlf-hint-err { color: #b91c1c; font-weight: 600; }

.tlf-muted { color: #64748b; font-size: 13px; }

.tlf-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 10px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 12.5px;
    color: #1e40af;
}
.tlf-consent .material-icons { font-size: 18px; }

/* ---- In-call-panel (fast kort nederst til høyre) ---- */
.tlf-incall {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    width: 300px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    padding: 14px 16px;
    font-family: inherit;
}

.tlf-incall-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.tlf-incall-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tlf-incall-dot.ringing { background: #f59e0b; animation: tlf-pulse 1s infinite; }
.tlf-incall-dot.live    { background: #22c55e; }
@keyframes tlf-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.tlf-incall-status { font-weight: 600; font-size: 14px; color: #0f172a; }
.tlf-incall-timer {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    color: #475569;
}
.tlf-timer-warn { color: #b91c1c; font-weight: 700; }

.tlf-incall-dest {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.tlf-incall-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tlf-incall-actions .button { flex: 1; justify-content: center; }

/* Lyd-element for pasientens stemme holdes usynlig (men ikke display:none —
   noen nettlesere pauser autoplay-audio i skjulte elementer). */
.tlf-remote-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---- Innstillinger -> Telefoni-fane ---- */
.tlf-set { padding: 4px 2px; max-width: 560px; }
.tlf-set-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 12px;
}
.tlf-set-title-sub { font-size: 14px; margin-top: 20px; }
.tlf-set-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 10px 0;
}
.tlf-set-numrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tlf-set-num { font-size: 20px; font-weight: 700; color: #0f172a; letter-spacing: 0.5px; }
.tlf-set-row { display: flex; gap: 18px; margin: 12px 0; flex-wrap: wrap; }
.tlf-radio { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #334155; cursor: pointer; }

.tlf-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tlf-badge.ok   { background: #dcfce7; color: #15803d; }
.tlf-badge.warn { background: #fef3c7; color: #92400e; }

.tlf-members { margin: 8px 0 4px; }
.tlf-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.tlf-member .tlf-muted { font-weight: 400; margin-left: 6px; }

.tlf-actions-left { justify-content: flex-start; padding: 12px 0 0; }
.tlf-danger-zone { margin-top: 18px; border-top: 1px dashed #fecaca; padding-top: 14px; }
.tlf-mt { margin-top: 14px; }

/* App-ens .button.danger finnes ikke nødvendigvis — definer en trygg variant */
.button.danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.button.danger:hover:not(:disabled) { background: #dc2626; }

/* ---- Forbruksmodal: telefonsamtale-detaljer ---- */
.udb-tlf-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.udb-tlf-status.ok    { background: #dcfce7; color: #15803d; }
.udb-tlf-status.warn  { background: #fef3c7; color: #92400e; }
.udb-tlf-status.muted { background: #f1f5f9; color: #64748b; }

/* =============================================================================
   AI-SAMARBEID: tenker-indikator + polering (2026-06-10)
   CSP: kun klasser — ingen inline styles. Matcher eksisterende tokens
   (blågradient #2563eb→#3b82f6, 12px radius, var(--text-primary)).
   ============================================================================= */

/* «KI-en skriver …»-boble (brukes i både Samarbeid-fanen og juster-modalen) */
.ai-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.ai-typing-label {
  font-size: 0.875rem;
  color: #64748b;
}

.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  animation: aiTypingPulse 1.2s ease-in-out infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes aiTypingPulse {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35%           { opacity: 1;    transform: translateY(-3px); }
}

/* Myk inntreden for nye chat-meldinger */
.ai-message,
.customize-chat-message {
  animation: aiMsgIn 0.22s ease;
}

@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Tidsstempel i chatbobler (erstatter tidligere inline style — CSP) */
.ai-message-time {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* Dempet variant av velkomstikonet i preview-panelet (erstatter inline style) */
.ai-welcome-icon.is-muted {
  background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
}

.ai-welcome-icon.is-muted .material-icons {
  color: #94a3b8;
}

.ai-welcome-title-muted {
  color: #475569;
}

/* Feilboble i juster-modalens chat (gjenbruker ai-error-bubble-uttrykket) */
.customize-chat-bubble.ai-error-bubble {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

@media (prefers-reduced-motion: reduce) {
  .ai-message,
  .customize-chat-message { animation: none; }
  .ai-typing-dots span { animation: none; opacity: 0.6; }
}

/* =============================================================================
   COMPLIANCE COACH — «Samsvar»-medspilleren (2026-06-10)
   Lokal lint-hint, spilleregler-boks, kvalitetsstempel og bibliotek-badge.
   CSP: kun klasser. Palett/radier matcher eksisterende compliance-UI.
   ============================================================================= */

/* ---- Spilleregler-boksen («Dette ligger alltid i bunn») ---- */
.cc-rules {
  margin: 0 0 1rem 0;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  overflow: hidden;
}

.cc-rules-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e40af;
  user-select: none;
}

.cc-rules-summary::-webkit-details-marker { display: none; }

.cc-rules-summary .material-icons {
  font-size: 1.1rem;
  color: #2563eb;
}

.cc-rules-chevron {
  margin-left: auto;
  transition: transform 0.18s ease;
}

.cc-rules[open] .cc-rules-chevron { transform: rotate(180deg); }

.cc-rules-list {
  margin: 0;
  padding: 0 1rem 0.5rem 2.4rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.55;
}

.cc-rules-list li { margin-bottom: 0.3rem; }

.cc-rules-foot {
  margin: 0;
  padding: 0.4rem 1rem 0.75rem 2.4rem;
  font-size: 0.78rem;
  color: #64748b;
}

/* ---- Lint-hint (gule veiledningskort under tekstfeltet) ---- */
.cc-lint-panel { margin-top: 0.5rem; }
.cc-lint-panel.cc-lint-empty { display: none; }

.cc-lint-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.4rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #78350f;
  line-height: 1.45;
  animation: ccHintIn 0.2s ease;
}

@keyframes ccHintIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.cc-lint-hint .material-icons {
  font-size: 1.05rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 1px;
}

.cc-lint-hint-body { flex: 1; }

.cc-lint-match { font-weight: 600; }

.cc-lint-fix-preview {
  display: block;
  margin-top: 0.2rem;
  color: #92400e;
  font-style: italic;
}

.cc-lint-fix-btn {
  flex-shrink: 0;
  align-self: center;
  border: 1px solid #d97706;
  background: #ffffff;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cc-lint-fix-btn:hover {
  background: #d97706;
  color: #ffffff;
}

/* ---- Grønne kvalitetssignaler (grunnstammen) ---- */
.cc-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.cc-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.cc-signal .material-icons { font-size: 0.9rem; }

/* ---- Kvalitetsstempelet (godkjent-tilstanden) ---- */
.cc-stamp-in {
  animation: ccStampIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes ccStampIn {
  0%   { opacity: 0; transform: scale(0.92); }
  60%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---- Bibliotek-badge: ✓ Samsvarssjekket ---- */
.cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  white-space: nowrap;
}

.cc-badge .material-icons { font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  .cc-lint-hint { animation: none; }
  .cc-stamp-in { animation: none; }
  .cc-rules-chevron { transition: none; }
}
/* ===== Telefonbok (pb-*) — CSP-trygt, lagt direkte i bundle.css ===== */
.pb-modal-content { max-width: 540px; }
.pb-body { display: flex; flex-direction: column; gap: 12px; }
.pb-search { width: 100%; font-size: 15px; }
.pb-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 2px; }
.pb-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    color: #64748b; font-size: 14px; padding: 28px 16px; }
.pb-empty .material-icons { font-size: 40px; color: #cbd5e1; }
.pb-cat { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.pb-cat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f8fafc;
    border-bottom: 1px solid #eef2f7; }
.pb-cat-ic { color: #2563eb; font-size: 20px; }
.pb-cat-name { font-weight: 700; color: #0f172a; font-size: 14.5px; }
.pb-cat-count { font-size: 12px; font-weight: 700; color: #64748b; background: #e2e8f0;
    border-radius: 999px; padding: 1px 9px; }
.pb-cat-head .pb-icon-btn { margin-left: 0; }
.pb-cat-head .pb-icon-btn:first-of-type { margin-left: auto; }
.pb-entries { display: flex; flex-direction: column; }
.pb-entry { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.pb-entry:last-child { border-bottom: none; }
.pb-entry-main { flex: 1; min-width: 0; }
.pb-entry-label { font-weight: 600; color: #0f172a; font-size: 14px; }
.pb-entry-num { font-size: 13px; color: #475569; font-variant-numeric: tabular-nums; }
.pb-entry-dtmf { color: #2563eb; font-weight: 600; }
.pb-entry-note { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.pb-entry-empty { font-size: 12.5px; color: #94a3b8; padding: 10px 12px; }
.pb-entry-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pb-ring .material-icons { font-size: 16px; }
.pb-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; cursor: pointer; color: #475569; padding: 0; }
.pb-icon-btn:hover { background: #f1f5f9; color: #0f172a; }
.pb-icon-btn .material-icons { font-size: 18px; }
.pb-icon-btn.pb-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.pb-actions { align-items: center; }
.pb-spacer { flex: 1; }
.pb-hidden { display: none !important; }
.pb-note { resize: vertical; min-height: 44px; font-family: inherit; }

.tlf-pb-row { margin-top: 14px; }

/* ===== «Ring ut»: type-valg (Pasient/Annet) + transkripsjon-switch ===== */
.tlf-type-row { display: flex; gap: 8px; margin-bottom: 12px; }
.tlf-type-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 10px; border: 1.5px solid #e2e8f0; background: #fff; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: #475569; cursor: pointer; }
.tlf-type-btn .material-icons { font-size: 18px; }
.tlf-type-btn.is-active { border-color: #2563eb; background: #eff6ff; color: #1e40af; }
.tlf-trans-row { margin-bottom: 14px; }
.tlf-trans-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #475569;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.tlf-trans-note .material-icons { font-size: 17px; color: #64748b; flex-shrink: 0; }
.tlf-trans-on { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.tlf-trans-on .material-icons { color: #2563eb; }
.tlf-trans-kons { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.tlf-trans-kons .material-icons { color: #ef4444; font-size: 14px; }

/* Live-dialog i in-call-panelet: mørk boks med siste ytringer, farget pr. taler. */
.tlf-dlg { margin-top: 8px; max-height: 132px; overflow-y: auto; background: #0f172a;
    border: 1px solid #1e293b; border-radius: 10px; padding: 8px 10px;
    font-size: 12px; line-height: 1.45; color: #e2e8f0; }
.tlf-dlg-line { margin: 0 0 4px; word-break: break-word; }
.tlf-dlg-line:last-child { margin-bottom: 0; }
.tlf-dlg-who { font-weight: 700; }
.tlf-dlg-who.tlf-dlg-lege { color: #4ade80; }
.tlf-dlg-who.tlf-dlg-motpart { color: #7dd3fc; }
.tlf-dlg-partial { opacity: 0.55; font-style: italic; }
.tlf-dlg-empty { color: #64748b; font-style: italic; }

.tlf-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.tlf-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tlf-switch-track { position: relative; width: 42px; height: 24px; background: #cbd5e1; border-radius: 999px;
    transition: background .15s; flex-shrink: 0; }
.tlf-switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff;
    border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.tlf-switch input:checked + .tlf-switch-track { background: #2563eb; }
.tlf-switch input:checked + .tlf-switch-track .tlf-switch-thumb { left: 21px; }
.tlf-switch-label { font-size: 14px; font-weight: 600; color: #334155; }

/* ===== Telefonnotat (ekstern) — kopierings-modal ===== */
.tlf-tag-ekstern { display: inline-block; font-size: 11px; font-weight: 800; color: #fff; background: #475569;
    border-radius: 6px; padding: 2px 8px; margin-right: 6px; vertical-align: middle; }
.tlf-ekstern-note { width: 100%; font-family: inherit; font-size: 14px; line-height: 1.5; resize: vertical; min-height: 120px; }
.tlf-actions-inline { display: flex; gap: 8px; margin-top: 10px; }
.tlf-ekstern-trans { margin-top: 14px; }
.tlf-ekstern-trans summary { cursor: pointer; font-size: 13px; color: #2563eb; font-weight: 600; }
.tlf-ekstern-pre { margin-top: 8px; max-height: 180px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
    font-size: 12.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; }

/* ===== Telefoni-modaler: robust størrelse (ID-spesifikt) ===== */
#tlfPhonebookModal .modal-content { max-width: 620px; width: min(620px, calc(100vw - 32px)); }
#tlfPhonebookModal .pb-list { min-height: 240px; }
#tlfPbEntryModal .modal-content,
#tlfPbCatModal .modal-content { max-width: 520px; width: min(520px, calc(100vw - 32px)); }
#tlfEksternNoteModal .modal-content { max-width: 600px; width: min(600px, calc(100vw - 32px)); }
#tlfDialModal .modal-content { max-width: 600px; width: min(600px, calc(100vw - 32px)); }

/* ===== «Ring ut»-modal: luftigere og penere (scopet til #tlfDialModal) ===== */
#tlfDialModal .modal-body { padding: 22px 26px 24px; }
#tlfDialModal .tlf-from { margin-bottom: 10px; }
#tlfDialModal .tlf-price { margin-bottom: 18px; font-size: 12.5px; }
#tlfDialModal .tlf-type-row { gap: 10px; margin-bottom: 16px; }
#tlfDialModal .tlf-type-btn { padding: 12px 12px; border-radius: 12px;
    transition: border-color .15s ease, background .15s ease, color .15s ease; }
#tlfDialModal .tlf-type-btn:hover:not(.is-active) { border-color: #cbd5e1; background: #f8fafc; }
#tlfDialModal .tlf-input { padding: 11px 12px; }
#tlfDialModal .tlf-pb-row { margin-top: 16px; }
/* Lyd-enheter som egne, tydelige kort med mer pust */
#tlfDialModal .tlf-mic-row { margin-top: 10px; padding: 11px 13px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
#tlfDialModal #tlfMicRow { margin-top: 20px; }
#tlfDialModal .tlf-consent { margin-top: 20px; }
.tlf-pb-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Telefonbok: garantert romslig (ID slår klasse, også i media-query) */
#tlfPhonebookModal .modal-content { max-width: 640px; width: min(640px, calc(100vw - 24px)); }
#tlfPhonebookModal .pb-body { min-height: 340px; }
#tlfPhonebookModal .pb-list { min-height: 260px; max-height: 56vh; }

/* ===== «Ring ut»: typeahead-dropdown (søk i telefonbok fra nummerfeltet) ===== */
.tlf-search-drop { border: 1px solid #e2e8f0; border-radius: 10px; margin-top: 6px;
    max-height: 240px; overflow-y: auto; box-shadow: 0 6px 18px rgba(15,23,42,.10); }
.tlf-search-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
    border-bottom: 1px solid #f1f5f9; }
.tlf-search-item:last-child { border-bottom: none; }
.tlf-search-item:hover { background: #eff6ff; }
.tlf-search-main { flex: 1; min-width: 0; }
.tlf-search-label { font-weight: 600; color: #0f172a; font-size: 14px; }
.tlf-search-meta { font-size: 12.5px; color: #64748b; }
.tlf-search-dtmf { font-size: 12px; color: #2563eb; font-weight: 600; flex-shrink: 0; }

/* ===== Telefonbok: import-forhåndsvisning (remapping) ===== */
#tlfPbImportModal .modal-content { max-width: 560px; width: min(560px, calc(100vw - 24px)); }
.pb-actions { flex-wrap: wrap; }
.pb-import-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.pb-import-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px; }
.pb-import-info { flex: 1; min-width: 0; }
.pb-import-name { font-weight: 600; color: #0f172a; font-size: 14px; }
.pb-import-count { font-size: 12px; color: #64748b; }
.pb-import-sel { flex-shrink: 0; max-width: 220px; }

/* ===== Mic-/headset-velger i «Ring ut» ===== */
.tlf-mic-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tlf-mic-row .material-icons { font-size: 19px; color: #64748b; flex-shrink: 0; }
.tlf-mic-label { font-size: 13px; font-weight: 600; color: #334155; flex-shrink: 0; }
.tlf-mic-select { flex: 1; font-size: 13px; min-width: 0; }

/* ===== DTMF-tastatur i in-call-panelet ===== */
.tlf-dialpad { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.tlf-dtmf-seq { width: 100%; justify-content: center; margin-bottom: 8px; }
.tlf-dialpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tlf-dtmf-key { font-size: 18px; font-weight: 700; color: #0f172a; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 0; cursor: pointer;
    transition: background .08s, transform .08s; }
.tlf-dtmf-key:hover { background: #eef2f7; }
.tlf-dtmf-key.is-pressed { background: #2563eb; color: #fff; transform: scale(0.94); }

.tlf-mic-reveal { flex-shrink: 0; }

/* ===== «Ring ut»: enhetstest — live mic-nivåstripe + høyttaler-pling ===== */
#tlfDialModal .tlf-mic-row { flex-wrap: wrap; }
.tlf-devtest { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 9px; min-width: 0; }
.tlf-meter { flex: 0 0 150px; height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.tlf-meter-fill { height: 100%; width: 0%; border-radius: 999px;
    background: linear-gradient(90deg, #6ee7b7, #10b981 55%, #059669); }
.tlf-devtest-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
    color: #94a3b8; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlf-devtest-hint .material-icons { font-size: 15px; flex-shrink: 0; }
.tlf-devtest-hint.is-ok { color: #059669; font-weight: 700; }
.tlf-devtest-hint.is-err { color: #b45309; font-weight: 600; }
.tlf-spk-test { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; }
.tlf-spk-test .material-icons { font-size: 16px; }
.tlf-spk-test.is-playing { color: #2563eb; border-color: #93c5fd; background: #eff6ff; }
.tlf-spk-test.is-playing .material-icons { animation: tlfPlingWiggle .45s ease-in-out 2; }
@keyframes tlfPlingWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-13deg); } 75% { transform: rotate(13deg); } }

/* ===== Telefonkonsultasjon-banner (pasient-samtale transkriberer til åpen konsultasjon) ===== */
.tlf-kons-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
    padding: 11px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; }
.tlf-kons-banner-ikon { color: #2563eb; font-size: 22px; flex-shrink: 0;
    animation: tlfKonsPulse 2.2s ease-in-out infinite; }
.tlf-kons-banner-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: #1e40af; }
.tlf-kons-banner-text strong { color: #1e3a8a; }
.tlf-kons-banner .button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
    background: #fff; border-color: #bfdbfe; color: #1d4ed8; }
.tlf-kons-banner .button:hover { background: #dbeafe; }
.tlf-kons-banner .button .material-icons { font-size: 16px; }
@keyframes tlfKonsPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ===== Ring ut-redesign — seksjonslabels, konsekvens-bokser, tidslinje, lyd-modus ===== */
.tlf-section-lbl { font-size: 13px; font-weight: 600; color: #37474f; margin: 14px 0 8px; }
#tlfDialModal .tlf-section-lbl:first-of-type { margin-top: 6px; }

.tlf-conseq { border-radius: 14px; padding: 18px 18px 16px; margin-bottom: 14px; border: 1px solid; }
.tlf-conseq-annet { background: #f1faf3; border-color: #c2e7cc; }
.tlf-conseq-ttl { display: flex; align-items: flex-start; gap: 10px; font-weight: 800; font-size: 16px; line-height: 1.25; }
.tlf-conseq-ttl .material-icons { font-size: 26px; margin-top: 1px; }
.tlf-conseq-annet .tlf-conseq-ttl { color: #256e3a; }
.tlf-conseq-annet .tlf-conseq-ttl .material-icons { color: #2e9e54; }
.tlf-conseq-why { font-size: 13.5px; line-height: 1.45; margin: 4px 0 12px; padding-left: 36px; }
.tlf-conseq-annet .tlf-conseq-why { color: #3f6b4c; }
.tlf-tl { display: grid; grid-template-columns: 128px 1fr; gap: 8px 10px; align-items: center; }
.tlf-tl-lab { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 12.5px; font-weight: 700; color: #475569; }
.tlf-tl-lab .material-icons { font-size: 17px; color: #94a3b8; }
.tlf-tl-track { height: 30px; border-radius: 7px; display: flex; overflow: hidden; background: #eef2f6; }
.tlf-tl-track > div { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tlf-tl-track > div .material-icons { font-size: 14px; }
.tlf-tl-on { background: #22a06b; color: #fff; }
.tlf-tl-on .material-icons { font-size: 11px; }
.tlf-tl-pause { background: repeating-linear-gradient(45deg, #fde2a7, #fde2a7 6px, #fff5dd 6px, #fff5dd 12px); color: #9a6a00; }
.tlf-tl-off { background: #dbe2e8; color: #90a0ad; }
.tlf-tl-call { background: #1f6feb; color: #fff; }
.tlf-tl-phases { display: flex; justify-content: space-between; font-size: 11.5px; color: #94a3b8; padding: 0 4px; }
.tlf-fl1 { flex: 1; }
.tlf-fl2 { flex: 2; }
.tlf-fl3 { flex: 3; }
.tlf-out { margin-top: 15px; padding-top: 14px; border-top: 1px dashed; }
.tlf-conseq-annet .tlf-out { border-top-color: #cfe9d6; }
.tlf-out-lab { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.tlf-out-lab .material-icons { font-size: 18px; }
.tlf-conseq-annet .tlf-out-lab { color: #3f6b4c; }
.tlf-conseq-annet .tlf-out-lab .material-icons { color: #2e9e54; }
.tlf-out-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tlf-doc { display: flex; gap: 9px; align-items: flex-start; background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; padding: 11px 12px; }
.tlf-doc > div { min-width: 0; }
.tlf-doc .material-icons { font-size: 20px; margin-top: 1px; }
.tlf-doc b { display: block; font-size: 13px; color: #1f2937; }
.tlf-doc span { display: block; font-size: 11.5px; color: #64748b; line-height: 1.35; margin-top: 2px; }
.tlf-doc-journal { border-left: 4px solid #22a06b; }
.tlf-doc-journal .material-icons { color: #22a06b; }
.tlf-doc-none { border-left: 4px solid #b6c2cc; }
.tlf-doc-none .material-icons { color: #94a3b8; }
.tlf-doc-none b { color: #64748b; }
@media (max-width: 560px) {
  .tlf-tl { grid-template-columns: 96px 1fr; }
  .tlf-tl-lab { font-size: 11.5px; }
  .tlf-out-cards { grid-template-columns: 1fr; }
}

.tlf-lyd-modus { display: flex; gap: 10px; margin-bottom: 10px; }
.tlf-lyd-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 8px; border: 1.5px solid #e2e8f0; background: #fff; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #475569; cursor: pointer;
}
.tlf-lyd-btn .material-icons { font-size: 18px; }
.tlf-lyd-btn.is-active { border-color: #1976d2; background: #e3f2fd; color: #0d47a1; }
.tlf-lyd-btn.is-active .material-icons { color: #1976d2; }

/* ===== In-call lyd-bytte (headset/høyttaler under samtale) ===== */
.tlf-incall-lyd { display: flex; gap: 8px; margin: 8px 0 2px; }
.tlf-incall-lyd .tlf-incall-lydbtn { flex: 1; }
