/* =====================================================================
   ei-about-clinic.css
   "About Clinic" popup (design from the doctorlistnew prototype's profile
   modal). Driven by ~/js_new/ei-about-clinic.js from the data-clinic JSON
   the card's .js-open-about-clinic button carries.
   Shell markup: Views/Shared/_AboutClinicPopup.cshtml

   All popup classes are prefixed `eiac-` and colours are scoped to
   `.eiac-overlay` so nothing collides with the rest of the site.
   Also styles the card's `.imep-about-btn` (the button that opens it).
   ===================================================================== */

/* ---- card action row: compact "About Clinic" eye icon + Schedule Appointment ---- */
.imep-action-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.imep-action-row .imep-cta { flex: 0 0 auto; margin: 0; width: 100%; }

/* "Clinic info" is a plain underlined icon + text link, centered UNDER the Schedule
   button — no box / background / highlight. */
.imep-about-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #0a6f68;   /* WCAG AA contrast on the white card (was #0e8a84 = 4.25:1) */
    padding: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s ease;
}
.imep-about-btn svg { width: 14px; height: 14px; flex: 0 0 auto; }
.imep-about-label { font-size: 11.5px; font-weight: 600; line-height: 1; text-decoration: underline; text-underline-offset: 2px; }
.imep-about-btn:hover { color: #0b6e69; }
.imep-about-btn:hover .imep-about-label { text-decoration-thickness: 2px; }

/* hover tooltip ("About Clinic") */
.imep-about-btn::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f2b30;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 7px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 20;
}
.imep-about-btn::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f2b30;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 20;
}
/* tooltip disabled — the visible "Clinic info" label replaces it */
.imep-about-btn::after, .imep-about-btn::before { display: none; }

/* ---- overlay + modal ---- */
.eiac-overlay {
    /* modern teal + slate palette */
    --eiac-teal: #0d9488;          /* primary */
    --eiac-teal-deep: #0f766e;
    --eiac-teal-soft: #14b8a6;
    --eiac-teal-bg: #f0fdfa;        /* teal-50 */
    --eiac-teal-border: #99f6e4;    /* teal-200 */
    --eiac-green: #0f766e;          /* (legacy alias -> teal) */
    --eiac-green-bg: #f0fdfa;       /* (legacy alias) */
    --eiac-success: #059669;
    --eiac-amber: #d97706;
    /* multi-accent palette (used across chips / cards / CTA) */
    --eiac-indigo: #4f46e5;
    --eiac-indigo-soft: #6366f1;
    --eiac-blue: #2563eb;
    --eiac-cyan: #06b6d4;
    --eiac-violet: #7c3aed;
    --eiac-emerald: #059669;
    --eiac-ink: #0f172a;            /* headings */
    --eiac-text: #334155;           /* body */
    --eiac-muted: #94a3b8;          /* labels / captions */
    --eiac-line: #eef2f6;           /* dividers */
    --eiac-line-2: #e2e8f0;

    position: fixed;
    inset: 0;
    z-index: 10040;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--eiac-text);
    line-height: 1.55;
}
.eiac-overlay.eiac-active { display: flex; }

.eiac-scrim {
    position: absolute;
    inset: 0;
    background: rgba(12,24,20,.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    /* NOTE: do NOT animate opacity here — animating opacity on a backdrop-filter
       element flickers in Chrome. The sheet animation carries the "open" feel. */
}

.eiac-sheet {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    background: #fff;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 70px rgba(0,40,45,.28);
    overflow: hidden;
    animation: eiac-pop .38s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes eiac-pop {
    from { opacity: 0; transform: translateY(26px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* close animation — the JS keeps the popup shown until this finishes.
   Panel fades + gently scales down; backdrop fades out too (blur dropped during the
   fade so animating its opacity doesn't flicker). */
.eiac-overlay.eiac-closing .eiac-sheet { animation: eiac-pop-out .2s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes eiac-pop-out {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(.965); }
}
.eiac-overlay.eiac-closing .eiac-scrim {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: eiac-scrim-out .2s ease both;
}
@keyframes eiac-scrim-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 640px) {
    .eiac-overlay { padding: 0; align-items: flex-end; }
    .eiac-sheet {
        max-width: none;
        max-height: 94vh;
        max-height: 94dvh;                 /* iOS: real viewport, ignores the URL bar */
        border-radius: 20px 20px 0 0;
    }
    .eiac-sheet::before {
        content: "";
        position: absolute;
        top: 9px; left: 50%;
        transform: translateX(-50%);
        width: 40px; height: 4px;
        border-radius: 999px;
        background: #d3dede;
        z-index: 3;
    }
    .eiac-hero { padding: 24px 18px 14px; }
    .eiac-hero-title { font-size: 18px; }
    .eiac-sec { padding: 14px 18px; }
    .eiac-foot {
        gap: 8px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));  /* clear iOS home bar */
    }
    .eiac-btn-book { height: 46px; font-size: 14.5px; }
    .eiac-btn-ghost { height: 46px; padding: 0 15px; }
}
@media (max-width: 380px) {
    .eiac-hero-main { gap: 11px; }
    .eiac-avatar { width: 48px; height: 48px; font-size: 17px; }
    .eiac-btn-ghost { padding: 0 12px; font-size: 13px; }
}

/* ---- header (clean white, colourful accents) ---- */
.eiac-hero {
    position: relative;
    flex-shrink: 0;
    padding: 20px 22px 16px;
    background: #fff;
    border-bottom: 1px solid var(--eiac-line);
}
.eiac-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border-radius: 999px;
    border: none; cursor: pointer;
    background: #f1f5f9; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    transition: .15s;
}
.eiac-close:hover { background: #e2e8f0; color: #0f172a; }

.eiac-hero-main { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.eiac-avatar {
    width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #2dd4bf 100%);
    color: #fff; font-weight: 800; font-size: 19px; letter-spacing: .5px;
}
.eiac-hero-txt { flex: 1; min-width: 0; }
.eiac-eyebrow {
    font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--eiac-teal-deep); margin-bottom: 3px;
}
.eiac-hero-title {
    margin: 0; font-size: 18.5px; font-weight: 700; letter-spacing: -.2px; line-height: 1.25;
    color: var(--eiac-ink);
    /* show the full location — wrap instead of truncating with "…" */
    overflow-wrap: anywhere;
}
.eiac-hero-sub {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 7px;
    font-size: 13px; font-weight: 600;
}
.eiac-hero-sub svg { color: var(--eiac-teal); flex-shrink: 0; }
.eiac-hs-zip  { color: #64748b; font-weight: 600; }
.eiac-hs-dot  { color: #5ecec4; font-weight: 700; margin: 0 1px; }
.eiac-hs-dist { color: var(--eiac-teal-deep); font-weight: 800; }
.eiac-rating {
    flex-shrink: 0; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 5px;
    background: #fffbeb; border: 1px solid #fde68a; color: #b45309;
    padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: 13px;
}
.eiac-rating svg { color: #f59e0b; }
.eiac-rating em { font-style: normal; font-weight: 600; color: #d97706; opacity: .9; }

.eiac-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.eiac-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid transparent;
}
.eiac-chip svg { flex-shrink: 0; }
.eiac-chip.c-teal   { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.eiac-chip.c-amber  { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.eiac-chip.c-green  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.eiac-chip.c-blue   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.eiac-chip.c-violet { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

/* ---- body ---- */
.eiac-body { flex: 1 1 auto; overflow-y: auto; background: #fff; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* simple, general grey scrollbar (no teal, no arrow buttons). Don't set scrollbar-color
   — it makes Chrome fall back to the thick native arrowed scrollbar. */
.eiac-body { scrollbar-width: thin; }
.eiac-body::-webkit-scrollbar { width: 8px; }
.eiac-body::-webkit-scrollbar-track { background: transparent; }
.eiac-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.eiac-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.eiac-body::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.eiac-sec { padding: 16px 22px; border-bottom: 1px solid var(--eiac-line); }
.eiac-sec:last-child { border-bottom: none; }
.eiac-sl {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--eiac-muted); margin-bottom: 12px;
}

/* pricing */
.eiac-price-card { border: 1px solid var(--eiac-line-2); border-radius: 14px; overflow: hidden; }
.eiac-price-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; font-size: 14.5px; color: var(--eiac-text);
}
.eiac-price-row + .eiac-price-row { border-top: 1px solid var(--eiac-line); }
/* label ("Adult exam" / "Child exam") — darker + a touch heavier so it reads clearly
   against the bold price, instead of looking faint/greyed out */
.eiac-price-row span { color: #334155; font-weight: 600; }
.eiac-price-row b { font-weight: 800; color: var(--eiac-ink); font-size: 17px; }
.eiac-package {
    margin-top: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 16px; border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    border: 1px solid var(--eiac-teal-border);
}
.eiac-pkg-t { font-weight: 800; color: var(--eiac-ink); font-size: 14.5px; }
.eiac-pkg-s { font-size: 11.5px; color: var(--eiac-teal-deep); margin-top: 3px; }
.eiac-pkg-p { font-size: 22px; font-weight: 800; color: var(--eiac-teal-deep); white-space: nowrap; }

/* what's included */
.eiac-incl-list { list-style: none; margin: 0; padding: 0; }
.eiac-incl { display: flex; align-items: center; gap: 11px; padding: 7px 0; font-size: 14px; color: var(--eiac-text); }
.eiac-ic {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 13px; line-height: 1;
}
.eiac-ic svg { width: 13px; height: 13px; }
.eiac-ic.yes { background: var(--eiac-success); }
.eiac-ic.add { background: #fef3c7; color: var(--eiac-amber); }
.eiac-extra { font-style: normal; color: var(--eiac-amber); font-weight: 700; font-size: 12px; }
.eiac-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--eiac-muted); margin-top: 12px; line-height: 1.5; }
.eiac-note svg { flex-shrink: 0; margin-top: 1px; }

/* "Good to know" facts (plain-language highlights) */
.eiac-facts { list-style: none; margin: 0; padding: 0; }
.eiac-fact { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 13.5px; color: var(--eiac-text); line-height: 1.45; }
.eiac-fact + .eiac-fact { border-top: 1px solid var(--eiac-line); }
.eiac-fact-ic {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--eiac-teal-bg); color: var(--eiac-teal-deep);
    margin-top: 1px;
}
.eiac-fact-ic svg { width: 16px; height: 16px; }
.eiac-fact-ic.f-teal  { background: #f0fdfa; color: #0f766e; }
.eiac-fact-ic.f-amber { background: #fffbeb; color: #b45309; }
.eiac-fact-ic.f-green { background: #ecfdf5; color: #047857; }

/* result turn-around (teal tile) */
.eiac-tat {
    display: flex; align-items: center; gap: 10px;
    background: var(--eiac-teal-bg); border: 1px solid var(--eiac-teal-border);
    border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--eiac-teal-deep); font-weight: 600;
}
.eiac-tat svg { flex-shrink: 0; color: var(--eiac-teal); }
.eiac-tat strong { font-weight: 800; color: var(--eiac-ink); }

/* pills / payments */
.eiac-pills { display: flex; flex-wrap: wrap; gap: 8px; }
/* language pills — soft teal (matches the app's active-filter teal) so they read as
   on-brand tags, clearly distinct from the muted slate section label above them */
.eiac-pill { font-size: 13px; font-weight: 600; color: #0e7f85; background: #e9faf8; border: 1px solid #bfe9e5; border-radius: 999px; padding: 7px 15px; }
/* cream payment tiles — wrap to fit all methods, no scrollbar */
.eiac-pays {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.eiac-pay {
    /* grow:0 so a single method doesn't stretch full-width; tiles size to content and
       wrap. Grow modestly (up to ~2×) only when there are several, to fill the row. */
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-width: 84px;
    padding: 0 16px;
    background: #fdf8ea;
    border: 1px solid #f2ebd4;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}
.eiac-pay img { height: 26px; width: auto; }

/* footer */
.eiac-foot { flex-shrink: 0; display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--eiac-line); background: #fff; }
.eiac-btn-ghost {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 48px; padding: 0 18px; border-radius: 12px;
    background: #fff; border: 1.5px solid var(--eiac-teal-border); color: var(--eiac-teal-deep);
    font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s;
}
.eiac-btn-ghost:hover { background: var(--eiac-teal-bg); border-color: var(--eiac-teal-soft); }
.eiac-btn-book {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 48px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #2dd4bf 100%); color: #fff;
    font-weight: 800; font-size: 15px;
    transition: .15s;
}
.eiac-btn-book:hover { filter: brightness(1.05); transform: translateY(-1px); }
.eiac-btn-ghost svg, .eiac-btn-book svg { width: 16px; height: 16px; flex-shrink: 0; }
