/* Online consultations: booking choice, online booking times, the patient's consultation page, the video call
   and the staff panels. Calm: neutral surfaces, one brand colour for the current choice and the main action. */

/* ---------- booking: in the clinic / online ---------- */
.tele-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; max-width: 560px; }
.tele-mode-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.tele-mode-opt > span { display: flex; flex-direction: column; min-width: 0; }
.tele-mode-opt .icon { color: var(--text-muted); flex: none; }
.tele-mode-opt:hover { border-color: var(--text-subtle); }
.tele-mode-opt.is-active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.tele-mode-opt.is-active .icon { color: var(--primary); }
.tele-mode-opt:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (max-width: 480px) { .tele-mode-opt { padding: 10px 12px; gap: 8px; } .tele-mode-opt .tiny { display: none; } }

/* ---------- booking: times in the patient's zone + the clinic's ---------- */
.tele-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tele-chip { position: relative; cursor: pointer; }
.tele-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tele-chip > span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; padding: 6px 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); line-height: 1.25; transition: border-color .15s; }
.tele-chip strong { font-size: 15px; }
.tele-chip small { font-size: 11px; color: var(--text-muted); }
.tele-chip em { font-style: normal; font-size: 10px; color: var(--text-subtle); }
.tele-chip:hover > span { border-color: var(--primary); }
.tele-chip input:checked + span { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.tele-chip input:checked + span strong { color: var(--primary); }
.tele-chip input:focus-visible + span { box-shadow: var(--focus-ring); }

.tele-phone { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
.tele-file { padding: 8px; height: auto; }
.tele-note { display: flex; gap: 10px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--border); }
.tele-note .icon { color: var(--text-muted); flex: none; margin-top: 2px; }
.tele-pre { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- clinic page ---------- */
.tele-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; }
.tele-banner:hover { border-color: var(--border-strong); }
.tele-banner .grow { display: flex; flex-direction: column; min-width: 0; }
.tele-banner-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--surface-sunken); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
@media (max-width: 600px) { .tele-banner { flex-wrap: wrap; } .tele-banner .btn { width: 100%; justify-content: center; } }
.doc-online { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-muted); text-decoration: none; }
.doc-online:hover { color: var(--primary); }

/* ---------- the patient's consultation page ---------- */
.tele-page { max-width: 880px; padding-top: 28px; padding-bottom: 72px; }
.tele-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; min-width: 0; }
.tele-h1 { font-size: clamp(22px, 3vw, 30px); font-weight: var(--fw-heavy); margin: 14px 0 4px; }
.tele-h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.tele-h2 .icon { color: var(--text-muted); }
.tele-when { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.tele-when > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tele-when-main { font-size: 17px; }
.tele-when-time { font-size: 28px; font-weight: var(--fw-heavy); letter-spacing: -.01em; }
.tele-when-time small { font-size: 13px; font-weight: var(--fw-semibold); }
.tele-when-clinic { text-align: end; }
@media (max-width: 600px) { .tele-when { grid-template-columns: 1fr; } .tele-when-clinic { text-align: start; } }
.tele-countdown { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.tele-countdown strong { font-size: 18px; }
.tele-join { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 18px; }
.tele-join .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
@media (max-width: 600px) { .tele-join .btn { width: 100%; justify-content: center; } }
.tele-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .tele-grid { grid-template-columns: 1fr; } .tele-card { padding: 18px 16px; } }
.tele-device { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.tele-device video { width: 160px; max-width: 50%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--surface-sunken); transform: scaleX(-1); }
.tele-meter { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.tele-meter span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .08s linear; }

/* ---------- the video call ---------- */
.tele-call { margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; }
.tele-panel .tele-call { margin-top: 4px; }
.tele-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--surface-sunken); overflow: hidden; }
@media (max-width: 600px) { .tele-stage { aspect-ratio: 3 / 4; } }
.tele-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tele-local-wrap { position: absolute; inset-inline-end: 12px; bottom: 12px; width: 24%; min-width: 96px; max-width: 220px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-muted); }
.tele-local { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); }
.tele-you { position: absolute; inset-inline-start: 6px; bottom: 4px; padding: 1px 6px; border-radius: 999px; background: var(--surface); color: var(--text-muted); }
.tele-status { position: absolute; inset-inline-start: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); font-size: 13px; text-align: center; }
[dir="rtl"] .tele-status { transform: translate(50%, -50%); }
.tele-call.is-connected .tele-status:empty { display: none; }
.tele-status[hidden] { display: none; }
.tele-status.is-error { color: var(--danger); border-color: var(--danger); }
.tele-status.is-warn { color: var(--warning); }
.tele-play { position: absolute; inset-inline-start: 12px; top: 12px; }
.tele-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 12px; }
.tele-ctl .i-off { display: none; }
.tele-ctl.is-off .i-on { display: none; }
.tele-ctl.is-off .i-off { display: inline-block; }
.tele-ctl.is-off { color: var(--danger); }
@media (max-width: 600px) { .tele-controls .tele-ctl span { display: none; } .tele-controls .tele-ctl { width: 48px; height: 48px; padding: 0; justify-content: center; } }
.tele-media-note { text-align: center; margin-top: 8px; }
.tele-stage.is-jitsi { aspect-ratio: auto; height: min(78vh, 720px); }
.tele-stage.is-jitsi > :not(.tele-jitsi) { display: none; }
.tele-jitsi { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- staff panels ---------- */
.tele-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); min-width: 0; }
[dir="rtl"] .tele-link { padding: 6px 12px 6px 6px; }
.tele-link code { font-family: var(--font-mono); font-size: 12px; min-width: 0; }
.tele-visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.tele-start { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 700px) { .tele-visit-grid { grid-template-columns: 1fr; } .tele-start { align-items: stretch; } .tele-start .btn { justify-content: center; } }
.tele-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tele-files li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.tele-files li:last-child { border-bottom: 0; }
.tele-subhead { border-top: 1px solid var(--border); }
.tele-page [hidden], .tele-call [hidden], .tele-panel [hidden], .book-form [hidden] { display: none !important; }
/* the appointment page's side column is narrow: labels above values */
.tele-panel .dl.tele-kv { grid-template-columns: 1fr; gap: 2px; }
.tele-panel .dl.tele-kv dd { margin-bottom: 10px; }
.tele-panel .panel-head { flex-wrap: wrap; gap: 8px; }
.tele-grid { align-items: start; }
.tele-call { scroll-margin-top: 84px; }
