/* Clinic logo (2026/11/20 LOGO, App\Support\Logo, partials/clinic-logo): its own small file, linked by the admin layout, login,
   2FA, waiting-room TV, MC check and the patients' pages. The img carries width / height; here only the most it may take.
   A mostly dark logo (class is-dark) sits on a white rounded chip on dark screens: staff Dark theme, the TV (always dark),
   and pages without a theme switch when the device is dark. Printed papers and PDFs size it by attributes (layouts.print). */
.clinic-logo { display: block; width: auto; height: auto; max-width: 100%; object-fit: contain; }
picture:has(> .clinic-logo) { display: block; min-width: 0; max-width: 100%; }

/* Staff menu (side or top): the logo, then a small "by e-Rawat" */
.side .brand--clinic { flex-direction: column; align-items: flex-start; gap: 4px; }
.side .brand--clinic .clinic-logo { max-height: 56px; }
.brand-by { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.brand-by em { font-style: normal; color: var(--accent); }
.nav-top .side .brand--clinic { flex-direction: row; align-items: center; gap: 8px; }
.nav-top .side .brand--clinic .clinic-logo { max-height: 32px; max-width: 160px; }

/* Login and 2FA */
.login-box .brand--clinic { flex-direction: column; align-items: flex-start; gap: 2px; }
.login-box .brand--clinic .clinic-logo { max-height: 48px; max-width: 220px; }

/* Waiting-room TV, MC check, patients' pages */
.d-head .clinic-logo { height: clamp(40px, 8vh, 110px); max-width: 40vw; }
.mc-check .doc-head .clinic-logo { max-height: 56px; margin: 0 auto 4px; }
.pt-head .clinic-logo { max-height: 40px; max-width: 60vw; }

/* Admin > Clinic logo: the logo on a light and on a dark background */
.logo-preview { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.logo-swatch { flex: 1 1 220px; display: grid; justify-items: start; gap: 8px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.logo-swatch--light { background: #fff; color: #5c5c5c; }
.logo-swatch--dark { background: #191919; color: #a8a59b; }
.logo-swatch .clinic-logo { max-height: 96px; }
.logo-swatch--dark .clinic-logo.is-dark { box-sizing: content-box; padding: 4px 8px; border-radius: 8px; background: #fff; }

/* The white chip */
:root[data-theme="dark"] .clinic-logo.is-dark, .d-head .clinic-logo.is-dark { box-sizing: content-box; padding: 4px 8px; border-radius: 8px; background: #fff; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .pt-head .clinic-logo.is-dark { box-sizing: content-box; padding: 4px 8px; border-radius: 8px; background: #fff; }
}
