/* iCifra 0.8.38 — compact player header, artist link, language selector on home only, compact sections.
   Loaded last so it settles the layered header rules of styles.css / redesign.css / dashboard.css in one place. */

/* Language selector: only on the home page. The chosen language keeps applying everywhere (i18n.js). */
body:not([data-view="homeView"]) .app-shell .topbar .language-switch{display:none!important}

/* Artist link under the title */
.song-heading .song-identity .song-artist-line{flex-basis:100%;margin:2px 0 0}
.song-heading .artist-link{color:var(--muted);text-decoration:none;border-radius:4px;overflow-wrap:anywhere}
.song-heading .artist-link:hover,.song-heading .artist-link:focus-visible{color:var(--accent-2);text-decoration:underline;text-underline-offset:2px}
.song-heading .artist-link[aria-disabled]{pointer-events:none}

/* Artist view inside Browse */
#browseView[data-artist] .page-head h1{overflow-wrap:anywhere}
#browseView .page-head .browse-all-songs{align-self:center;justify-self:start;width:auto;min-height:36px;padding:6px 14px;border:1px solid var(--line);border-radius:999px;font-size:13px;white-space:nowrap}
@media(max-width:760px){#browseView .page-head .browse-all-songs{align-self:flex-start;margin-top:4px}}

/* Header tools that exist only for the compact player header */
.song-heading .song-header-tool{display:none}
.song-heading-actions{position:relative}
.song-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:120;min-width:220px;max-width:min(300px,calc(100vw - 24px));padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 14px 36px #0007;display:grid;gap:2px}
.song-more-menu[hidden]{display:none}
.song-more-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 12px;border:0;border-radius:8px;background:none;color:var(--text);font:inherit;font-size:14px;text-align:left;cursor:pointer}
.song-more-menu button span{width:20px;text-align:center;color:var(--accent-2)}
.song-more-menu button:hover,.song-more-menu button:focus-visible{background:var(--surface-2);outline:none}

/* Phones and tablets: the player has ONE header row (back · title/artist · actions). The top bar of the app is
   folded away in the player and only comes back as a slim search row while searching. */
@media screen and (max-width:1100px){

 body[data-view="songView"] .song-view .song-heading{display:flex;align-items:center;gap:6px;min-height:0;margin:0;padding:max(4px,env(safe-area-inset-top)) 2px 4px;background:none;border:0;border-radius:0}
 body[data-view="songView"] .song-view .song-heading .song-identity{flex:1 1 auto;min-width:0;display:block}
 body[data-view="songView"] .song-view .song-heading .song-identity #songMeta{display:none}
 body[data-view="songView"] .song-view .song-heading .song-identity #songTitle{font-size:clamp(18px,4.6vw,24px);line-height:1.12;letter-spacing:-.02em;margin:0;overflow-wrap:anywhere}
 body[data-view="songView"] .song-view .song-heading .song-identity .song-artist-line{display:block;margin:1px 0 0;font-size:12px;line-height:1.25}
 body[data-view="songView"] .song-view .song-heading .song-identity #songArtist{font-size:12px;line-height:1.25;margin:0}
 body[data-view="songView"] .song-view .song-heading .song-heading-actions{display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:4px;max-width:none;align-items:center}
 body[data-view="songView"] .song-view .song-heading .icon-button{min-width:40px;width:auto;min-height:40px;padding:6px;border-radius:10px}
 body[data-view="songView"] .song-view .song-heading .icon-button.wide span{display:none}
 body[data-view="songView"] .song-view .song-heading .song-header-tool{display:inline-grid;place-items:center}
 body[data-view="songView"] .song-view .song-heading .song-header-tool svg{width:20px;height:20px}
 body[data-view="songView"] .song-view .song-heading #songVersionControl{display:none}
 body.performance[data-view="songView"] .song-view .song-heading .song-header-tool{display:none}
}
/* Phones: favorite, search and More stay in the header; fullscreen, setlist and edit move to More. */
@media screen and (max-width:600px){
 body:not(.performance)[data-view="songView"] .song-view .song-heading #mobileFullscreenBtn,
 body[data-view="songView"] .song-view .song-heading #addListBtn,
 body[data-view="songView"] .song-view .song-heading #editSongBtn{display:none}
}
@media screen and (max-width:340px){
 body[data-view="songView"] .song-view .song-heading .icon-button{min-width:38px;min-height:38px;padding:5px}
 body[data-view="songView"] .song-view .song-heading .song-identity #songTitle{font-size:17px}
}

/* Song sections: the label takes only its own line; sections are separated by a small, even gap. Blank lines at
   the start or end of a section (and repeated blank lines) collapse; a single blank line inside a section stays. */
#chordSheet .song-section{margin:0 0 .85em;padding-top:0}
#chordSheet .song-section:last-child{margin-bottom:0}
#chordSheet .section-label{margin:0 0 2px;padding:0 0 3px;line-height:1.3;min-height:0}
#chordSheet .song-line.blank{min-height:.9em}
/* A lyric line without chords has no chord row to reserve: no extra minimum height (it was left empty below it). */
#chordSheet .song-line.lyric-only{min-height:0;padding-top:.15em}
#chordSheet .section-label+.song-line.blank,
#chordSheet .song-line.blank:last-child,
#chordSheet .song-line.blank+.song-line.blank{display:none}
/* separate rules: a browser without :has() drops only these */
#chordSheet .song-line.blank:not(:has(~ .song-line:not(.blank))){display:none}
#chordSheet .song-line.blank:has(+.tab-block){display:none}

/* Update notice */
.update-banner{width:max-content;position:fixed;left:50%;bottom:calc(78px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:300;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 24px);padding:8px 8px 8px 14px;border:1px solid var(--accent-2);border-radius:12px;background:var(--surface);color:var(--text);box-shadow:0 12px 30px #0008;font-size:13px}
.update-banner[hidden]{display:none}
.update-banner span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.update-banner button{min-height:36px;padding:6px 14px;border:0;border-radius:9px;background:var(--accent-2);color:#04121a;font:inherit;font-weight:700;cursor:pointer}
@media print{.song-heading .song-header-tool,.song-more-menu,.update-banner{display:none!important}}

/* Stable song actions: labels may change without moving their neighbors. */
@media screen and (min-width:1101px){
 body[data-view="songView"] .song-heading .song-heading-actions{gap:8px;flex-wrap:wrap;max-width:none}
 body[data-view="songView"] .song-heading .song-heading-actions .icon-button:not(.song-header-tool){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:10px 14px;border-radius:11px;line-height:1.2;white-space:nowrap;background:var(--surface-2);border:1px solid var(--line)}
 body[data-view="songView"] .song-heading #favoriteBtn{width:120px;min-width:120px;flex:0 0 120px}
 body[data-view="songView"] .song-heading #addListBtn{width:100px;min-width:100px;flex:0 0 100px}
 body[data-view="songView"] .song-heading #editSongBtn{width:146px;min-width:146px;flex:0 0 146px}
 body[data-view="songView"] .song-heading #mobileFullscreenBtn{width:44px;min-width:44px;flex:0 0 44px;padding:10px}
 body[data-view="songView"] .song-heading .song-heading-actions .icon-button:hover{border-color:var(--accent-2)}
 body[data-view="songView"] .song-heading #favoriteBtn.active{color:var(--accent-2);border-color:var(--accent-2)}
}
