/* ══════════════════════════════════════════════════════
   UC Class Schedule — Front-end Styles
   All selectors scoped under .cs-schedule
   ══════════════════════════════════════════════════════ */

/* ── Google Font (loaded inline to avoid wp_enqueue_style dependency) ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ── RESET ── */
.cs-schedule,
.cs-schedule *,
.cs-schedule *::before,
.cs-schedule *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── BASE / VARIABLES ── */
.cs-schedule {
    --primary: #25379b;
    --primary-light: #3a4fba;
    --secondary: #047b41;
    --secondary-light: #05a357;

    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --card-border: #e2e4ec;
    --card-hover-border: #c5c9d8;
    --text: #1a1d2b;
    --text-muted: #6b7089;
    --day-header-bg: var(--primary);
    --day-header-text: #ffffff;

    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 3rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── HEADER ── */
.cs-schedule .cs-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.cs-schedule .cs-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.cs-schedule .cs-header h2 span {
    color: var(--secondary);
}

.cs-schedule .cs-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ── LEGEND ── */
.cs-schedule .cs-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.2rem;
    margin-bottom: 2.5rem;
}

.cs-schedule .cs-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.cs-schedule .cs-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── GRID LAYOUT ── */
.cs-schedule .cs-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
}

/* ── DAY COLUMN ── */
.cs-schedule .cs-day {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: cs-fadeSlideUp 0.5s ease both;
}

.cs-schedule .cs-day:nth-child(1) { animation-delay: 0.05s; }
.cs-schedule .cs-day:nth-child(2) { animation-delay: 0.10s; }
.cs-schedule .cs-day:nth-child(3) { animation-delay: 0.15s; }
.cs-schedule .cs-day:nth-child(4) { animation-delay: 0.20s; }
.cs-schedule .cs-day:nth-child(5) { animation-delay: 0.25s; }
.cs-schedule .cs-day:nth-child(6) { animation-delay: 0.30s; }
.cs-schedule .cs-day:nth-child(7) { animation-delay: 0.35s; }

.cs-schedule .cs-day-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-align: center;
    padding: 0.6rem 0.3rem;
    background: var(--day-header-bg);
    color: var(--day-header-text);
    border-radius: 8px;
}

/* ── CLASS CARD ── */
.cs-schedule .cs-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem 0.8rem;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cs-schedule .cs-card:hover {
    transform: translateY(-2px);
    border-color: var(--stripe-color, var(--card-hover-border));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cs-schedule .cs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stripe-color);
    border-radius: 10px 0 0 10px;
}

.cs-schedule .cs-card-time {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 0.25rem;
}

/* Fit-to-schedule time variant */
.cs-schedule .cs-card-time--fit {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.cs-schedule .cs-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

/* Link inside card name inherits the stripe colour */
.cs-schedule .cs-card-name a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.cs-schedule .cs-card-name a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.cs-schedule .cs-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── FIT-TO-SCHEDULE CARD modifier ── */
.cs-schedule .cs-card--fit {
    border-style: dashed;
}

/* ── NO CLASSES / REST DAY ── */
.cs-schedule .cs-rest {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.2rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-height: 80px;
    opacity: 0.5;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
    .cs-schedule .cs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .cs-schedule {
        padding: 2rem 1rem;
    }

    .cs-schedule .cs-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .cs-schedule .cs-day {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cs-schedule .cs-day-name {
        font-size: 1.3rem;
        padding: 0.5rem;
        background: transparent;
        border: none;
        border-bottom: 2px solid var(--primary);
        border-radius: 0;
        text-align: left;
        color: var(--primary);
    }

    .cs-schedule .cs-card {
        padding: 0.9rem 1rem 0.9rem 1.2rem;
    }

    .cs-schedule .cs-rest {
        min-height: 50px;
        padding: 0.8rem;
    }
}

/* ── ANIMATION ── */
@keyframes cs-fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
