/* /v2/assets/css/public-schedule.css
   Public programme schedule — full page and embed variant.
   Loaded after base.css (which defines --bg, --panel, --border, --text etc.)
   All classes use the .ps- prefix to avoid conflicts.
   No gradients, no decorative blobs, no emojis. Border-radius: 8px throughout.
*/

/* ── Page shell ───────────────────────────────────────────────────────────────
   Override base.css's html,body { height:100% } so the public page scrolls
   naturally. Use flex column so the footer pins to bottom on short pages.
*/
.ps-page {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* Centre column: wider than the dashboard (1240px vs 960px) */
.ps-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Full-page public header ──────────────────────────────────────────────────*/
.ps-header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 28px 0 24px;
    flex-shrink: 0;
}
.ps-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.ps-header-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.ps-header-logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--red-live);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: -0.03em;
}
.ps-header-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}
.ps-header-station {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ps-header-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}
.ps-header-sub {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}
.ps-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 8px;
}
.ps-listen-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    background: var(--red-live);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.ps-listen-btn:hover { background: #c50a0a; }
.ps-listen-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    animation: ps-live-pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}

/* ── Now/next summary strip ───────────────────────────────────────────────────*/
.ps-now-strip {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    flex-shrink: 0;
}
.ps-now-strip-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 36px;
}
.ps-now-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}
.ps-now-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-dim);
    flex-shrink: 0;
}
.ps-now-label--live { color: var(--red-live); }
.ps-now-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red-live);
    flex-shrink: 0;
    animation: ps-live-pulse 2.2s ease-in-out infinite;
}
.ps-now-programme {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    font-size: 14px;
}
.ps-now-time {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}
.ps-now-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}
.ps-now-empty {
    font-size: 14px;
    color: var(--text-dim);
    font-style: italic;
}

@keyframes ps-live-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ── Day navigation (sticky) ──────────────────────────────────────────────────*/
.ps-day-nav-wrap {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 var(--border);
    flex-shrink: 0;
}
.ps-day-nav-inner {
    display: flex;
    align-items: stretch;
}
.ps-week-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.12s, background 0.12s;
}
.ps-week-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.ps-week-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ps-day-tabs {
    display: flex;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.ps-day-tabs::-webkit-scrollbar { display: none; }

.ps-day-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 20px 16px;
    text-decoration: none;
    color: var(--text-muted);
    line-height: 1;
    gap: 5px;
    border-bottom: 3px solid transparent;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
    white-space: nowrap;
    scroll-snap-align: center;
    cursor: pointer;
    min-width: 88px;
}
.ps-day-tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }

.ps-day-tab-name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ps-day-tab-num {
    font-size: 24px;
    font-weight: 700;
    color: inherit;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.ps-day-tab--active {
    color: var(--text);
    border-bottom-color: var(--red-live);
}
.ps-day-tab--active .ps-day-tab-num { color: var(--red-live); }

.ps-day-tab--today .ps-day-tab-name::after {
    content: '·';
    color: var(--red-live);
    margin-left: 3px;
    font-size: 16px;
    line-height: 0;
    vertical-align: middle;
}

.ps-today-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    margin: auto 10px auto 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--red-live);
    background: transparent;
    border: 1px solid rgba(224,12,12,0.3);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
    cursor: pointer;
    align-self: center;
}
.ps-today-btn:hover { background: rgba(224,12,12,0.08); border-color: var(--red-live); }

/* ── Schedule section ─────────────────────────────────────────────────────────*/
.ps-schedule-section {
    padding: 40px 0 60px;
    flex: 1; /* grows to fill available height → footer pins to bottom */
}

.ps-schedule-date-heading {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ps-schedule-date-heading time { color: var(--text); }

/* ── Programme card grid ──────────────────────────────────────────────────────
   Two columns on medium+ desktops; single column below ~1060px viewport.
   auto-fill prevents stretching a single card to full width at >1col breakpoints;
   1fr still lets it grow to fill a single column on narrow viewports.
*/
.ps-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 14px;
}

/* ── Programme card ───────────────────────────────────────────────────────────*/
.ps-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.12s;
    position: relative;
}
.ps-card--live_studio { background: color-mix(in srgb, #e00c0c 5%, var(--panel)); }
.ps-card--autodj      { background: color-mix(in srgb, #3b9eff 4%, var(--panel)); }

/* Fallback for browsers without color-mix (Safari < 16.2, Firefox < 113) */
@supports not (background: color-mix(in srgb, red 1%, white)) {
    .ps-card--live_studio { background: var(--panel); border-left: 3px solid rgba(224,12,12,0.4); }
    .ps-card--autodj      { background: var(--panel); border-left: 3px solid rgba(59,158,255,0.35); }
}

.ps-card--cancelled { opacity: 0.55; }
.ps-card--now { border-color: rgba(224,12,12,0.45); }
.ps-card--next { border-color: rgba(255,197,61,0.3); }

/* ── Time column ──────────────────────────────────────────────────────────────*/
.ps-card-time {
    flex-shrink: 0;
    width: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 2px;
}
.ps-card-start {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.02em;
}
.ps-card-end {
    font-size: 13px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* ── Artwork ──────────────────────────────────────────────────────────────────*/
.ps-card-art {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: var(--panel-2, #181d27);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ps-card-art--live_studio { background: rgba(224,12,12,0.10); }
.ps-card-art--autodj      { background: rgba(59,158,255,0.10); }
.ps-art-icon {
    width: 44%;
    height: 44%;
    position: relative;
    z-index: 1;
}
.ps-card-art--live_studio .ps-art-icon { stroke: rgba(224,12,12,0.55); fill: none; stroke-width: 1.5; }
.ps-card-art--autodj      .ps-art-icon { stroke: rgba(59,158,255,0.55); fill: none; stroke-width: 1.5; }
.ps-card-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
    z-index: 2;
}

/* ── Card body ────────────────────────────────────────────────────────────────*/
.ps-card-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}
.ps-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    line-height: 1.25;
    overflow-wrap: break-word;
}
.ps-title--cancelled {
    text-decoration: line-through;
    color: var(--text-muted);
}
.ps-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    row-gap: 5px;
}
.ps-card-team {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}
.ps-team-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}
.ps-card-show {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Card status (NOW / NEXT / CANCELLED) ─────────────────────────────────────*/
.ps-card-status {
    flex-shrink: 0;
    padding-top: 3px;
}

/* ── Type badges ──────────────────────────────────────────────────────────────*/
.ps-type-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ps-type-badge--live_studio {
    background: rgba(224,12,12,0.15);
    color: #ff6b6b;
}
.ps-type-badge--autodj {
    background: rgba(59,158,255,0.15);
    color: #7dbfff;
}

/* ── Status badges ────────────────────────────────────────────────────────────*/
.ps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.ps-badge--now {
    background: rgba(224,12,12,0.15);
    color: #ff6b6b;
    border: 1px solid rgba(224,12,12,0.3);
}
.ps-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red-live);
    flex-shrink: 0;
    animation: ps-live-pulse 2.2s ease-in-out infinite;
}
.ps-badge--next {
    background: rgba(255,197,61,0.12);
    color: #ffc53d;
    border: 1px solid rgba(255,197,61,0.25);
}
.ps-badge--cancelled {
    background: rgba(90,105,120,0.15);
    color: var(--text-dim);
    border: 1px solid rgba(90,105,120,0.2);
}
.ps-badge--completed {
    background: rgba(82,196,26,0.10);
    color: rgba(82,196,26,0.7);
    border: 1px solid rgba(82,196,26,0.15);
}

/* ── Empty state ──────────────────────────────────────────────────────────────*/
.ps-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    gap: 16px;
}
.ps-empty-icon {
    width: 56px;
    height: 56px;
    color: var(--text-dim);
}
.ps-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.ps-empty-text {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
    max-width: 380px;
    line-height: 1.6;
}

/* ── Public page footer ───────────────────────────────────────────────────────*/
.ps-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    flex-shrink: 0;
}
.ps-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ps-footer-text {
    font-size: 14px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.6;
}
.ps-footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.ps-footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}
.ps-footer-link:hover { color: var(--text); }

/* ── Embed header (compact top bar for iframe) ────────────────────────────────*/
.ps-embed-header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    flex-shrink: 0;
}
.ps-embed-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ps-embed-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ps-embed-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background: var(--red-live);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: -0.03em;
}
.ps-embed-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.ps-embed-date-str {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.ps-embed-now {
    text-align: right;
    flex-shrink: 0;
    max-width: 50%;
}
.ps-embed-now-prog {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.ps-embed-now-prog::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red-live);
    margin-right: 5px;
    vertical-align: middle;
    animation: ps-live-pulse 2.2s ease-in-out infinite;
}
.ps-embed-next-prog {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ── Embed-specific layout tweaks ─────────────────────────────────────────────*/
.ps-embed .ps-wrap {
    max-width: 100%; /* fill iframe width; avoid awkward centering in narrow embeds */
    padding: 0 16px;
}
.ps-embed .ps-schedule-section { padding: 16px 0 20px; }
.ps-embed .ps-footer { padding: 12px 0; }
.ps-embed .ps-footer-text { text-align: center; font-size: 13px; }

/* ── Compact mode (embed ?compact=1) ──────────────────────────────────────────
   Scaled down from the new larger base sizes.
   Compact is an embed-only mode; should not affect the full public page.
*/
.ps-compact .ps-card { padding: 14px 18px; gap: 14px; }
.ps-compact .ps-card-art { width: 64px; height: 64px; }
.ps-compact .ps-card-start { font-size: 22px; }
.ps-compact .ps-card-end { font-size: 12px; }
.ps-compact .ps-card-time { width: 58px; }
.ps-compact .ps-card-title { font-size: 15px; margin-bottom: 5px; }
.ps-compact .ps-card-show { display: none; }
.ps-compact .ps-schedule { gap: 6px; }
.ps-compact .ps-schedule-section { padding: 12px 0 16px; }

/* ── Responsive: tablet ───────────────────────────────────────────────────────*/
@media (max-width: 900px) {
    .ps-wrap { padding: 0 20px; }
    .ps-header { padding: 20px 0 18px; }
    .ps-header-logo-mark { width: 48px; height: 48px; font-size: 17px; }
    .ps-header-title { font-size: 26px; }
    .ps-header-sub { font-size: 14px; }
    .ps-listen-btn { font-size: 14px; padding: 10px 20px; }
    .ps-day-tab { min-width: 72px; padding: 12px 16px 14px; }
    .ps-day-tab-num { font-size: 20px; }
    .ps-card { padding: 18px 20px; gap: 16px; }
    .ps-card-art { width: 96px; height: 96px; }
    .ps-card-start { font-size: 26px; }
    .ps-card-time { width: 72px; }
    .ps-card-title { font-size: 18px; }
    .ps-schedule-section { padding: 28px 0 48px; }
    .ps-schedule-date-heading { font-size: 18px; margin-bottom: 18px; }
}

/* ── Responsive: mobile ───────────────────────────────────────────────────────*/
@media (max-width: 640px) {
    .ps-wrap { padding: 0 14px; }
    .ps-header { padding: 16px 0; }
    .ps-header-inner { flex-direction: column; gap: 12px; }
    .ps-header-logo-mark { width: 42px; height: 42px; font-size: 15px; }
    .ps-header-title { font-size: 22px; }
    .ps-header-sub { font-size: 13px; }
    .ps-header-actions { align-self: flex-start; }
    .ps-listen-btn { font-size: 13px; padding: 9px 16px; }
    .ps-now-programme { max-width: 180px; }
    .ps-now-strip { padding: 10px 0; }
    .ps-day-tab { min-width: 60px; padding: 10px 12px 12px; }
    .ps-day-tab-num { font-size: 17px; }
    .ps-day-tab-name { font-size: 10px; }
    .ps-week-btn { padding: 10px 12px; font-size: 12px; }
    .ps-today-btn { font-size: 11px; padding: 6px 10px; }
    .ps-card { padding: 16px 18px; gap: 14px; }
    .ps-card-art { width: 88px; height: 88px; }
    .ps-card-start { font-size: 22px; }
    .ps-card-end { font-size: 12px; }
    .ps-card-time { width: 62px; }
    .ps-card-title { font-size: 16px; margin-bottom: 7px; }
    .ps-card-team { font-size: 12px; }
    .ps-card-show { font-size: 12px; }
    .ps-schedule { gap: 10px; }
    .ps-schedule-section { padding: 20px 0 36px; }
    .ps-schedule-date-heading { font-size: 16px; margin-bottom: 14px; }
    .ps-footer-text { font-size: 13px; }
    .ps-footer-link { font-size: 13px; }
}

/* ── Responsive: small mobile ────────────────────────────────────────────────*/
@media (max-width: 400px) {
    .ps-wrap { padding: 0 10px; }
    .ps-card { padding: 12px 14px; gap: 10px; }
    .ps-card-art { width: 72px; height: 72px; }
    .ps-card-start { font-size: 20px; }
    .ps-card-time { width: 54px; }
    .ps-card-title { font-size: 15px; }
    .ps-day-tab { min-width: 52px; padding: 8px 10px 10px; }
    .ps-day-tab-num { font-size: 15px; }
    .ps-now-divider { display: none; }
    .ps-now-strip-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ps-embed-now { max-width: 100%; text-align: left; }
    .ps-embed-header-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ps-compact .ps-card-art { display: none; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
    .ps-listen-dot,
    .ps-now-dot,
    .ps-badge-dot,
    .ps-embed-now-prog::before {
        animation: none;
        opacity: 0.9;
    }
}
