/* ===================================================================
   Hospital OP Availability — v2.0 Colourful Styles
   =================================================================== */


/* ---------- CSS Custom Properties ---------- */
:root {
    --hop-font-latin: 'Inter', system-ui, -apple-system, sans-serif;
    --hop-font-ml: 'Noto Sans Malayalam', 'Noto Serif Malayalam', sans-serif;

    /* Greens (ഉണ്ട്) */
    --hop-green-50:  #f0fdf4;
    --hop-green-100: #dcfce7;
    --hop-green-200: #bbf7d0;
    --hop-green-500: #22c55e;
    --hop-green-600: #16a34a;
    --hop-green-700: #15803d;

    /* Reds (ഇല്ല) */
    --hop-red-50:  #fef2f2;
    --hop-red-100: #fee2e2;
    --hop-red-200: #fecaca;
    --hop-red-500: #ef4444;
    --hop-red-600: #dc2626;
    --hop-red-700: #b91c1c;

    /* Header gradient — rich teal-to-emerald */
    --hop-primary-500: #22c48e;
    --hop-primary-600: #14a174;
    --hop-primary-700: #0f815f;

    /* Neutrals */
    --hop-gray-50:  #f9fafb;
    --hop-gray-100: #f3f4f6;
    --hop-gray-200: #e5e7eb;
    --hop-gray-300: #d1d5db;
    --hop-gray-400: #9ca3af;
    --hop-gray-500: #6b7280;
    --hop-gray-700: #374151;
    --hop-gray-800: #1f2937;
    --hop-gray-900: #111827;

    /* Alternating row colours — soft pastel rainbow */
    --hop-row-1: #eef7ff;  /* light blue */
    --hop-row-2: #fef9ec;  /* light amber */
    --hop-row-3: #f0fdf4;  /* light green */
    --hop-row-4: #fdf2f8;  /* light pink */
    --hop-row-5: #f5f3ff;  /* light violet */
    --hop-row-6: #ecfeff;  /* light cyan */

    /* Shadows */
    --hop-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --hop-shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --hop-shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --hop-shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
    --hop-shadow-glow: 0 0 50px rgba(34,196,142,.14);

    /* Radii */
    --hop-radius-md: 12px;
    --hop-radius-lg: 20px;
    --hop-radius-xl: 28px;
    --hop-radius-pill: 9999px;
}

/* ---------- Outer container ---------- */
.hospital-op-container {
    position: relative;
    font-family: var(--hop-font-ml);
    max-width: 780px;
    margin: 40px auto;
    padding: 0;
    background: #ffffff;
    border-radius: var(--hop-radius-xl);
    box-shadow: var(--hop-shadow-xl), var(--hop-shadow-glow);
    overflow: hidden;
    animation: hopFadeInUp .6s cubic-bezier(.22,1,.36,1) both;
}

/* ---------- Hero header ---------- */
.hospital-op-header {
    position: relative;
    background: linear-gradient(135deg, var(--hop-primary-700) 0%, var(--hop-primary-500) 50%, #34d399 100%);
    padding: 36px 32px 28px;
    text-align: center;
    overflow: hidden;
}

/* Decorative blurred circles */
.hospital-op-header::before,
.hospital-op-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .15;
    pointer-events: none;
}
.hospital-op-header::before {
    width: 240px; height: 240px;
    top: -80px; right: -60px;
    background: #fff;
    filter: blur(40px);
}
.hospital-op-header::after {
    width: 180px; height: 180px;
    bottom: -60px; left: -40px;
    background: #fff;
    filter: blur(30px);
}

.hospital-op-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    margin-bottom: 12px;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
}

.hospital-op-header__title {
    font-family: var(--hop-font-ml);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -.3px;
    text-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.hospital-op-header__subtitle {
    font-family: var(--hop-font-latin);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    margin: 0;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ---------- Date bar ---------- */
.hospital-op-date-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(90deg, #eef7ff, #f0fdf4);
    border-bottom: 1px solid var(--hop-gray-200);
}

.hospital-op-date-bar__icon {
    font-size: 18px;
    color: var(--hop-primary-600);
}

.hospital-op-date-bar__text {
    font-family: var(--hop-font-latin);
    font-size: 15px;
    font-weight: 600;
    color: var(--hop-gray-700);
}

.hospital-op-date-bar__value {
    font-weight: 800;
    font-family: var(--hop-font-latin);
    color: var(--hop-primary-700);
    background: rgba(34,196,142,.12);
    padding: 4px 14px;
    border-radius: var(--hop-radius-pill);
    font-size: 14px;
    letter-spacing: .3px;
    border: 1px solid rgba(34,196,142,.2);
}

/* ---------- Table wrapper ---------- */
.hospital-op-table-wrap {
    padding: 20px 24px 28px;
}

/* ---------- Table ---------- */
.hospital-op-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--hop-radius-md);
    overflow: hidden;
    box-shadow: var(--hop-shadow-md);
    border: 1px solid var(--hop-gray-200);
}

/* Header row — vibrant gradient */
.hospital-op-container thead th {
    font-family: var(--hop-font-ml);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #fff;
    background: linear-gradient(135deg, #1e40af, #3b82f6, #6366f1);
    padding: 16px 20px;
    text-align: center;
    border-bottom: none;
}
.hospital-op-container thead th:first-child {
    text-align: left;
    padding-left: 24px;
}

/* ---------- Colourful alternating rows ---------- */
.hospital-op-container tbody tr {
    animation: hopRowSlide .45s cubic-bezier(.22,1,.36,1) both;
    animation-delay: calc(var(--row-i, 0) * 60ms);
    transition: transform .2s ease, box-shadow .2s ease;
}

.hospital-op-container tbody tr:nth-child(6n+1) { background-color: var(--hop-row-1); }
.hospital-op-container tbody tr:nth-child(6n+2) { background-color: var(--hop-row-2); }
.hospital-op-container tbody tr:nth-child(6n+3) { background-color: var(--hop-row-3); }
.hospital-op-container tbody tr:nth-child(6n+4) { background-color: var(--hop-row-4); }
.hospital-op-container tbody tr:nth-child(6n+5) { background-color: var(--hop-row-5); }
.hospital-op-container tbody tr:nth-child(6n+6) { background-color: var(--hop-row-6); }

.hospital-op-container tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    z-index: 2;
    position: relative;
}

.hospital-op-container tbody td {
    font-family: var(--hop-font-ml);
    font-size: 15px;
    font-weight: 600;
    color: var(--hop-gray-800);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,.04);
    text-align: center;
    transition: background .2s ease;
}
.hospital-op-container tbody td:first-child {
    text-align: left;
    padding-left: 24px;
    font-weight: 700;
    color: var(--hop-gray-900);
    font-size: 18px;
}

.hospital-op-container tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Status pills ---------- */
.hospital-op-status,
.hospital-op-container .status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border-radius: var(--hop-radius-pill);
    font-family: var(--hop-font-ml);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: default;
    color: #fff !important;
}
.hospital-op-status:hover,
.hospital-op-container .status:hover {
    transform: scale(1.08);
}

/* ✓ ഉണ്ട് — GREEN */
.hospital-op-status--on,
.hospital-op-container .status.on {
    background: var(--hop-green-500) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(34,197,94,.4) !important;
}
.hospital-op-status--on:hover,
.hospital-op-container .status.on:hover {
    box-shadow: 0 5px 20px rgba(34,197,94,.5) !important;
}

/* ✕ ഇല്ല — RED */
.hospital-op-status--off,
.hospital-op-container .status.off {
    background: var(--hop-red-500) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(239,68,68,.35) !important;
}
.hospital-op-status--off:hover,
.hospital-op-container .status.off:hover {
    box-shadow: 0 5px 20px rgba(239,68,68,.45) !important;
}

/* Status icon circle */
.hospital-op-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    background: rgba(255,255,255,.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

/* ---------- Footer ---------- */
.hospital-op-footer {
    padding: 14px 24px;
    background: var(--hop-gray-50);
    border-top: 1px solid var(--hop-gray-200);
    text-align: center;
}

.hospital-op-footer__text {
    font-family: var(--hop-font-latin);
    font-size: 12px;
    font-weight: 500;
    color: var(--hop-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.hospital-op-footer__dot {
    display: inline-block;
    width: 7px; height: 7px;
    background: var(--hop-green-500);
    border-radius: 50%;
    animation: hopPulse 2s infinite;
}

/* ---------- Empty state ---------- */
.hospital-op-empty {
    text-align: center;
    padding: 48px 24px;
}

.hospital-op-empty__icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .5;
}

.hospital-op-empty__text {
    font-family: var(--hop-font-ml);
    font-size: 15px;
    color: var(--hop-gray-400);
    font-weight: 600;
}

/* ---------- Animations ---------- */
@keyframes hopFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hopRowSlide {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hopPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* ---------- Share Bar ---------- */
.hospital-op-share-bar {
    padding: 0 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom: 1px dashed var(--hop-gray-200);
}

.hospital-op-share-bar__title {
    font-family: var(--hop-font-ml);
    font-size: 14px;
    font-weight: 700;
    color: var(--hop-gray-500);
}

.hospital-op-share-bar__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.hospital-op-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--hop-radius-pill);
    font-family: var(--hop-font-latin);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease, background-color .2s ease;
    box-shadow: var(--hop-shadow-sm);
    color: #ffffff !important;
}
.hospital-op-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hop-shadow-md);
}
.hospital-op-share-btn:active {
    transform: translateY(0);
}

/* WhatsApp Color */
.hospital-op-share-btn--whatsapp {
    background: #25d366;
}
.hospital-op-share-btn--whatsapp:hover {
    background: #20ba5a;
}

/* Facebook Color */
.hospital-op-share-btn--facebook {
    background: #1877f2;
}
.hospital-op-share-btn--facebook:hover {
    background: #166fe5;
}

/* Copy Link Color */
.hospital-op-share-btn--copy {
    background: #4b5563;
}
.hospital-op-share-btn--copy:hover {
    background: #374151;
}
.hospital-op-share-btn--copy.copied {
    background: var(--hop-green-600) !important;
}

.hospital-op-share-btn__icon {
    font-size: 16px;
    line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .hospital-op-container {
        margin: 16px 8px;
        border-radius: var(--hop-radius-lg);
    }

    .hospital-op-header {
        padding: 28px 20px 22px;
    }

    .hospital-op-header__title {
        font-size: 22px;
    }

    .hospital-op-table-wrap {
        padding: 14px 10px 20px;
    }

    .hospital-op-container thead th,
    .hospital-op-container tbody td {
        padding: 11px 10px;
        font-size: 13px;
    }
    .hospital-op-container tbody td:first-child,
    .hospital-op-container thead th:first-child {
        padding-left: 14px;
    }
    .hospital-op-container tbody td:first-child {
        font-size: 16px;
    }

    .hospital-op-status {
        font-size: 12px;
        padding: 5px 12px;
    }

    .hospital-op-date-bar {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .hospital-op-share-bar {
        padding: 0 16px 20px;
    }
    
    .hospital-op-share-bar__buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hospital-op-share-btn {
        width: 100%;
        box-sizing: border-box;
    }
}
