/* AASH.ONLINE — public Music page (music.php). Music-only styling that
   follows the site's dark-blue design language. */

/* display:flex/atomic rules must never defeat the hidden attribute —
   otherwise the player bar and the full-access prompt show on page load
   before the visitor has touched anything */
[hidden] { display: none !important; }

.music-page {
  /* full-bleed dark canvas — no white gaps left and right of the sections */
  background:
    radial-gradient(1000px 500px at 85% -5%, rgba(34, 211, 238, .08), transparent 55%),
    radial-gradient(800px 400px at 0% 30%, rgba(99, 102, 241, .10), transparent 55%),
    #0b1120;
  padding-bottom: 40px;   /* no sticky player any more */
}
/* the music page uses the ENTIRE screen — the site rule sets width, not
   just max-width, so both must be overridden */
.music-page .container { width: 100%; max-width: 100%; padding-left: 32px; padding-right: 32px; }

/* every music block is a tinted, rounded card */
.m-section {
  background: rgba(15, 24, 44, .72);
  border: 1px solid #1c2a47;
  border-radius: 18px;
  padding: 24px;
  margin-top: 22px;
}
.m-section .container { max-width: none; }

/* the site theme writes headings in dark ink (it is a light-theme site);
   on the music page's dark canvas that text disappears — force the
   music palette on every heading inside the page and the modal */
.music-page h1, .music-page h2, .music-page h3 { color: #e6edf8 !important; }
.m-hero h1 span { color: #22d3ee !important; }
.m-hint { color: #7c8db0; }
.m-legal { color: #64748b; }
.m-modal-box, .m-modal-box h3 { color: #e6edf8; }

.m-hero {
  position: relative;
  z-index: 2;
  overflow: visible;
  background: radial-gradient(1200px 400px at 20% -10%, rgba(34, 211, 238, .14), transparent 60%), #0b1120;
  border-bottom: 1px solid #22304f;
  padding: 64px 0 40px;
}
/* music artwork fills the player side of the hero — faded out to the left so
   the headline and search stay perfectly readable */
.m-hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('/assets/img/music-hero.svg') right center / cover no-repeat;
  opacity: .9;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 34%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 34%, #000 62%);
}
.m-hero-inner { position: relative; z-index: 1; }
.m-eyebrow { font-size: .8rem; letter-spacing: .18em; color: #22d3ee; font-weight: 700; }
.m-hero h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); margin: 10px 0 12px; line-height: 1.1; }
.m-hero h1 span { color: #22d3ee; }
.m-sub { color: #93a3bd; max-width: 620px; margin: 0 0 24px; font-size: 1.08rem; line-height: 1.6; }

.m-search {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: #111c33; border: 1px solid #22304f; border-radius: 14px;
  padding: 10px 12px; max-width: 680px;
}
.m-search-glyph { color: #22d3ee; font-size: 1.3rem; padding-left: 6px; }
.m-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: #e6edf8; font-size: 1.08rem; min-width: 0;
}
.m-search input::placeholder { color: #64748b; }
.m-clear { background: none; border: 0; color: #93a3bd; cursor: pointer; font-size: 1rem; }

/* live search suggestions under the search field */
.m-suggest {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 8px); z-index: 60;
  min-width: min(360px, calc(100vw - 32px));
  max-height: 340px; overflow-y: auto;
  background: #0f172a; border: 1px solid #22304f; border-radius: 12px;
  padding: 6px; box-shadow: 0 22px 48px rgba(2, 6, 23, .55);
}
.m-suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.m-suggest-item[aria-selected="true"] { background: rgba(34, 211, 238, .12); }
.m-suggest-loading { padding: 12px 10px; color: #93a3bd; font-size: .88rem; }
.m-sug-icon { flex: none; width: 18px; text-align: center; color: #22d3ee; font-size: .86rem; }
.m-sug-text { flex: 1; min-width: 0; }
.m-sug-title {
  display: block; color: #e6edf8; font-size: .92rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-sug-artist {
  display: block; color: #64748b; font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-sug-kind {
  flex: none; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  color: #22d3ee; background: rgba(34, 211, 238, .10);
  border-radius: 999px; padding: 2px 7px;
}

/* hero split: copy on the left, Now Playing card on the right */
.m-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 40px;
  align-items: center;
}
.m-now {
  background: rgba(15, 24, 44, .72);
  border: 1px solid #1c2a47;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-now-top { display: flex; align-items: center; gap: 12px; }
.m-now img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; }
.m-now-meta { flex: 1; min-width: 0; }
.m-now-label { display: block; font-size: .74rem; letter-spacing: .16em; color: #22d3ee; font-weight: 700; margin-bottom: 3px; }
.m-now-meta strong { display: block; color: #e6edf8; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-now-meta > span:last-child { display: block; color: #93a3bd; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-now-bar { display: flex; align-items: center; gap: 10px; }
.m-now-bar > span { font-size: .78rem; color: #7c8db0; min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.m-now-track-nav { display: flex; justify-content: space-between; gap: 8px; }
.m-now-track-nav .m-video-btn { flex: 1; }

.m-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.m-chip {
  background: #111c33; border: 1px solid #22304f; color: #c3d0e5;
  border-radius: 999px; padding: 8px 18px; font-size: .92rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.m-chip:hover { border-color: #22d3ee; color: #e6edf8; }
.m-chip.is-active { background: rgba(34, 211, 238, .12); border-color: #22d3ee; color: #22d3ee; font-weight: 600; }

/* vertical rhythm only — the side padding comes from the page container */
.m-section { padding-block: 36px 8px; scroll-margin-top: 84px; }
.m-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.m-section-head h2 { margin: 0; font-size: 1.2rem; }
.m-hint { color: #64748b; font-size: .9rem; }

.m-note {
  background: rgba(34, 211, 238, .07); border: 1px solid rgba(34, 211, 238, .25);
  color: #a5f3fc; border-radius: 10px; padding: 12px 14px; font-size: .94rem; margin-bottom: 14px;
}

/* Wide rows read better than many narrow columns — cap the playlist at
   four across, and drop a column at a time as the screen narrows. */
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.m-row {
  display: flex; align-items: center; gap: 12px;
  background: #111c33; border: 1px solid #22304f; border-radius: 12px; padding: 12px;
}
.m-row.is-playing { border-color: #22d3ee; }
.m-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; background: #0f172a; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-dur {
  position: absolute; right: 3px; bottom: 3px; font-size: .68rem;
  background: rgba(2, 6, 23, .78); color: #e2e8f0; padding: 1px 4px; border-radius: 4px;
}
.m-meta { flex: 1; min-width: 0; }
.m-meta strong { display: -webkit-box; color: #e6edf8; font-size: .92rem; font-weight: 600; line-height: 1.35; white-space: normal; overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.m-meta span { display: block; color: #64748b; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.m-play {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #22d3ee; background: rgba(34, 211, 238, .12); color: #22d3ee;
  font-size: 1rem; cursor: pointer; transition: background .15s;
}
.m-play:hover { background: rgba(34, 211, 238, .25); }
.m-play { position: relative; }
.m-play-locked {
  border-color: rgba(34, 211, 238, .5);
  color: #22d3ee;
  background: rgba(34, 211, 238, .07);
}
.m-play-locked::after {
  content: '🔒';
  position: absolute;
  right: -4px;
  bottom: -4px;
  font-size: .55rem;
  line-height: 1;
}
.m-play-locked:hover { background: rgba(34, 211, 238, .18); }

/* YouTube rows: ▶ opens the video, MP3 plays the audio-only stream */
.m-play-web { border-color: rgba(34, 211, 238, .5); }
.m-mp3 {
  flex: none; border: 1px solid rgba(34, 211, 238, .4);
  background: rgba(34, 211, 238, .08); color: #22d3ee;
  border-radius: 8px; padding: 8px; font-size: .72rem;
  font-weight: 700; letter-spacing: .06em; cursor: pointer;
  transition: background .15s;
}
.m-mp3:hover { background: rgba(34, 211, 238, .22); }
.m-row.is-loading .m-play { cursor: progress; opacity: .55; }
.m-row.is-loading .m-mp3 { cursor: progress; opacity: .55; }

.m-get {
  flex: none; border: 1px solid #22304f; background: none; color: #93a3bd;
  border-radius: 8px; padding: 9px 13px; font-size: .88rem; cursor: pointer;
}
.m-get:hover { border-color: #22d3ee; color: #22d3ee; }

/* phones: keep ▶ / MP3 / download on one line by turning the download
   label into an icon (the button keeps its accessible "Download" name) */
@media (max-width: 700px) {
  .m-row .m-get { padding: 9px 11px; font-size: 0; }
  .m-row .m-get::before { content: '⬇'; font-size: 1rem; line-height: 1; }
}

.m-more { text-align: center; padding: 18px 0 8px; }

.m-appcta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, #111c33, #16233f); border: 1px solid #22304f;
  border-radius: 16px; padding: 28px; margin-top: 24px;
}
.m-appcta h2 { margin: 0 0 6px; }
.m-appcta p { margin: 0; color: #93a3bd; max-width: 560px; font-size: 1rem; line-height: 1.6; }
.m-appcta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.m-legal { color: #475569; font-size: .84rem; padding-top: 28px; }

/* player controls (used by the hero Now Playing card) */
.m-player-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #22d3ee; background: rgba(34, 211, 238, .12); color: #22d3ee;
  font-size: 1.05rem; cursor: pointer;
}
.m-player-bar { flex: 1; height: 6px; background: #1e293b; border-radius: 999px; overflow: hidden; cursor: pointer; }
.m-player-fill { height: 100%; width: 0; background: #22d3ee; border-radius: 999px; }

/* volume: mute toggle + slider inside the Now Playing card */
.m-now-vol { display: flex; align-items: center; gap: 9px; }
.m-vol-btn {
  flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: none; color: #93a3bd; font-size: .85rem; line-height: 1; cursor: pointer;
}
.m-vol-btn:hover { color: #22d3ee; background: rgba(34, 211, 238, .1); }
.m-vol {
  flex: 1; width: 100%; height: 8px; cursor: pointer;
  accent-color: #22d3ee; background: transparent;
}
.m-vol:focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; }

/* download action on the Now Playing card — same app prompt as the row buttons */
.m-now-get {
  flex: none; flex-shrink: 0; white-space: nowrap;
  padding: 7px 11px; font-size: .8rem; line-height: 1.2;
}
.m-now-get:hover { border-color: #22d3ee; color: #22d3ee; }

/* full-access modal */
.m-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 6, 23, .72); padding: 20px;
}
.m-modal-box {
  position: relative; max-width: 420px; width: 100%;
  background: #111c33; border: 1px solid #22304f; border-radius: 16px;
  padding: 30px 26px 22px; text-align: center;
}
.m-modal-glyph { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.m-modal-box h3 { margin: 0 0 10px; font-size: 1.3rem; }
.m-modal-box p { color: #93a3bd; font-size: .98rem; line-height: 1.6; margin: 0 0 18px; }
.m-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.m-modal-fine { display: block; margin-top: 14px; color: #475569; font-size: .8rem; }
.m-modal-x {
  position: absolute; top: 10px; right: 12px; background: none; border: 0;
  color: #64748b; font-size: 1rem; cursor: pointer;
}

/* video player lightbox */
.m-video { z-index: 90; }
.m-video-box {
  position: relative; width: min(960px, 100%);
  background: #0f172a; border: 1px solid #22304f; border-radius: 16px;
  padding: 12px; box-shadow: 0 30px 80px rgba(2, 6, 23, .6);
}
.m-video-box .m-modal-x {
  top: -18px; right: -18px; z-index: 3;
  display: grid; place-items: center;
  width: 42px; height: 42px; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: #e23b45; color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .65);
  font-size: 1.35rem; font-weight: 800; line-height: 1;
}
.m-video-box .m-modal-x:hover { background: #bd2634; color: #fff; transform: scale(1.06); }
.m-video-box .m-modal-x:focus-visible { outline: 3px solid #22d3ee; outline-offset: 3px; }
.m-video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden;
}
.m-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-video-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px;
}
.m-video-foot strong {
  font-size: .94rem; color: #e6edf8; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-video-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-video-open { color: #7c8db0; font-size: .82rem; }
.m-video-open:hover { color: #22d3ee; }
.m-video-btn {
  flex: none; border: 1px solid #22304f; background: none; color: #93a3bd;
  border-radius: 8px; padding: 9px 13px; font-size: .86rem; cursor: pointer;
}
.m-video-btn:hover { border-color: #22d3ee; color: #22d3ee; }
.m-video-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 700px) {
  .m-grid { grid-template-columns: 1fr; }
  .m-hero { padding: 44px 0 32px; }
  .m-section { padding: 16px; }
  .music-page .container { padding-left: 16px; padding-right: 16px; }
  .m-hero-inner { grid-template-columns: 1fr; }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1101px) and (max-width: 1899px) {
  .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- standalone music chrome -------------------------------------------
   music.php sets $musicOnly: the site nav, account links and footer columns
   are not rendered at all. Only the AASH logo and one Download action stay,
   and the whole frame is dark so the page reads as Quick Save Music, not as
   a section of the software store. */
body.music-only { background: #0b1120; }
.site-header--music {
  background: rgba(11, 17, 32, .93);
  border-bottom-color: #1c2a47;
}
.site-header--music .header-inner { justify-content: space-between; flex-wrap: nowrap; }
.site-header--music .header-auth { margin-left: auto; }
.site-header--music .brand-text strong { color: #e6edf8; }
.site-header--music .brand-text small { color: #93a3bd; }
.site-footer--music {
  margin-top: 0;
  background: #0b1120;
  border-top: 1px solid #1c2a47;
}
.site-footer--music .footer-bottom {
  border-top: 0;
  padding-block: 20px;
  color: #7c8db0;
}
.site-footer--music a { color: #93a3bd; }
.site-footer--music a:hover { color: #22d3ee; }
