/* ═══════════════════════════════════════════════════════════════════
   INDHEAL — wwwroot/css/hospital-compare.css
   Compare tray (hospitals list + hospital pages) and the Compare page
   (/compare-hospitals).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tray ────────────────────────────────────────────────────── */
.hc-tray {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 300;
    background: #0E1D24;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.15);
}
.hc-tray[hidden] { display: none; }
.hc-tray__inner {
    display: flex;
    gap: 0.75rem 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0.85rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
}
.hc-tray__title { font-size: 0.95rem; color: #fff; font-weight: 600; }
.hc-tray__names { font-size: 0.92rem; color: #fff; flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-tray__clear { font-family: inherit; background: none; border: 0; color: #cbd5e1; font-size: 0.88rem; cursor: pointer; text-decoration: underline; }
.hc-tray__go {
    background: #fff;
    color: #004D75;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}
.hc-tray__go:hover { color: #004D75; background: #E0F1F9; }
.hc-tray__go.is-disabled { opacity: 0.6; }
body.has-compare-tray { padding-bottom: 72px; }
/* The tray sits above the mobile sticky bar */
body.has-compare-tray .sticky-mobile-bar { display: none !important; }

@media (max-width: 600px) {
    .hc-tray__names { flex-basis: 100%; order: 3; white-space: normal; }
}

/* ── Compare page ────────────────────────────────────────────── */
.hc-page { padding-top: 2.5rem; padding-bottom: 4rem; display: flex; flex-direction: column; gap: 1.5rem; }
.hc-head { display: flex; flex-direction: column; gap: 0.35rem; }
.hc-back { font-size: 0.95rem; }
.hc-title { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.25rem); font-weight: 500; color: #1a1a1a; }
.hc-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 16px; }
.hc-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 0.95rem; }
.hc-table th, .hc-table td { padding: 1rem 1.25rem; text-align: left; vertical-align: top; }
.hc-table tbody tr { border-top: 1px solid var(--color-border, #e2e8f0); }
.hc-table thead th { vertical-align: top; }
.hc-table .hc-label { width: 22%; color: #6b7280; font-weight: 400; }
.hc-col__img { display: block; width: 100%; height: 100px; object-fit: cover; border-radius: 10px; background: #E0F1F9; margin-bottom: 0.6rem; }
.hc-col__img--th { background: #FEF3E6; }
.hc-col__name { display: block; font-size: 1.1rem; font-weight: 500; color: #1a1a1a; text-decoration: none; }
.hc-col__name:hover { color: #006FA8; }
.hc-col__loc { display: block; font-weight: 400; color: #444; font-size: 0.92rem; margin-top: 0.15rem; }
.hc-col__remove { margin-top: 0.4rem; font-family: inherit; background: none; border: 0; padding: 0; color: #6b7280; font-size: 0.82rem; cursor: pointer; text-decoration: underline; }
.hc-gtk { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hc-gtk span { font-size: 0.8rem; padding: 0.3rem 0.6rem; border-radius: 999px; background: #D1FAE5; color: #065F46; }
.hc-muted { color: #9ca3af; }
.hc-plan { display: block; background: #006FA8; color: #fff; text-decoration: none; padding: 0.75rem; border-radius: 8px; font-weight: 500; text-align: center; }
.hc-plan:hover { color: #fff; filter: brightness(0.95); }
.hc-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.hc-share { background: #fff; color: #065F46; border: 1px solid #059669; text-decoration: none; padding: 0.75rem 1.1rem; border-radius: 8px; font-weight: 500; font-size: 0.95rem; }
.hc-share:hover { color: #065F46; background: #ecfdf5; }
.hc-all { font-size: 0.95rem; font-weight: 500; }
.hc-empty { background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 16px; padding: 2rem; text-align: center; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }

/* ── Compare page on phones ──────────────────────────────────────
   No sideways scrolling: each row's label becomes a heading across the
   full width, with the two or three hospitals side by side below it. */
@media (max-width: 700px) {
    .hc-page { padding-top: 1.5rem; }
    .hc-table { min-width: 0; display: block; font-size: 0.88rem; }
    .hc-table thead, .hc-table tbody { display: block; }
    .hc-table tr { display: flex; flex-wrap: wrap; }
    .hc-table th, .hc-table td { flex: 1 1 0; min-width: 0; padding: 0.6rem 0.5rem; overflow-wrap: anywhere; }
    .hc-table th:not(.hc-label) + th, .hc-table td + td { border-left: 1px solid var(--color-border, #e2e8f0); }
    .hc-table .hc-label { flex-basis: 100%; width: auto; padding: 0.75rem 0.5rem 0; font-size: 0.8rem; font-weight: 600; }
    .hc-table thead .hc-label, .hc-row-cta .hc-label { display: none; }
    .hc-col__img { height: 70px; }
    .hc-col__name { font-size: 0.95rem; }
    .hc-plan { padding: 0.6rem 0.4rem; font-size: 0.85rem; }
    .hc-actions { flex-direction: column; align-items: stretch; text-align: center; }
}
