/*
Theme Name:   Borealize Child
Theme URI:    https://www.borealize.it/
Description:  Tema child di Borealize: home con il gioco dell'insegna, player del catalogo, comparatore, nuove aperture, catene e attivazione della licenza.
Author:       Borealize srl
Author URI:   https://www.borealize.it/
Template:     thepro
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  borealize-child
*/

/* ------------------------------------------------------------------
   IMPORTANTE: «Template» qui sopra deve essere il nome della CARTELLA
   del tema attuale del sito (Aspetto › Temi › dettagli del tema, o la
   cartella in wp-content/themes). Esempi: hello-elementor, astra,
   generatepress, kadence, oceanwp.
   ------------------------------------------------------------------ */

/* ---------- Colori e caratteri di borealize.it ---------- */
:root {
  --bz-bg: #121212;
  --bz-band: #181818;
  --bz-card: #1E1E1E;
  --bz-card2: #262626;
  --bz-line: #353535;
  --bz-fg: #FFFFFF;
  --bz-soft: #D9D9D9;
  --bz-muted: #9F9F9F;
  --bz-acc: #F5B000;
  --bz-acc2: #FFC93D;
  --bz-ink: #121212;
  --bz-f: 'Poppins', ui-sans-serif, system-ui, 'Segoe UI', Arial, sans-serif;
  --bz-head-h: 68px;
  --bz-admin: var(--wp-admin--admin-bar--height, 0px);
}

/* ---------- Base, solo sulle pagine Borealize (:where = priorità minima, così vincono gli stili delle singole pagine) ---------- */
body.bz {
  margin: 0;
  background: var(--bz-bg);
  color: var(--bz-fg);
  font-family: var(--bz-f);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  color-scheme: dark;
}
:where(body.bz) *, :where(body.bz) *::before, :where(body.bz) *::after { box-sizing: border-box; }
html:has(body.bz) { scroll-behavior: smooth; scroll-padding-top: calc(var(--bz-head-h) + var(--bz-admin) + 12px); background: var(--bz-bg); }
:where(body.bz) a { color: var(--bz-acc); }
:where(body.bz) a:hover { color: var(--bz-acc2); }
:where(body.bz) :focus-visible { outline: 3px solid var(--bz-acc); outline-offset: 3px; }
:where(body.bz) img { max-width: 100%; height: auto; }
:where(body.bz) :where(button, input, select, textarea) { font: inherit; }
body.bz.bz-menu-aperto { overflow: hidden; }

.bz-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--bz-acc); color: var(--bz-ink) !important; padding: 10px 16px; border-radius: 3px; font-weight: 600; text-decoration: none; }
.bz-skip:focus { top: 12px; }

/* ---------- Testata e menu ---------- */
.bz-head {
  position: sticky;
  top: var(--bz-admin);
  z-index: 100;
  background: rgba(18, 18, 18, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #222;
  padding-top: env(safe-area-inset-top, 0px);
}
.bz-head__in {
  max-width: 1160px;
  margin: 0 auto;
  min-height: var(--bz-head-h);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: 18px;
}
.bz-logo { font-weight: 800; letter-spacing: 3px; font-size: 21px; color: var(--bz-fg) !important; text-decoration: none; margin-right: auto; white-space: nowrap; }
.bz-nav { display: flex; align-items: center; }
.bz-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; }
.bz-menu li { margin: 0; }
.bz-menu a { color: var(--bz-soft) !important; text-decoration: none; font-size: 15px; padding: 8px 0; display: inline-block; }
.bz-menu a:hover, .bz-menu .current-menu-item > a { color: var(--bz-fg) !important; }
.bz-menu .sub-menu { display: none; }
.bz-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 3px;
  background: var(--bz-acc); color: var(--bz-ink) !important; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.bz-cta:hover { background: var(--bz-acc2); }
.bz-cta .corto { display: none; }
.bz-burger { display: none; width: 46px; height: 46px; border: 1px solid #444; border-radius: 10px; background: none; cursor: pointer; padding: 0; position: relative; flex: none; }
.bz-burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--bz-fg); border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
.bz-burger span:nth-child(1) { top: 15px; }
.bz-burger span:nth-child(2) { top: 22px; }
.bz-burger span:nth-child(3) { top: 29px; }
.bz-burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.bz-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bz-burger[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* menu da telefono: pannello a tutto schermo con voci grandi */
@media (max-width: 900px) {
  :root { --bz-head-h: 62px; }
  /* il pannello del menu è «fixed»: la sfocatura della testata lo chiuderebbe dentro la barra */
  .bz-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bz-bg); }
  .bz-head__in { gap: 10px; }
  .bz-logo { font-size: 19px; letter-spacing: 2.5px; }
  .bz-burger { display: block; }
  .bz-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: calc(var(--bz-head-h) + var(--bz-admin) + env(safe-area-inset-top, 0px));
    background: var(--bz-bg);
    display: block;
    padding: 18px max(20px, env(safe-area-inset-left, 0px)) calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .25s, visibility 0s .25s;
  }
  .bz-nav.aperto { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .25s; }
  .bz-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .bz-menu li { border-bottom: 1px solid #262626; }
  .bz-menu a { display: flex; align-items: center; justify-content: space-between; font-size: 22px; font-weight: 600; color: var(--bz-fg) !important; padding: 16px 2px; min-height: 58px; }
  .bz-menu a::after { content: "→"; color: var(--bz-acc); font-size: 20px; }
  .bz-nav__cta { display: flex !important; margin-top: 22px; width: 100%; min-height: 54px; font-size: 17px; }
}
@media (min-width: 901px) { .bz-nav__cta { display: none !important; } }
@media (max-width: 420px) {
  .bz-cta.bz-head__cta .lungo { display: none; }
  .bz-cta.bz-head__cta .corto { display: inline; }
  .bz-cta.bz-head__cta { padding: 9px 14px; min-height: 42px; font-size: 14px; }
}

/* ---------- Piede ---------- */
.bz-foot { border-top: 1px solid #222; background: var(--bz-bg); }
.bz-foot__in {
  max-width: 1160px; margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--bz-muted);
}
.bz-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.bz-foot a { color: var(--bz-soft) !important; text-decoration: none; }
.bz-foot a:hover { color: var(--bz-acc) !important; }

/* ---------- Player del catalogo ---------- */
.bz-player { background: var(--bz-card); border: 1px solid #2A2A2A; border-radius: 20px; padding: clamp(16px, 3vw, 28px); display: flex; flex-direction: column; gap: 18px; }
.bz-player__atm { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -4px; padding-inline: 4px; }
.bz-player__atm::-webkit-scrollbar { display: none; }
.bz-player__atm button {
  flex: none; background: var(--bz-card2); color: var(--bz-fg); border: 1px solid var(--bz-line); border-radius: 30px; padding: 10px 18px; min-height: 46px;
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: transform .12s;
}
.bz-player__atm button:hover { transform: scale(1.03); }
.bz-player__atm button[aria-pressed="true"] { background: var(--bz-acc); color: var(--bz-ink); border-color: var(--bz-acc); font-weight: 600; }
.bz-player__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bz-brano {
  width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left;
  background: var(--bz-bg); border: 1px solid #2A2A2A; border-radius: 12px; padding: 10px 14px 10px 10px; color: var(--bz-fg); cursor: pointer;
}
.bz-brano:hover { border-color: #555; }
.bz-brano.on { border-color: var(--bz-acc); background: #201A0A; }
.bz-brano .ic { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--bz-acc); display: inline-flex; align-items: center; justify-content: center; }
.bz-brano.on .ic { background: var(--bz-acc); }
.bz-brano.on .ic path { fill: var(--bz-ink); }
.bz-brano b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-brano small { color: var(--bz-muted); font-size: 13px; }
.bz-brano .dur { color: var(--bz-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.bz-player__vuoto { margin: 0; color: var(--bz-muted); }
.bz-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.bz-eq i { width: 3px; background: var(--bz-ink); border-radius: 1px; height: 30%; animation: bzEq .9s ease-in-out infinite alternate; }
.bz-eq i:nth-child(2) { animation-delay: .2s; } .bz-eq i:nth-child(3) { animation-delay: .45s; }
@keyframes bzEq { to { height: 100%; } }

/* barra di ascolto fissa: la musica continua mentre scorri la pagina */
.bz-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  max-width: 760px; margin: 0 auto; background: #0D0D0D; border: 1px solid #3A3A3A; border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 12px; align-items: center; padding: 10px 12px;
  transform: translateY(150%); transition: transform .35s cubic-bezier(.2, 1.2, .4, 1);
  -webkit-user-select: none; user-select: none;
}
.bz-bar.su { transform: none; }
.bz-bar__play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bz-acc); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bz-bar__t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bz-bar__t b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bz-fg); }
.bz-bar__t span { font-size: 12px; color: var(--bz-acc); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.bz-bar__prog { height: 6px; border-radius: 3px; background: #333; cursor: pointer; position: relative; touch-action: none; }
.bz-bar__prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bz-acc); border-radius: 3px; }
.bz-bar__x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #444; background: none; color: var(--bz-soft); cursor: pointer; font-size: 18px; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  html:has(body.bz) { scroll-behavior: auto; }
  body.bz *, body.bz *::before, body.bz *::after { animation: none !important; transition: none !important; }
}
