/* =========================================================
   RADIO FAHOLO – WYSUWANY PANEL BOCZNY RAMÓWKI (ETAP 7)
   Plik: ramowka.css
   Styl w 100% odizolowany – nie modyfikuje głównego odtwarzacza.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --rf-accent: #e4b04a;
    --rf-accent-glow: rgba(228, 176, 74, 0.35);
    --rf-drawer-bg: #14171f;
    --rf-card-bg: #1c212b;
    --rf-card-hover: #232936;
    --rf-text-light: #ffffff;
    --rf-text-muted: #9aa5b5;
    --rf-live-red: #ef4444;
    --rf-border: rgba(255, 255, 255, 0.08);
    --rf-font: "Josefin Sans", sans-serif;
}

/* Blokada przewijania tła gdy panel jest otwarty */
body.drawer-open {
    overflow: hidden;
}

/* --- PRZYCIEMNIONE TŁO (BACKDROP) --- */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

body.drawer-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
}

/* --- PŁYWAJĄCY UCHWYT BOCZNY (TRIGGER TAB) --- */
.schedule-drawer-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
    outline: none;
}

.schedule-drawer-tab:hover {
    transform: translateY(-50%) translateX(-4px);
}

.tab-content {
    background: #171d29;
    border: 1px solid var(--rf-accent);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Pastelowo-pomarańczowa poświata i cień widoczny z każdej strony pod całym przyciskiem */
    box-shadow: 
        0 0 20px rgba(228, 176, 74, 0.5),
        -4px 0 28px rgba(228, 176, 74, 0.35),
        0 4px 20px rgba(228, 176, 74, 0.35),
        0 -4px 20px rgba(228, 176, 74, 0.35),
        -8px 0 30px rgba(0, 0, 0, 0.65);
    transition: box-shadow 0.25s ease;
}

.schedule-drawer-tab:hover .tab-content {
    box-shadow: 
        0 0 30px rgba(228, 176, 74, 0.7),
        -6px 0 36px rgba(228, 176, 74, 0.5),
        0 6px 26px rgba(228, 176, 74, 0.45),
        0 -6px 26px rgba(228, 176, 74, 0.45),
        -10px 0 35px rgba(0, 0, 0, 0.75);
}

.tab-chevron {
    color: var(--rf-accent);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.35s ease;
}

.tab-vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: var(--rf-font);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--rf-accent);
}

body.drawer-open .schedule-drawer-tab {
    transform: translateY(-50%) translateX(-420px);
}

body.drawer-open .tab-chevron {
    transform: rotate(180deg);
}

@media (max-width: 600px) {
    body.drawer-open .schedule-drawer-tab {
        transform: translateY(-50%) translateX(-100vw);
    }
}

/* --- WYSUWANY PANEL BOCZNY (DRAWER) --- */
.schedule-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: var(--rf-drawer-bg);
    border-left: 1px solid rgba(228, 176, 74, 0.25);
    box-shadow: -12px 0 45px rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--rf-text-light);
    box-sizing: border-box;
}

.schedule-drawer * {
    box-sizing: border-box;
}

body.drawer-open .schedule-drawer {
    transform: translateX(0);
}

/* --- NAGŁÓWEK PANELU --- */
.drawer-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rf-border);
    background: #11141a;
}

.drawer-header-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.drawer-header-tag {
    font-family: var(--rf-font);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--rf-accent);
}

.drawer-header-title {
    margin: 0;
    font-family: var(--rf-font);
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.drawer-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-header-clock {
    font-family: monospace;
    font-size: 13px;
    color: var(--rf-text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid var(--rf-border);
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--rf-text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.drawer-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* --- CIAŁO PANELU ZE SCROLLEM --- */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: #252e3e;
    border-radius: 3px;
}

/* --- KARTA ON AIR (TERAZ NA ANTENIE) --- */
.drawer-card {
    background: var(--rf-card-bg);
    border: 1px solid var(--rf-border);
    border-radius: 14px;
    padding: 16px;
}

.live-card {
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-left: 4px solid #4a90e2;
    background: linear-gradient(135deg, #16202e 0%, #131a24 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(74, 144, 226, 0.1);
}

.live-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 144, 226, 0.15);
    color: #7cb5ec;
    border: 1px solid #4a90e2;
    padding: 3px 9px;
    border-radius: 20px;
    font-family: var(--rf-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
}

.pulsing-live-dot {
    width: 7px;
    height: 7px;
    background-color: #4a90e2;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #4a90e2;
    animation: livePulseAnim 1.8s infinite;
}

@keyframes livePulseAnim {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 4px #4a90e2; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px #7cb5ec; }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 4px #4a90e2; }
}

.drawer-mini-play {
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid #4a90e2;
    color: #7cb5ec;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.15);
}

.drawer-mini-play:hover {
    background: rgba(74, 144, 226, 0.22);
    border-color: #7cb5ec;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.3);
}

.live-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    word-break: break-word;
}

.live-sub {
    margin: 0;
    font-size: 12px;
    color: var(--rf-text-muted);
    line-height: 1.45;
}

.live-progress-container {
    margin-top: 14px;
}

.live-progress-bar {
    width: 100%;
    height: 5px;
    background: #28303f;
    border-radius: 3px;
    overflow: hidden;
}

.live-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2 0%, #7cb5ec 100%);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.live-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--rf-text-muted);
    margin-top: 4px;
}

/* --- SEKCJA DNI TYGODNIA --- */
.drawer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--rf-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--rf-text-muted);
    margin-top: 4px;
}

.drawer-refresh-btn {
    background: transparent;
    border: none;
    color: var(--rf-accent);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
}

.drawer-refresh-btn:hover {
    text-decoration: underline;
}

.drawer-days-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--rf-card-bg);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--rf-border);
}

.day-tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--rf-border);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: var(--rf-text-muted);
    transition: all 0.15s ease;
}

.day-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(228, 176, 74, 0.35);
    color: #ffffff;
}

.day-tab-btn.active {
    background: var(--rf-accent);
    color: #0b0d12;
    border-color: var(--rf-accent);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(228, 176, 74, 0.3);
}

.day-tab-short {
    font-family: var(--rf-font);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-tab-date {
    font-size: 11px;
    font-weight: 600;
}

.day-tab-today-dot {
    font-size: 8px;
    font-weight: 800;
    color: var(--rf-live-red);
}

.day-tab-btn.active .day-tab-today-dot {
    color: #0b0d12;
}

.day-tab-btn.active .day-tab-today-dot {
    color: #0b0d12;
}

/* --- LISTA AUDYCJI --- */
.drawer-schedule-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-selected-day-label {
    font-family: var(--rf-font);
    font-size: 13px;
    font-weight: 700;
    color: var(--rf-accent);
    letter-spacing: 0.5px;
}

.drawer-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-drawer-msg {
    text-align: center;
    padding: 26px 16px;
    background: var(--rf-card-bg);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--rf-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.sched-card {
    background: var(--rf-card-bg);
    border: 1px solid var(--rf-border);
    border-radius: 12px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.sched-card:hover {
    border-color: rgba(228, 176, 74, 0.35);
    background: var(--rf-card-hover);
}

.sched-card.card-live {
    border-color: #4a90e2;
    background: linear-gradient(135deg, #1c212b 0%, #152233 100%);
    box-shadow: 0 0 14px rgba(74, 144, 226, 0.16);
}

.sched-card.card-finished {
    opacity: 0.6;
}

.sched-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sched-time-badge {
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--rf-accent);
}

.sched-pill {
    font-family: var(--rf-font);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.pill-live {
    background: rgba(74, 144, 226, 0.15);
    color: #7cb5ec;
    border: 1px solid #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.2);
}

.pill-finished {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rf-text-muted);
}

.pill-waiting {
    background: rgba(228, 176, 74, 0.15);
    color: var(--rf-accent);
    border: 1px solid rgba(228, 176, 74, 0.35);
}

.sched-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

.sched-card-desc {
    margin: 0;
    font-size: 12px;
    color: var(--rf-text-muted);
    line-height: 1.45;
}

.sched-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}

.sched-dur-tag {
    font-size: 11px;
    color: var(--rf-text-muted);
}

.calendar-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #252d3a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.calendar-add-btn:hover {
    background: #303a4b;
    border-color: var(--rf-accent);
    color: var(--rf-accent);
}
