/**
 * offline-manager.css - Estilos para los 3 modos PWA (Default / Offline / Full)
 * Controla: sidebar mode buttons, bottom nav visibility, download modal, offline indicator
 */

/* ===== MODO OFFLINE: oculta nav inferior y sidebar items completos ===== */
body.mode-offline #bottomNavBar {
    display: none;
}

body.mode-offline {
    padding-bottom: 0;
}

body.mode-offline .sidebar-full-items {
    display: none;
}

/* ===== SIDEBAR MODE BUTTONS ===== */
.sidebar-mode-buttons {
    padding: 8px 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-mode-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-mode-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.sidebar-mode-btn .mode-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-mode-btn .mode-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-mode-btn .mode-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-mode-btn .mode-label small {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

/* Offline button */
.sidebar-mode-btn[data-mode="offline"] .mode-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Online button */
.sidebar-mode-btn[data-mode="default"] .mode-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

/* Full button */
.sidebar-mode-btn[data-mode="full"] .mode-icon {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* Active mode button */
.sidebar-mode-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

.sidebar-mode-btn[data-mode="offline"].active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.sidebar-mode-btn[data-mode="full"].active {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
}

.sidebar-mode-btn.active .mode-label small {
    color: rgba(255,255,255,0.6);
}

/* Separator between mode buttons and full items */
.sidebar-mode-separator {
    height: 1px;
    margin: 8px 12px;
    background: rgba(255,255,255,0.08);
}

/* ===== OFFLINE DOWNLOAD MODAL ===== */
.offline-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.offline-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.offline-modal {
    background: #1a1a2e;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.offline-modal-overlay.visible .offline-modal {
    transform: scale(1);
}

.offline-modal-header {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.offline-modal-header .header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.offline-modal-header .header-icon svg {
    width: 24px;
    height: 24px;
    color: #34d399;
}

.offline-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.offline-modal-header p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 2px 0 0;
}

.offline-modal-body {
    padding: 0 20px 20px;
}

.offline-modal-info {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.offline-modal-info strong {
    color: white;
}

/* Progress section */
.offline-progress {
    display: none;
    margin-bottom: 16px;
}

.offline-progress.active {
    display: block;
}

.offline-progress-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.offline-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.offline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.offline-progress-song {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal buttons */
.offline-modal-actions {
    display: flex;
    gap: 8px;
}

.offline-modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-offline-download {
    background: #10b981;
    color: white;
}

.btn-offline-download:hover {
    background: #059669;
}

.btn-offline-cancel {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}

.btn-offline-cancel:hover {
    background: rgba(255,255,255,0.12);
}

/* ===== OFFLINE INDICATOR BADGE ===== */
.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 11px;
    font-weight: 600;
}

.offline-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    animation: offlinePulse 2s infinite;
}

@keyframes offlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== CACHED SONG INDICATOR ===== */
.song-cached-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #34d399;
    font-size: 10px;
    margin-left: 4px;
}

.song-cached-badge svg {
    width: 12px;
    height: 12px;
}
