/* ==========================================================================
 Aura Music - Components & Modals
 ========================================================================== */

/* Top Bar */
.top-app-bar {
 padding: calc(var(--safe-top) + 14px) 18px 12px;
 background: rgba(10, 10, 15, 0.85);
 backdrop-filter: blur(20px);
 -webkit-backdrop-filter: blur(20px);
 display: flex;
 align-items: center;
 justify-content: space-between;
 z-index: 20;
 border-bottom: 1px solid var(--border);
}

.brand {
 display: flex;
 align-items: center;
 gap: 10px;
}

.brand-icon {
 width: 34px;
 height: 34px;
 background: linear-gradient(135deg, #1db954, #00d26a);
 border-radius: 10px;
 display: flex;
 align-items: center;
 justify-content: center;
 color: #000;
 font-size: 17px;
 box-shadow: 0 4px 15px var(--accent-glow);
}

.brand-logo-img {
 width: 34px;
 height: 34px;
 border-radius: 10px;
 object-fit: cover;
 box-shadow: 0 4px 15px var(--accent-glow);
 border: 1px solid rgba(29, 185, 84, 0.3);
 transition: transform 0.2s ease;
}

.brand-logo-img:active {
 transform: scale(0.92);
}

.brand-name {
 font-size: 18px;
 font-weight: 800;
 letter-spacing: -0.4px;
 background: linear-gradient(135deg, #fff 40%, #9696ab);
 -webkit-background-clip: text;
 -webkit-text-fill-color: transparent;
}

.top-actions {
 display: flex;
 align-items: center;
 gap: 8px;
}

.top-btn {
 width: 34px;
 height: 34px;
 border-radius: 50%;
 background: var(--bg-surface);
 border: 1px solid var(--border);
 color: var(--text-secondary);
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 13px;
 cursor: pointer;
 transition: all 0.2s ease;
}

.top-btn:active {
 transform: scale(0.92);
 color: var(--text-primary);
 background: var(--bg-card);
}

#pwa-install-btn {
 background: rgba(29, 185, 84, 0.15);
 border-color: rgba(29, 185, 84, 0.35);
 color: var(--accent);
}

/* Bottom Navigation Bar */
.bottom-nav {
 height: calc(var(--nav-height) + var(--safe-bottom));
 padding-bottom: var(--safe-bottom);
 background: rgba(10, 10, 15, 0.94);
 backdrop-filter: blur(24px);
 -webkit-backdrop-filter: blur(24px);
 border-top: 1px solid var(--border);
 display: flex;
 align-items: center;
 justify-content: space-around;
 z-index: 25;
}

.nav-tab {
 flex: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 4px;
 color: var(--text-muted);
 cursor: pointer;
 transition: all 0.2s ease;
 height: 100%;
}

.nav-tab.active {
 color: var(--accent);
}

.nav-tab.active .nav-icon {
 transform: scale(1.1);
}

.nav-icon {
 font-size: 18px;
 transition: transform 0.2s ease;
}

.nav-label {
 font-size: 11px;
 font-weight: 700;
 letter-spacing: -0.1px;
}

/* Modal Dialog & Bottom Sheet */
.modal-backdrop {
 position: absolute;
 inset: 0;
 background: rgba(0, 0, 0, 0.75);
 backdrop-filter: blur(8px);
 -webkit-backdrop-filter: blur(8px);
 z-index: 80;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.3s ease;
 display: flex;
 align-items: flex-end;
}

.modal-backdrop.open {
 opacity: 1;
 pointer-events: auto;
}

.modal-dialog {
 width: 100%;
 background: var(--bg-surface);
 border-top: 1px solid var(--border);
 border-radius: 24px 24px 0 0;
 padding: 24px 20px calc(var(--safe-bottom) + 24px);
 transform: translateY(100%);
 transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
 display: flex;
 flex-direction: column;
 gap: 16px;
 max-height: 80vh;
}

.modal-backdrop.open .modal-dialog {
 transform: translateY(0);
}

.modal-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
}

.modal-title {
 font-size: 18px;
 font-weight: 800;
 letter-spacing: -0.3px;
}

.modal-close {
 width: 32px;
 height: 32px;
 border-radius: 50%;
 background: var(--bg-card);
 display: flex;
 align-items: center;
 justify-content: center;
 color: var(--text-secondary);
 cursor: pointer;
}

.modal-input {
 background: var(--bg-card);
 border: 1px solid var(--border);
 color: var(--text-primary);
 padding: 14px 16px;
 border-radius: 12px;
 font-size: 14px;
 outline: none;
 transition: border-color 0.2s ease;
}

.modal-input:focus {
 border-color: var(--accent);
}

.modal-btn-primary {
 background: var(--accent);
 color: #000;
 border: none;
 border-radius: 12px;
 padding: 14px;
 font-size: 14px;
 font-weight: 700;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 box-shadow: 0 4px 20px var(--accent-glow);
}

.modal-btn-primary:active {
 transform: scale(0.98);
}

/* Playlist Picker inside Add to Playlist modal */
.picker-list {
 display: flex;
 flex-direction: column;
 gap: 8px;
 overflow-y: auto;
 max-height: 40vh;
}

.picker-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 10px 12px;
 border-radius: 12px;
 background: var(--bg-card);
 cursor: pointer;
 transition: background 0.15s ease;
}

.picker-item:active {
 background: var(--bg-card-hover);
}

.picker-icon {
 width: 40px;
 height: 40px;
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
 color: #fff;
 font-size: 16px;
 flex-shrink: 0;
}

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

.picker-name {
 font-size: 13px;
 font-weight: 700;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.picker-count {
 font-size: 11px;
 color: var(--text-muted);
}

.picker-check {
 font-size: 16px;
 color: var(--text-muted);
}

.picker-item.selected .picker-check {
 color: var(--accent);
}

/* Sleep Timer Modal Options */
.timer-options-grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 10px;
 margin-top: 6px;
}

.timer-option-btn {
 background: var(--bg-card);
 border: 1px solid var(--border);
 border-radius: 14px;
 padding: 14px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 color: var(--text-primary);
 cursor: pointer;
 transition: all 0.2s ease;
}

.timer-option-btn:active {
 transform: scale(0.97);
}

.timer-option-btn.active {
 background: rgba(29, 185, 84, 0.15);
 border-color: var(--accent);
 color: var(--accent);
}

.timer-option-btn .timer-opt-title {
 font-size: 14px;
 font-weight: 700;
}

.timer-option-btn .timer-opt-desc {
 font-size: 11px;
 color: var(--text-muted);
}

.timer-option-btn.active .timer-opt-desc {
 color: rgba(29, 185, 84, 0.8);
}
