/* ========================================== */
/* Schedule Page Styles (pages/schedule/view.css) */
/* ========================================== */

.schedule-header-glow {
    position: relative;
    overflow: hidden;
}

.schedule-header-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Day card — matches mockup timeline */
.sched-day {
    border-radius: 1.25rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -8px rgba(0, 45, 98, 0.12);
}

.sched-day__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(90deg, #002D62 0%, #0A4D92 100%);
    color: #fff;
}

.sched-day__head-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 220px;
}

.sched-day__num {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 9999px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    background: #f59e0b;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.sched-day__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}

.sched-day__sub {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
}

.sched-day__lunar {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
}

.sched-day__body {
    padding: 1.15rem 1.15rem 1.35rem 1rem;
    background: #fffdf8;
}

.sched-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.35rem;
    position: relative;
}

.sched-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 2.3rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0 1rem;
}

/* Timeline connecting line: centered precisely through the 2.3rem circle axis */
.sched-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.15rem; /* Exactly half of 2.3rem circle */
    transform: translateX(-50%);
    top: 1.7rem;   /* Starts at center of current dot (0.55rem padding-top + 1.15rem radius) */
    height: 100%;  /* Reaches exactly into center of next dot */
    width: 2px;
    background: #fdba74;
    border-radius: 2px;
    z-index: 0;
}

.sched-timeline__item:last-child {
    padding-bottom: 0.15rem;
}

.sched-timeline__dot {
    position: relative;
    z-index: 1;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 0 0 4px #fffdf8;
}

.sched-timeline__time {
    font-weight: 800;
    color: #ea580c;
    font-size: 0.98rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.sched-timeline__text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
}

.sched-timeline__detail {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
}

.sched-timeline__detail.is-primary {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.sched-grand-box {
    margin-top: 0.35rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
}

.sched-grand-box__title {
    font-weight: 800;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 0.55rem;
}

.sched-grand-box__detail {
    margin: -0.25rem 0 0.55rem;
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.45;
}

.sched-grand-box__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.sched-grand-box__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.45;
}

.sched-grand-box__list i {
    color: #16a34a;
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.sched-day-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 0.75rem;
}

#sched-days-container + .sched-day-note {
    margin-top: 0.25rem;
}

.sched-day-note > i {
    color: #ea580c;
    margin-top: 0.15rem;
    flex: 0 0 auto;
}

.sched-day-note p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #9a3412;
}

.sched-day-note strong {
    font-weight: 800;
}

@media (min-width: 640px) {
    .sched-day__head {
        padding: 1.1rem 1.4rem;
    }
    .sched-day__title {
        font-size: 1.25rem;
    }
    .sched-day__sub {
        font-size: 0.9rem;
    }
    .sched-day__body {
        padding: 1.35rem 1.5rem 1.5rem 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .sched-day__lunar {
        width: 100%;
        text-align: center;
        white-space: normal;
    }
    .sched-day__num {
        width: 2.3rem;
        height: 2.3rem;
        font-size: 1rem;
    }
    .sched-day__title {
        font-size: 0.98rem;
    }
}

@media print {
    .schedule-actions,
    .nav-btn,
    header,
    footer {
        display: none !important;
    }
    .sched-day {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}
