/* MappedSongs — Component Styles */

/* Mobile: sidebar scrolls, map gets at least 40vh */
@media (max-width: 767px) {
    .sidebar { max-height: 60vh; overflow-y: auto; }
    .search-dropdown { max-height: 180px; }
}

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }

/* Now Playing */
.now-playing { display: none; flex-direction: column; }
.now-playing.active { display: flex; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 9999px;
    vertical-align: middle;
    margin-right: 0.375rem;
    border: 2px solid #7c5cfc;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; filter: blur(0px); }
    50% { opacity: 1; filter: blur(2px); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Search */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    z-index: 2000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    background: #282828;
    border: 1px solid #333;
}
.search-dropdown-item {
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all 200ms;
    color: #b3b3b3;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-dropdown-item:hover { background: #333; color: #fff; }

/* Track Info */
.track-title { font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; color: #fff; }
.track-artist { font-size: 0.875rem; line-height: 1.25rem; font-weight: 300; color: #b3b3b3; }
.track-album { font-size: 0.75rem; line-height: 1rem; margin-top: 0.125rem; font-weight: 300; color: #535353; }

/* Badges */
.vibe-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    background: rgba(29, 185, 84, 0.15);
    border: 1px solid rgba(29, 185, 84, 0.3);
    color: #7c5cfc;
}
.weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    margin-top: 0.5rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

/* Misc */
.coords { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #535353; }

/* Location Tags */
.loc-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 500;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #a8a8b8;
}

/* Map Popup */
.map-popup .leaflet-popup-content-wrapper {
    background: #1a1a24;
    color: #e0e0e0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.map-popup .leaflet-popup-tip { background: #1a1a24; }
.map-popup .leaflet-popup-content { margin: 10px 14px; }

/* History */
.history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 200ms;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: #282828; }
.h-genre {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    line-height: 1rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(124, 92, 252, 0.1);
    color: #7c5cfc;
    margin-top: 0.125rem;
}
.h-song { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 0.8rem; color: #e0e0e0; }
.h-loc { font-size: 0.65rem; line-height: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #4a4a5a; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Sidebar Tabs */
.sidebar-tab {
    flex: 1;
    padding: 0.5rem 0.25rem;
    font-size: 0.6rem;
    font-weight: 600;
    color: #4a4a5a;
    background: transparent;
    border: none;
    border-top: 2px solid transparent;
    cursor: pointer;
    transition: all 200ms;
    text-align: center;
}
.sidebar-tab:hover { color: #a8a8b8; }
.sidebar-tab.active { color: #7c5cfc; border-top-color: #7c5cfc; }

/* Leaflet Overrides */
.leaflet-control-zoom a {
    background: #1a1a1a !important;
    color: #b3b3b3 !important;
    border-color: #333 !important;
}
.leaflet-control-zoom a:hover {
    background: #282828 !important;
    color: #fff !important;
}

/* Route & Simulation */
.active-mode {
    background: rgba(124, 92, 252, 0.2) !important;
    color: #7c5cfc !important;
    border: 1px solid rgba(124, 92, 252, 0.3);
}
.sim-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 200ms;
    background: #252533;
    color: #a8a8b8;
    border: 1px solid transparent;
}
.sim-btn:hover { background: #333; color: #fff; }
.sim-speed-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms;
    background: transparent;
    color: #4a4a5a;
    border: 1px solid transparent;
}
.sim-speed-btn:hover { color: #a8a8b8; }
.sim-speed-btn.active {
    background: rgba(124, 92, 252, 0.15);
    color: #7c5cfc;
    border-color: rgba(124, 92, 252, 0.3);
}
.mode-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 200ms;
    background: #252533;
    color: #4a4a5a;
    border: none;
}
.mode-btn:hover { color: #a8a8b8; }
.mode-btn.active { background: rgba(124, 92, 252, 0.2); color: #7c5cfc; }

/* Vibe Mixer Sliders */
.mixer-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #333;
    outline: none;
    cursor: pointer;
}
.mixer-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7c5cfc;
    cursor: pointer;
    border: 2px solid #0f0f14;
}
.mixer-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7c5cfc;
    cursor: pointer;
    border: 2px solid #0f0f14;
}
