:root {
    --mud-palette-primary: #7c4dff;
    --mud-palette-secondary: #ff4081;
    --mud-palette-background: #121212;
    --mud-palette-surface: #1e1e2e;
}

html, body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    height: 100%;
}

#app { height: 100vh; }

/* Setlist drag-drop */
.setlist-drop-zone {
    min-height: 60px;
    padding: 4px;
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}
.setlist-drop-zone.drag-over {
    border-color: #7c4dff;
    background: rgba(124,77,255,0.1);
}
.setlist-item-wrap { position: relative; padding-bottom: 3px; }
.setlist-drop-tail { position: relative; height: 10px; }
.setlist-item-wrap.drag-source-hidden { height: 0; padding-bottom: 0; overflow: hidden; }
.song-chip.drag-source-hidden-chip {
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border: none;
}
.drop-placeholder .song-chip {
    opacity: 0.6;
    border: 1px dashed #7c4dff;
    background: rgba(124,77,255,0.15) !important;
}
.song-chip { cursor: grab; user-select: none; transition: transform 0.15s, box-shadow 0.15s; }
.song-chip:active { cursor: grabbing; transform: scale(1.03); }
.song-chip.selected { opacity: 0.4; }

/* Show mode. dvh: on mobile, 100vh includes the area behind the browser chrome,
   pushing the bottom bar off-screen */
.show-mode-container { display: flex; height: 100vh; height: 100dvh; background: #0a0a0a; overflow: hidden; }

/* Clamp the Mud layout in show mode: MudMainContent always pads by the appbar
   height (even with no appbar rendered), which created a black top strip + scroll */
.show-layout { min-height: 0 !important; height: 100vh; height: 100dvh; overflow: hidden; }
.show-layout .mud-main-content { padding-top: 0 !important; height: 100%; }
.show-setlist-panel {
    width: 280px; min-width: 220px; background: #1a1a1a;
    border-right: 1px solid #333; overflow-y: auto; flex-shrink: 0;
}
.show-list-toggle { display: none !important; }
.show-list-backdrop { display: none; }

.show-next-bar {
    display: flex; align-items: center; gap: 8px;
    background: #141414; border-top: 1px solid #2a2a2a;
    padding: 8px 16px; cursor: pointer;
}
.show-next-bar:hover { background: #1c1c1c; }

/* Mobile: the song list becomes an overlay drawer toggled from the toolbar */
@media (max-width: 700px) {
    /* Single toolbar row: hide secondary labels so the title keeps its space */
    .show-toolbar { gap: 4px !important; }
    .show-toolbar-meta, .show-toolbar-fontlabel { display: none; }
    .bpm-btn { width: 44px; height: 44px; font-size: 0.6rem; }
    .show-list-toggle { display: inline-flex !important; }
    .show-setlist-panel {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 20;
        width: min(85vw, 320px);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.5);
    }
    .show-setlist-panel.open { transform: translateX(0); }
    .show-list-backdrop.open {
        display: block; position: fixed; inset: 0; z-index: 15;
        background: rgba(0,0,0,0.5);
    }
}
.show-setlist-panel .song-item {
    padding: 10px 16px; cursor: pointer;
    border-bottom: 1px solid #2a2a2a; transition: background 0.15s;
}
.show-setlist-panel .song-item:hover { background: #2a2a2a; }
.show-setlist-panel .song-item.active { background: #3a2a6a; border-left: 4px solid #7c4dff; }
.show-lyrics-panel {
    flex: 1; overflow-y: auto; padding: 24px;
    white-space: pre-wrap; line-height: 1.8;
    touch-action: pan-y; /* pinch ajusta a fonte via js/pinchzoom.js */
}

.show-font-controls { display: flex; align-items: center; }
/* Em telas touch o pinch na letra substitui os botões A-/A+ */
@media (pointer: coarse) {
    .show-font-controls { display: none; }
}

/* BPM button */
.bpm-btn {
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: #7c4dff; color: white; font-size: 0.7rem; font-weight: bold;
    cursor: pointer; transition: transform 0.05s; position: relative;
}
.bpm-btn.beat { transform: scale(1.15); background: #ff4081; animation: pulse-ring 0.15s ease-out; }
.bpm-btn-floating { position: absolute; top: 10px; right: 14px; z-index: 5; opacity: 0.85; }
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(255,64,129,0.6); }
    100% { box-shadow: 0 0 0 24px rgba(255,64,129,0); }
}

/* Card de banda: próximos shows em destaque no rodapé do card */
.band-upcoming { padding: 8px 16px 12px; background: rgba(124, 77, 255, 0.08); }
.band-upcoming-item {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0; cursor: pointer; font-size: 0.9rem; color: inherit;
}
.band-upcoming-item:hover .band-upcoming-title { text-decoration: underline; }
.band-upcoming-date {
    background: #3a2a6a; color: #cbb8ff; border-radius: 6px;
    padding: 1px 8px; font-size: 0.75rem; font-weight: 600;
    min-width: 52px; text-align: center; flex-shrink: 0;
}
.band-upcoming-date.today { background: #ff4081; color: #fff; }
.band-upcoming-title {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Página de músicas: no celular a tabela vira lista de cards */
.songs-mobile { display: none; }
@media (max-width: 700px) {
    .songs-desktop { display: none; }
    .songs-mobile { display: block; }
    .songs-search { flex: 1 1 100%; max-width: none !important; }
}
.song-card {
    display: flex; align-items: center; gap: 8px;
    background: #1e1e2e; border-radius: 8px;
    padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.song-card.inactive { opacity: 0.45; }
.song-card-main { flex: 1; min-width: 0; }
.song-card-title {
    font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-card-artist { font-size: 0.8rem; opacity: 0.6; }
.song-card-chips {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
    align-items: center; font-size: 0.7rem; opacity: 0.85;
}
.song-card-chips > span { background: #2a2a3e; border-radius: 10px; padding: 1px 8px; }
.song-card-actions { display: flex; flex-direction: column; align-items: center; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

/* Drag ghost */
.drag-ghost { opacity: 0.4; background: #7c4dff !important; }

/* Song dialog: lyrics textarea can be resized vertically by dragging its corner */
.song-lyrics-field textarea { resize: vertical; }
