/**
 * CFRO Component — Schedule Page (Figma v3)
 * @package CFRO
 * @since   4.2.0
 */

/* ── Page layout ── */
.cfro-schedule-page {
    padding: 3rem 0 4rem;
    background: var(--cfro-cream);
    min-height: 60vh;
}
.cfro-schedule-page .cfro-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Page header ── */
.cfro-schedule-header {
    margin-bottom: 2.5rem;
}
.cfro-schedule-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--cfro-charcoal);
    margin: 0 0 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.cfro-schedule-subtitle {
    color: var(--cfro-charcoal-light);
    font-size: 1.125rem;
    margin: 0;
}

/* ── Controls bar ── */
.cfro-schedule-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ── Day tabs (shared) ── */
.cfro-day-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cfro-day-tabs--desktop { display: none; }
.cfro-day-tabs--mobile  { display: flex; }

@media (min-width: 768px) {
    .cfro-day-tabs--desktop { display: flex; }
    .cfro-day-tabs--mobile  { display: none; }
}

/* Tablist inner wrapper — stretches between the two arrow buttons */
.cfro-day-tabs--desktop [role="tablist"] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

/* Arrow buttons (prev/next day) */
.cfro-day-tab__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(27,122,90,0.15);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--cfro-forest);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.cfro-day-tab__arrow:hover {
    background: rgba(27,122,90,0.05);
}

/* Individual day tab */
.cfro-day-tab {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    flex: 1;
    border: 1px solid rgba(27,122,90,0.12);
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--cfro-charcoal);
    font-family: var(--cfro-font-sans, Inter, sans-serif);
    white-space: nowrap;
}
.cfro-day-tab:hover {
    background: rgba(27,122,90,0.05);
}
.cfro-day-tab[aria-selected="true"],
.cfro-day-tab.is-active {
    background: var(--cfro-forest);
    color: #fff;
    border-color: var(--cfro-forest);
}
.cfro-day-tab.is-active:hover {
    background: var(--cfro-forest-light);
}

/* Mobile: single day label */
.cfro-day-tabs__current {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: var(--cfro-forest);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}

/* ── View toggle ── */
.cfro-view-toggles {
    display: flex;
    gap: 0.5rem;
}
.cfro-view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 1rem;
    flex: 1;
    border: 1px solid rgba(27,122,90,0.12);
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--cfro-charcoal);
    font-family: var(--cfro-font-sans, Inter, sans-serif);
    justify-content: center;
}
@media (min-width: 640px) {
    .cfro-view-btn { flex: none; }
}
.cfro-view-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.cfro-view-btn:hover {
    background: rgba(27,122,90,0.05);
}
.cfro-view-btn.is-active {
    background: var(--cfro-forest);
    color: #fff;
    border-color: var(--cfro-forest);
}

/* ── Schedule content area ── */
.cfro-schedule-content {
    min-height: 200px;
}
.cfro-schedule-loading,
.cfro-schedule-empty {
    text-align: center;
    color: var(--cfro-charcoal-light);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* ════════════════════════════════════════════════
 *  GRID VIEW — reuses .cfro-show-card from shows.css
 * ════════════════════════════════════════════════ */
.cfro-schedule-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px)  { .cfro-schedule-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cfro-schedule-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .cfro-schedule-grid { grid-template-columns: repeat(4, 1fr); } }

/* ════════════════════════════════════════════════
 *  LIST VIEW
 * ════════════════════════════════════════════════ */
.cfro-schedule-list {
    display: flex;
    flex-direction: column;
}
/* Divider between rows via border on container children */
.cfro-schedule-list > * + * {
    border-top: 1px solid rgba(27,122,90,0.10);
}

.cfro-schedule-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.cfro-schedule-slot:hover {
    background: rgba(232,245,238,0.3);   /* sage-pale/30 */
    text-decoration: none;
    color: inherit;
}

.cfro-schedule-slot__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}
.cfro-schedule-slot__time {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--cfro-charcoal);
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}
.cfro-schedule-slot__info {
    min-width: 0;
    flex: 1;
}
.cfro-schedule-slot__info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--cfro-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.cfro-schedule-slot:hover .cfro-schedule-slot__info h3 {
    color: var(--cfro-forest);
}
.cfro-schedule-slot__info .host {
    font-size: 0.875rem;
    color: var(--cfro-charcoal-light);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cfro-schedule-slot__arrow {
    color: rgba(90,90,90,0.4);
    flex-shrink: 0;
    transition: color 0.2s;
}
.cfro-schedule-slot:hover .cfro-schedule-slot__arrow {
    color: var(--cfro-forest);
}

@media (max-width: 639px) {
    .cfro-schedule-slot__time { width: auto; font-size: 0.75rem; }
}
