/* Vatican Radio Player Styles - Version 2.2 */

.vatican-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* ==================== WIDGET PLAYER ==================== */

.vatican-widget-player {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vatican-widget-header {
    background: linear-gradient(135deg, #7f1316 0%, #a31d21 100%);
    padding: 12px 15px;
    color: white;
}

.vatican-widget-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.vatican-widget-current {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.vatican-widget-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.vatican-widget-info {
    text-align: center;
}

.vatican-widget-title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.vatican-widget-subtitle {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.vatican-widget-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.vatican-widget-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
}

.vatican-widget-btn:hover {
    background: #e0e0e0;
}

.vatican-widget-play {
    background: linear-gradient(135deg, #7f1316 0%, #a31d21 100%);
    color: white;
    width: 48px;
    height: 48px;
}

.vatican-widget-play:hover {
    background: linear-gradient(135deg, #6b1114 0%, #8f191c 100%);
    transform: scale(1.05);
}

.vatican-widget-btn svg {
    display: block;
}

.vatican-widget-play svg {
    display: block;
}

/* Widget Playlist */
.vatican-widget-playlist-container {
    border-top: 1px solid #e0e0e0;
    max-height: 300px;
    overflow: hidden;
}

.vatican-widget-playlist-header {
    background: #f5f5f5;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.vatican-widget-playlist-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.vatican-widget-playlist-close:hover {
    background: #e0e0e0;
}

.vatican-widget-playlist-body {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.vatican-widget-playlist-body::-webkit-scrollbar {
    width: 6px;
}

.vatican-widget-playlist-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.vatican-widget-playlist-body::-webkit-scrollbar-thumb {
    background: #7f1316;
    border-radius: 10px;
}

/* Playlist Items in Widget */
.vatican-widget-playlist-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.vatican-widget-playlist-item:hover {
    background: #f8f8f8;
}

.vatican-widget-playlist-item.active {
    background: #ffe5e5;
}

.vatican-widget-playlist-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.vatican-widget-playlist-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.vatican-widget-playlist-item-info h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vatican-widget-playlist-item.active h5 {
    color: #7f1316;
    font-weight: 600;
}

/* ==================== PLAYER BAR (Footer) ==================== */

/* Player Bar - Thanh player chính ở cuối trang */
.vatican-player-bar {
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e0e0e0;
    display: none;
    position: relative;
}

.vatican-player-bar.active {
    display: block;
    animation: slideUpBar 0.3s ease;
}

@keyframes slideUpBar {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vatican-player-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Current Track Info */
.vatican-current-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.vatican-current-info img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.vatican-bar-text {
    flex: 1;
    min-width: 0;
}

.vatican-bar-text h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vatican-bar-text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls */
.vatican-bar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.vatican-bar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
}

.vatican-bar-btn:hover {
    background: #f0f0f0;
}

.vatican-bar-btn-play {
    background: linear-gradient(135deg, #7f1316 0%, #a31d21 100%);
    color: white;
    width: 40px;
    height: 40px;
}

.vatican-bar-btn-play:hover {
    background: linear-gradient(135deg, #6b1114 0%, #8f191c 100%);
    transform: scale(1.05);
}

.vatican-bar-btn svg {
    display: block;
}

.vatican-bar-btn-play svg {
    display: block;
}

/* Actions */
.vatican-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* Hidden YouTube Player */
#vaticanYoutubePlayer {
    display: none;
}

/* Playlist Panel - Mở từ dưới lên */
.vatican-playlist-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.vatican-playlist-panel.active {
    display: flex;
    animation: slideUpPanel 0.3s ease;
}

@keyframes slideUpPanel {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vatican-playlist-header {
    background: linear-gradient(135deg, #7f1316 0%, #a31d21 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vatican-playlist-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.vatican-playlist-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.vatican-playlist-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vatican-playlist-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

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

.vatican-playlist-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.vatican-playlist-body::-webkit-scrollbar-thumb {
    background: #7f1316;
    border-radius: 10px;
}

/* Playlist Items */
.vatican-playlist-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.vatican-playlist-item:hover {
    background: #f8f8f8;
}

.vatican-playlist-item.active {
    background: #ffe5e5;
}

.vatican-playlist-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.vatican-playlist-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.vatican-playlist-item-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vatican-playlist-item.active h5 {
    color: #7f1316;
    font-weight: 600;
}

/* Loading */
.vatican-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .vatican-player-bar-content {
        padding: 10px 15px;
    }

    .vatican-current-info img {
        width: 40px;
        height: 40px;
    }

    .vatican-bar-text h4 {
        font-size: 13px;
    }

    .vatican-bar-text p {
        font-size: 11px;
    }

    .vatican-bar-btn {
        width: 32px;
        height: 32px;
    }

    .vatican-bar-btn-play {
        width: 36px;
        height: 36px;
    }

    .vatican-playlist-panel {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 70px;
    }
}

@media (max-width: 480px) {
    .vatican-bar-controls {
        gap: 4px;
    }

    .vatican-bar-actions {
        gap: 4px;
    }

    .vatican-current-info {
        max-width: 40%;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vatican-loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #7f1316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}
