/* Panel Boczny KS Perła Węgrów - Główne style | v1.0 */

:root {
    --panel-navy: #1a2332;
    --panel-gold: #d4af37;
    --panel-blue: #1a4c8b;
    --panel-win: #28a745;
    --panel-draw: #6c757d;
    --panel-loss: #dc3545;
    --panel-width: 400px;
    --panel-transition: 0.3s ease;
}

/* Przycisk trigger */
.sidebar-trigger-btn {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: var(--panel-navy);
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.3);
    transition: var(--panel-transition);
}

.sidebar-trigger-btn:hover {
    background: var(--panel-blue);
}

.sidebar-trigger-btn .arrow {
    color: var(--panel-gold);
    font-size: 14px;
    transition: transform 0.2s ease;
}

.sidebar-trigger-btn:hover .arrow:nth-child(1) { transform: translateX(-2px); }
.sidebar-trigger-btn:hover .arrow:nth-child(2) { transform: translateX(-4px); transition-delay: 0.05s; }
.sidebar-trigger-btn:hover .arrow:nth-child(3) { transform: translateX(-6px); transition-delay: 0.1s; }

/* Tooltip */
.sidebar-trigger-tooltip {
    position: fixed;
    top: 50%;
    right: 60px;
    transform: translateY(-50%) translateX(10px);
    background: var(--panel-navy);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    display: none;
    z-index: 997;
    transition: var(--panel-transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.sidebar-trigger-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--panel-navy);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--panel-transition);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Panel */
.sidebar-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: var(--panel-width);
    height: 100vh;
    background: #f5f5f5;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--panel-transition);
    box-shadow: -2px 0 20px rgba(0,0,0,0.2);
}

.sidebar-panel.active {
    right: 0;
}

/* Header */
.sidebar-header {
    background: linear-gradient(135deg, var(--panel-navy) 0%, #243447 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 3px solid var(--panel-gold);
}

.sidebar-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-header h2 span {
    color: var(--panel-gold);
}

.sidebar-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--panel-transition);
}

.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.2);
    color: var(--panel-gold);
}

/* Zakładki */
.sidebar-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.sidebar-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    transition: var(--panel-transition);
}

.sidebar-tab-btn.active {
    border-bottom-color: var(--panel-gold);
    font-weight: bold;
}

.sidebar-tab-btn:hover {
    background: #f9f9f9;
}

/* Zawartość */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-tab-content {
    display: none;
}

.sidebar-tab-content.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPORT CARDS - Nowy design z logami
   ═══════════════════════════════════════════════════════════════════════════ */

.sport-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.sport-card-header {
    background: linear-gradient(135deg, var(--panel-navy) 0%, #2a3a4d 100%);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sport-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.sport-card-header h3 i {
    color: var(--panel-gold);
}

.sport-card-header h3 span {
    color: #ffffff;
}

.sport-card-body {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Badge wyników */
.result-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-badge.result-win {
    background: var(--panel-win);
    color: white;
}

.result-badge.result-loss {
    background: var(--panel-loss);
    color: white;
}

.result-badge.result-draw {
    background: var(--panel-draw);
    color: white;
}

/* Badge typu meczu */
.match-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--panel-gold);
    color: var(--panel-navy);
}

/* Układ drużyn VS */
.match-versus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 10px;
}

.team-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.team-side .team-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.team-side .team-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--panel-navy);
    line-height: 1.2;
    max-width: 100px;
    word-wrap: break-word;
}

/* Wynik (dla ostatniego meczu) */
.score-display {
    flex-shrink: 0;
    padding: 0 10px;
}

.score-display .score {
    font-size: 28px;
    font-weight: 800;
    color: var(--panel-navy);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

/* VS (dla najbliższego meczu) */
.vs-display {
    flex-shrink: 0;
    padding: 0 10px;
}

.vs-display .vs {
    font-size: 18px;
    font-weight: 800;
    color: var(--panel-gold);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* Info o meczu */
.match-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

.match-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.match-info i {
    color: var(--panel-gold);
    font-size: 11px;
}

/* Info dla najbliższego meczu */
.next-match-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.info-row i {
    width: 16px;
    color: var(--panel-blue);
}

.info-row.location {
    color: #888;
    font-size: 12px;
}

/* Kolory obramowania dla wyniku */
.sport-card.result-win {
    border-left: 4px solid var(--panel-win);
}

.sport-card.result-loss {
    border-left: 4px solid var(--panel-loss);
}

.sport-card.result-draw {
    border-left: 4px solid var(--panel-draw);
}

/* Przycisk */
.sport-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--panel-blue);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    font-size: 13px;
    transition: var(--panel-transition);
}

.sport-btn:hover {
    background: var(--panel-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MINI TABELA LIGOWA - z logami
   ═══════════════════════════════════════════════════════════════════════════ */

.table-season {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: white;
}

.mini-table {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.table-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f0f0f0;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-header .pos {
    width: 30px;
    text-align: center;
}

.table-header .team-col {
    flex: 1;
}

.table-header .pts {
    width: 40px;
    text-align: center;
}

.table-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--panel-transition);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: #f9f9f9;
}

.table-row.highlight {
    background: linear-gradient(90deg, rgba(212,175,55,0.15) 0%, rgba(212,175,55,0.05) 100%);
    border-left: 3px solid var(--panel-gold);
}

.table-row .pos {
    width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--panel-navy);
}

.table-row.highlight .pos {
    color: var(--panel-gold);
}

.table-row .team-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.table-row .team-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--panel-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-row.highlight .team-name {
    font-weight: 700;
}

.table-row .pts {
    width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--panel-blue);
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
}

.table-row.highlight .pts {
    background: var(--panel-gold);
    color: var(--panel-navy);
}

.table-separator {
    text-align: center;
    padding: 8px;
    color: #ccc;
    font-size: 12px;
    background: #fafafa;
}

.table-separator span {
    letter-spacing: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ZAKŁADKA MEDIA - Posty Facebook + Social Icons
   ═══════════════════════════════════════════════════════════════════════════ */

.media-tab-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sekcja postów Facebook */
.fb-posts-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fb-posts-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.fb-posts-header i.fab {
    font-size: 18px;
}

.fb-posts-header span {
    flex: 1;
}

.fb-refresh-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--panel-transition);
}

.fb-refresh-btn:hover {
    background: rgba(255,255,255,0.3);
}

.fb-refresh-btn i {
    font-size: 12px;
}

/* Kontener postów */
.fb-posts-container {
    max-height: 500px;
    overflow-y: auto;
}

/* Loading */
.fb-posts-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #666;
}

.fb-posts-loading i {
    font-size: 24px;
    color: #1877f2;
}

/* Error */
.fb-posts-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
}

.fb-posts-error i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.fb-retry-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--panel-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--panel-transition);
}

.fb-retry-btn:hover {
    background: var(--panel-navy);
}

/* Empty state */
.fb-posts-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.fb-posts-empty i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

/* Demo notice */
.fb-demo-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #fff3cd;
    color: #856404;
    font-size: 12px;
    border-bottom: 1px solid #ffeeba;
}

.fb-demo-notice i {
    color: #f0ad4e;
}

/* Lista postów */
.fb-posts-list {
    display: flex;
    flex-direction: column;
}

/* Pojedynczy post */
.fb-post-item {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    transition: var(--panel-transition);
}

.fb-post-item:last-child {
    border-bottom: none;
}

.fb-post-item:hover {
    background: #f8f9fa;
}

/* Obrazek posta */
.fb-post-image {
    position: relative;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.fb-post-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.fb-post-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-post-play i {
    color: white;
    font-size: 14px;
    margin-left: 3px;
}

/* Treść posta */
.fb-post-content {
    flex: 1;
}

.fb-post-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.fb-post-text em {
    color: #999;
    font-style: italic;
}

/* Meta posta */
.fb-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
}

.fb-post-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fb-post-time i {
    font-size: 10px;
}

.fb-post-type i {
    font-size: 12px;
    color: #1877f2;
}

/* Przycisk "Zobacz wszystkie" */
.fb-see-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: #f0f2f5;
    color: #1877f2;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--panel-transition);
}

.fb-see-all-btn:hover {
    background: #1877f2;
    color: white;
}

.fb-see-all-btn i.fa-external-link-alt {
    font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEKCJA IKON SOCIAL MEDIA
   ═══════════════════════════════════════════════════════════════════════════ */

.social-icons-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-icons-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-align: center;
}

.social-icons-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-icon-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 20px;
    transition: var(--panel-transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.social-icon-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-icon-link.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
}

.social-icon-link.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon-link.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.social-icon-link.tiktok {
    background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
    background-size: 200% 200%;
}

/* Mobile styles dla Media */
@media (max-width: 768px) {
    .fb-posts-container {
        max-height: 450px;
    }

    .fb-post-image img {
        height: 100px;
    }

    .fb-post-text {
        font-size: 12px;
    }

    .fb-post-meta {
        font-size: 10px;
    }

    .social-icons-grid {
        gap: 10px;
    }

    .social-icon-link {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Stare style (zachowane dla kompatybilności) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.media-placeholder {
    aspect-ratio: 1;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.media-placeholder i {
    font-size: 32px;
    color: var(--panel-blue);
}

.media-btn {
    display: block;
    padding: 12px;
    background: white;
    color: var(--panel-navy);
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.media-btn:hover {
    background: var(--panel-blue);
    color: white;
}

/* Loading/Error */
.tab-loading, .tab-error, .tab-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.tab-error {
    color: var(--panel-loss);
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar-trigger-tooltip {
        display: none !important;
    }

    .sidebar-panel {
        width: 85vw;
        max-width: 320px;
        right: -320px;
    }

    .sidebar-trigger-btn {
        width: 45px;
        height: 70px;
    }

    .sidebar-content {
        padding: 15px;
    }

    .sport-card-body {
        padding: 12px;
    }

    /* Sport cards mobile */
    .team-side .team-logo {
        width: 40px;
        height: 40px;
    }

    .team-side .team-name {
        font-size: 11px;
        max-width: 80px;
    }

    .score-display .score {
        font-size: 22px;
    }

    .vs-display .vs {
        font-size: 14px;
    }

    .match-info {
        flex-wrap: wrap;
        gap: 8px;
    }

    .info-row {
        font-size: 12px;
    }

    .result-badge,
    .match-type-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* Mini tabela mobile */
    .table-team-logo {
        width: 20px;
        height: 20px;
    }

    .table-row .team-name {
        font-size: 12px;
    }

    .table-row .pos,
    .table-row .pts {
        font-size: 12px;
    }

    .table-row .pts {
        padding: 3px 6px;
    }

    .table-header {
        font-size: 10px;
        padding: 8px 10px;
    }

    .table-row {
        padding: 8px 10px;
    }

    .table-season {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ===== Zakładka RADIO ===== */
.radio-not-configured {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.radio-not-configured h3 {
    color: #1a2332;
    margin: 10px 0;
}

.radio-not-configured code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.radio-not-configured ol {
    line-height: 1.8;
    font-size: 14px;
}

.radio-playlists {
    padding: 5px 0;
}

.radio-playlist-section {
    margin-bottom: 30px;
}

.radio-playlist-section h3 {
    color: #1a2332;
    font-size: 16px;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.playlist-icon {
    font-size: 20px;
}

.playlist-desc {
    color: #666;
    font-size: 13px;
    margin: 0 0 15px 0;
}

.radio-episodes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-episode {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--panel-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.radio-episode:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateX(-2px);
}

.episode-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-date {
    font-size: 11px;
    color: #999;
}

.episode-play {
    font-size: 24px;
    color: var(--panel-gold);
    flex-shrink: 0;
    transition: var(--panel-transition);
}

.radio-episode:hover .episode-play {
    color: var(--panel-blue);
    transform: scale(1.1);
}

.radio-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background: white;
    color: var(--panel-blue);
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: var(--panel-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.radio-view-all:hover {
    background: var(--panel-blue);
    color: white;
}

@media (max-width: 768px) {
    .episode-thumb {
        width: 60px;
        height: 45px;
    }

    .episode-title {
        font-size: 12px;
    }

    .episode-date {
        font-size: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RADIO v2.0 - Embedded YouTube Player
   ═══════════════════════════════════════════════════════════════════════════ */

/* Przełącznik playlist */
.radio-playlist-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.radio-switch-btn {
    flex: 1;
    padding: 10px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--panel-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.radio-switch-btn:hover {
    border-color: var(--panel-blue);
    background: #f9f9f9;
}

.radio-switch-btn.active {
    background: var(--panel-navy);
    border-color: var(--panel-navy);
    color: white;
}

/* Główny player */
.radio-main-player {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.radio-player-wrapper {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
    max-height: 200px;
}

.radio-player-wrapper iframe {
    width: 100%;
    height: 100%;
}

#radio-player {
    width: 100%;
    height: 100%;
}

/* Info o aktualnie granym */
.radio-now-playing {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.radio-now-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--panel-navy);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.radio-now-meta {
    font-size: 12px;
    color: #888;
}

/* Kontrolki */
.radio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: #fafafa;
}

.radio-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--panel-navy);
    transition: var(--panel-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
}

.radio-control-btn:hover {
    background: var(--panel-blue);
    color: white;
    transform: scale(1.05);
}

.radio-play-btn {
    width: 52px;
    height: 52px;
    border: none;
    background: var(--panel-gold);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--panel-navy);
    transition: var(--panel-transition);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.radio-play-btn:hover {
    background: var(--panel-navy);
    color: var(--panel-gold);
    transform: scale(1.08);
}

.radio-yt-link {
    color: #ff0000 !important;
}

.radio-yt-link:hover {
    background: #ff0000 !important;
    color: white !important;
}

/* Sekcja playlist (slider) */
.radio-playlist-section {
    margin-bottom: 15px;
}

.radio-playlist-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--panel-navy);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Slider container */
.radio-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-slider-arrow {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--panel-navy);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: var(--panel-transition);
    z-index: 2;
}

.radio-slider-arrow:hover {
    background: var(--panel-blue);
    transform: scale(1.1);
}

/* Slider */
.radio-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
    flex: 1;
}

.radio-slider::-webkit-scrollbar {
    display: none;
}

/* Elementy slidera */
.radio-slider-item {
    flex-shrink: 0;
    width: 100px;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--panel-transition);
}

.radio-slider-item:hover {
    transform: scale(1.05);
}

.radio-slider-item.active {
    box-shadow: 0 0 0 3px var(--panel-gold);
}

.slider-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 25px;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--panel-transition);
}

.radio-slider-item:hover .slider-overlay,
.radio-slider-item.active .slider-overlay {
    opacity: 1;
}

.slider-overlay i {
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.radio-slider-item.active .slider-overlay {
    background: rgba(212, 175, 55, 0.4);
}

.slider-title {
    padding: 5px;
    font-size: 10px;
    color: #333;
    background: white;
    line-height: 1.2;
    height: 25px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Link do pełnej playlisty */
.radio-view-all-link {
    display: block;
    text-align: center;
    padding: 10px 15px;
    background: white;
    color: var(--panel-blue);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--panel-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.radio-view-all-link:hover {
    background: var(--panel-blue);
    color: white;
}

/* Link do YouTube (fallback) */
.radio-yt-external-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ff0000;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--panel-transition);
}

.radio-yt-external-link:hover {
    background: #cc0000;
    transform: scale(1.05);
}

/* Mobile styles dla Radio v2.0 */
@media (max-width: 768px) {
    .radio-switch-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .radio-player-wrapper {
        max-height: 170px;
    }

    .radio-now-title {
        font-size: 13px;
    }

    .radio-controls {
        gap: 6px;
        padding: 10px;
    }

    .radio-control-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .radio-play-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .radio-slider-item {
        width: 85px;
    }

    .slider-overlay i {
        font-size: 20px;
    }

    .slider-title {
        font-size: 9px;
        height: 22px;
    }

    .radio-slider-arrow {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* Facebook Page Plugin - kontener iframe */
.fb-plugin-container {
    position: relative;
    min-height: 520px;
    background: #f5f6f7;
}

.fb-page-plugin-iframe {
    width: 100%;
    height: 500px;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fb-plugin-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
    z-index: 1;
}

.fb-plugin-loading i {
    font-size: 24px;
    color: #1877f2;
}

/* Link zewnetrzny (zamiast przycisku odswiezania) */
.fb-external-link {
    background: rgba(255,255,255,0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--panel-transition);
    text-decoration: none;
}

.fb-external-link:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.fb-external-link i {
    font-size: 12px;
}

/* Mobile styles dla Facebook Plugin */
@media (max-width: 768px) {
    .fb-plugin-container {
        min-height: 470px;
    }
    
    .fb-page-plugin-iframe {
        height: 450px;
    }
}
