/* ============================================================
   SIJADWAL - Public Display Stylesheet
   Digital Signage Modern Theme (Rumah Sakit)
   Primary: #2563EB | Success: #16A34A | BG: #F8FAFC | Text: #0F172A
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(165deg, #F8FAFC 0%, #EEF2F7 100%);
    color: #0F172A;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* ===================== HEADER ===================== */
.display-header {
    flex: 0 0 auto;
    background: #ffffff;
    padding: 20px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 20;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.header-logo {
    height: 86px;
    width: auto;
    object-fit: contain;
}

.header-logo-placeholder {
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 42px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.header-title h1 {
    font-size: 34px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.header-title .subtitle {
    font-size: 18px;
    color: #64748B;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-title .subtitle i {
    color: #2563EB;
    font-size: 20px;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.online-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    background: #ECFDF5;
    border-radius: 999px;
    border: 2px solid #BBF7D0;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.online-pill .pulse-dot {
    width: 14px;
    height: 14px;
    background: #16A34A;
    border-radius: 50%;
    animation: pulse 1.6s ease-in-out infinite;
}

.online-pill span {
    font-size: 16px;
    font-weight: 700;
    color: #15803D;
    letter-spacing: 0.3px;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.45;
        transform: scale(1.35);
    }
}

.datetime-box {
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, #F8FAFC, #EFF6FF);
    border-radius: 24px;
    padding: 16px 36px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.datetime-divider {
    width: 2px;
    height: 56px;
    background: linear-gradient(180deg, #E2E8F0, #BFDBFE, #E2E8F0);
    border-radius: 2px;
}

.date-section {
    text-align: left;
}

.date-section .day {
    font-size: 20px;
    font-weight: 800;
    color: #2563EB;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1;
}

.date-section .full-date {
    font-size: 22px;
    font-weight: 600;
    color: #334155;
    margin-top: 6px;
}

.time-section {
    text-align: right;
}

.time-section .time {
    font-size: 50px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.10);
}

.time-section .time-label {
    font-size: 14px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
}

/* ===================== MAIN CONTENT ===================== */
.main-content-area {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.slider-container {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slider-wrapper.no-transition {
    transition: none !important;
}

.slide-item {
    min-width: 100%;
    height: 100%;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

/* ===================== DOCTOR DISPLAY (2 Kolom) ===================== */
.doctor-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    width: 100%;
    height: 100%;
    align-items: stretch;
    min-height: 0;
}

/* KIRI - Foto Dokter */
.doctor-photo-area {
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15,23,42,.14), 0 6px 18px rgba(15,23,42,.06);
    border: 6px solid #fff;
    background: linear-gradient(135deg,#DBEAFE,#E2E8F0);
    min-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-photo-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.doctor-photo-area .photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.doctor-photo-area .photo-placeholder i {
    font-size: 160px;
    color: #ffffff;
    text-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* KANAN - Informasi Dokter */
.doctor-info-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    min-width: 0;
    padding: 24px 0;
}

.poli-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: #1D4ED8;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid #BFDBFE;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.10);
    letter-spacing: 0.3px;
}

.poli-badge i {
    font-size: 24px;
}

.doctor-name {
    font-size: clamp(40px, 5vw, 66px);
    font-weight: 800;
    color: #0F172A;
    line-height: 1.12;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    word-break: break-word;
}

.schedule-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 26px 34px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: 580px;
}

.schedule-box .schedule-icon {
    flex-shrink: 0;
    width: 66px;
    height: 66px;
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.schedule-box .schedule-text {
    display: flex;
    flex-direction: column;
}

.schedule-box .schedule-label {
    font-size: 15px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 2.5px;
}

.schedule-box .schedule-time {
    font-size: 36px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

/* Badges Row - Tombol Besar */
.badges-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.status-button {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 22px 42px;
    border-radius: 24px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.4px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    border: 3px solid transparent;
    transition: all 0.3s ease;
    line-height: 1;
}

.status-button i {
    font-size: 36px;
}

.status-button.success {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    color: #ffffff;
    border-color: #86EFAC;
    box-shadow: 0 16px 40px rgba(22, 163, 74, 0.35);
}

.status-button.warning {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #ffffff;
    border-color: #FDE68A;
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.35);
}

.status-button.danger {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: #ffffff;
    border-color: #FECACA;
    box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35);
}

.status-button.secondary {
    background: linear-gradient(135deg, #64748B, #94A3B8);
    color: #ffffff;
    border-color: #E2E8F0;
    box-shadow: 0 16px 40px rgba(100, 116, 139, 0.30);
}

.session-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 22px 40px;
    border-radius: 24px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.4px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    border: 3px solid transparent;
    line-height: 1;
}

.session-button i {
    font-size: 34px;
}

.session-button.sesi-pagi {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #ffffff;
    border-color: #FDE68A;
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.35);
}

.session-button.sesi-siang {
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    color: #ffffff;
    border-color: #BFDBFE;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
}

/* ===================== SLIDER NAV ===================== */
.slider-nav {
    display: none;
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 8px;
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.10);
    border: 1px solid #E2E8F0;
}

.slider-next {
    position: absolute;
    top: 50%;
    right: 22px;
    z-index: 30;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.92);
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.slider-next:hover {
    background: #1D4ED8;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-segment {
    width: 64px;
    height: 6px;
    border-radius: 6px;
    background: #E2E8F0;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-segment.active {
    background: #BFDBFE;
}

.progress-segment .seg-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 6px;
}

.progress-segment.active .seg-fill {
    animation: segProgress var(--slider-duration) linear forwards;
}

@keyframes segProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    color: #94A3B8;
}

.empty-state .empty-icon {
    width: 160px;
    height: 160px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    font-size: 72px;
    color: #2563EB;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.empty-state h3 {
    font-size: 44px;
    color: #334155;
    font-weight: 800;
    margin-bottom: 12px;
}

.empty-state p {
    color: #94A3B8;
    font-size: 22px;
    font-weight: 500;
}

/* ===================== RUNNING TEXT (FOOTER) ===================== */
.running-text-container {
    flex: 0 0 auto;
    background: linear-gradient(90deg, #1E3A8A, #2563EB, #1E40AF);
    padding: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 20;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.12);
}

/* Keep the full display visible on short desktop screens. */
@media (min-width: 769px) and (max-height: 850px) {
    .display-header {
        padding: 12px 36px;
    }

    .header-logo,
    .header-logo-placeholder {
        height: 70px;
    }

    .header-left {
        gap: 16px;
    }

    .header-title h1 {
        font-size: 28px;
    }

    .header-title .subtitle {
        font-size: 15px;
    }

    .datetime-box {
        padding: 12px 24px;
        gap: 20px;
    }

    .time-section .time {
        font-size: 40px;
    }

    .slide-item {
        padding: 8px 36px 32px;
    }

    .doctor-display {
        gap: 40px;
    }

    .doctor-info-area {
        gap: 18px;
        padding: 16px 0;
    }

    .poli-badge {
        padding: 10px 22px;
        font-size: 18px;
    }

    .doctor-name {
        font-size: clamp(36px, 4.5vw, 54px);
    }

    .schedule-box {
        padding: 18px 24px;
        gap: 16px;
    }

    .schedule-box .schedule-icon {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }

    .schedule-box .schedule-time {
        font-size: 30px;
    }

    .status-button,
    .session-button {
        padding: 16px 26px;
        font-size: 22px;
    }

    .status-button i,
    .session-button i {
        font-size: 28px;
    }

    .running-text-container {
        padding: 12px 0;
    }

    .running-text-track span {
        font-size: 19px;
    }
}

.running-text-wrapper {
    display: flex;
    overflow: hidden;
}

.running-text-track {
    display: flex;
    animation: scrollText 40s linear infinite;
    white-space: nowrap;
}

.running-text-track span {
    padding: 0 80px;
    font-size: 24px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.running-text-track span i {
    color: #FDE68A;
    margin-right: 14px;
    font-size: 26px;
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
    .display-header {
        padding: 16px 28px;
    }
    .header-title h1 {
        font-size: 26px;
    }
    .header-title .subtitle {
        font-size: 15px;
    }
    .header-logo,
    .header-logo-placeholder {
        height: 64px;
    }
    .time-section .time {
        font-size: 38px;
    }
    .slide-item {
        padding: 0 28px;
    }
    .doctor-display {
        gap: 32px;
    }
    .doctor-name {
        font-size: clamp(30px, 4.5vw, 48px);
    }
    .status-button {
        font-size: 24px;
        padding: 18px 30px;
    }
    .session-button {
        font-size: 22px;
        padding: 18px 28px;
    }
    .schedule-box .schedule-time {
        font-size: 28px;
    }
    .running-text-track span {
        font-size: 19px;
    }
}

/* Mobile - Vertical stack: foto atas, info bawah */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    .display-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 20px;
    }

    .header-right {
        width: 100%;
        gap: 12px;
        flex-wrap: wrap;
    }

    .datetime-box {
        flex: 1;
        min-width: 0;
        justify-content: space-between;
        padding: 12px 18px;
        gap: 16px;
    }

    .time-section .time {
        font-size: 30px;
    }

    .date-section .day {
        font-size: 15px;
    }

    .date-section .full-date {
        font-size: 15px;
    }

    .online-pill {
        padding: 10px 16px;
    }

    .online-pill span {
        font-size: 13px;
    }

    .main-content-area {
        flex: 1;
        min-height: auto;
    }

    .slider-container {
        overflow: visible;
    }

    .slider-wrapper {
        height: auto;
        flex-direction: column;
        transform: none !important;
    }

    .slide-item {
        min-width: 100%;
        height: auto;
        padding: 20px;
        display: block;
    }

    /* Doctor display becomes single column */
    .doctor-display {
        grid-template-columns: 1fr;
        gap: 24px;
        height: auto;
    }

    .doctor-photo-area {
        height: 380px;
        border-radius: 24px;
        border-width: 4px;
    }

    .doctor-info-area {
        align-items: center;
        text-align: center;
    }

    .poli-badge {
        align-self: center;
    }

    .badges-row {
        justify-content: center;
    }

    .schedule-box {
        width: 100%;
        justify-content: center;
        max-width: 100%;
    }

    .slider-nav {
        display: none;
    }

    .slider-next {
        right: 12px;
        width: 46px;
        height: 46px;
        font-size: 24px;
    }

    .running-text-track span {
        font-size: 15px;
        padding: 0 40px;
    }
}

