/* ilPolistirolo.it — Testata per le pagine "di servizio" del front-end
 * Coppia di ilp-testata-pagine.php · v1.0.0 · 09/11/2026
 * Tutto dietro body.ilp-pg-on (messa dal PHP solo sulle pagine coperte).
 * Colori come la testata del portale: #161D2B scuro, #8CC63F verde, #2f6fb3 blu.
 */

/* ── la banda al posto del titolo del tema ─────────────────────────── */
body.ilp-pg-on .wp-block-group:has(> .ilp-pg-banda) { padding-top: 0 !important; }
body.ilp-pg-on main:has(.ilp-pg-banda) { margin-block-start: 0 !important; }

body.ilp-pg-on .ilp-pg-banda {
  background: #161D2B;
  color: #fff;
  border-bottom: 3px solid #8CC63F;
  margin-top: 0 !important;
  margin-bottom: 34px !important;
}
body.ilp-pg-on .ilp-pg-in {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 24px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  box-sizing: border-box;
}
body.ilp-pg-on .ilp-pg-occhiello {
  font-size: 13px;
  color: #9AA3B2;
  letter-spacing: .01em;
}
body.ilp-pg-on .ilp-pg-banda h1.ilp-pg-titolo {
  font-family: inherit;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.12;
  margin: 6px 0 8px;
  color: #fff;
}
body.ilp-pg-on .ilp-pg-sotto { font-size: 14.5px; color: #AEB6C2; line-height: 1.45; }
body.ilp-pg-on .ilp-pg-banda[data-stato="scaduto"] .ilp-pg-sotto,
body.ilp-pg-on .ilp-pg-banda[data-stato="nolink"] .ilp-pg-sotto { color: #F5C26B; }
body.ilp-pg-on .ilp-pg-dx { text-align: right; padding-bottom: 2px; }
body.ilp-pg-on .ilp-pg-cod-lbl {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9AA3B2;
  margin-bottom: 4px;
}
body.ilp-pg-on .ilp-pg-cod {
  font-size: 26px;
  font-weight: 800;
  color: #8CC63F;
  line-height: 1;
  white-space: nowrap;
}

/* telefono: banda più compatta, codice sotto il titolo */
@media (max-width: 640px) {
  body.ilp-pg-on .ilp-pg-in { grid-template-columns: 1fr; gap: 12px; padding: 20px 18px 22px; }
  body.ilp-pg-on .ilp-pg-banda h1.ilp-pg-titolo { font-size: 23px; }
  body.ilp-pg-on .ilp-pg-sotto { font-size: 13.5px; }
  body.ilp-pg-on .ilp-pg-dx { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  body.ilp-pg-on .ilp-pg-cod-lbl { margin: 0; }
  body.ilp-pg-on .ilp-pg-cod { font-size: 19px; }
  body.ilp-pg-on .ilp-pg-banda { margin-bottom: 22px !important; }
}

/* ── desktop: la barra del sito diventa scura, come nel portale ────── */
@media (min-width: 1024px) {
  body.ilp-pg-on .ilp-hdr {
    background: #161D2B;
    border: 0;
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 16px max(24px, calc((100% - 1272px) / 2));
  }
  body.ilp-pg-on .ilp-hdr a { color: #C6CCD6; }
  body.ilp-pg-on .ilp-hdr a:hover { color: #fff; }
  body.ilp-pg-on .ilp-hdr .ilp-hdr__nav a:first-child { color: #8CC63F; font-weight: 600; }
  body.ilp-pg-on .ilp-pg-in { border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* ── "Link non valido." / "Ordine non trovato": riquadro, non riga nuda */
body.ilp-pg-on .wp-block-post-content > p:only-child {
  max-width: 560px;
  margin: 10px auto 40px !important;
  padding: 26px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(22, 29, 43, .06);
  color: #374151;
  font-size: 16px;
}

/* ── CARICA FILE ───────────────────────────────────────────────────── */
/* il titolo dentro il modulo ora è nella banda */
body.ilp-pg-on .ilp-fc > div[style*="text-align:center"] { display: none; }
body.ilp-pg-on .ilp-fc { max-width: 720px !important; margin-bottom: 40px !important; color: #1f2937; }

body.ilp-pg-on .ilp-fc .sec {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(22, 29, 43, .04), 0 12px 32px rgba(22, 29, 43, .06);
}
/* la richiesta del nostro staff */
body.ilp-pg-on .ilp-fc .req {
  background: #f4f7fb;
  border: 0;
  border-left: 4px solid #2f6fb3;
  border-radius: 10px;
  padding: 12px 16px 14px;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}
body.ilp-pg-on .ilp-fc .req::before {
  content: "Cosa ci serve";
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #2f6fb3;
  margin-bottom: 4px;
  white-space: normal;
}
/* zona di rilascio */
body.ilp-pg-on .ilp-fc .drop {
  border: 2px dashed #c7d3e1;
  border-radius: 16px;
  padding: 34px 18px;
  background: #fafcfe;
  color: #5b6472;
  font-size: 16px;
  transition: background .15s, border-color .15s, transform .15s;
}
body.ilp-pg-on .ilp-fc .drop:hover { border-color: #2f6fb3; background: #f3f8fd; }
body.ilp-pg-on .ilp-fc .drop.hot { border-color: #8CC63F; background: #f4f9ec; transform: scale(1.01); }
body.ilp-pg-on .ilp-fc .drop b { color: #161D2B; }
body.ilp-pg-on .ilp-fc .drop .hint { color: #8a93a1; }
body.ilp-pg-on .ilp-fc .drop > div:first-child {
  width: 56px; height: 56px; line-height: 56px !important;
  margin: 0 auto 10px !important;
  border-radius: 50%;
  background: #e8f0fa;
  font-size: 26px !important;
}
/* elenco file e barre */
body.ilp-pg-on .ilp-fc li { border-color: #e9edf2; border-radius: 10px; padding: 10px 12px; }
body.ilp-pg-on .ilp-fc li .bar > i,
body.ilp-pg-on .ilp-fc .tot .bar > i { background: #2f6fb3; }
body.ilp-pg-on .ilp-fc li.done .bar > i { background: #8CC63F; }
body.ilp-pg-on .ilp-fc .tot { background: #f4f7fb; border-color: #dbe6f2; }
body.ilp-pg-on .ilp-fc .tot .lbl { color: #161D2B; }
body.ilp-pg-on .ilp-fc .nota { background: #fafbfc; border-color: #eef1f5; border-radius: 10px; color: #5b6472; }
body.ilp-pg-on .ilp-fc .nota b { color: #161D2B; }
body.ilp-pg-on .ilp-fc .off { border-radius: 14px; padding: 18px; text-align: center; }

/* box "mandaci un link" (ilp-file-link.js) */
body.ilp-pg-on .ilp-fc .ilp-flink { border-color: #e5e7eb; border-radius: 14px; background: #fafbfc; padding: 14px 16px; margin-top: 14px; }
body.ilp-pg-on .ilp-fc .ilp-flink .h { color: #161D2B; }
body.ilp-pg-on .ilp-fc .ilp-flink input { height: 42px; border-color: #d5dde7; }
body.ilp-pg-on .ilp-fc .ilp-flink input:focus { border-color: #2f6fb3; box-shadow: 0 0 0 3px rgba(47, 111, 179, .15); }
body.ilp-pg-on .ilp-fc .ilp-flink button { height: 42px; background: #2f6fb3; border-radius: 10px; }
body.ilp-pg-on .ilp-fc .ilp-flink button:hover:not(:disabled) { background: #275d97; }

@media (max-width: 640px) {
  body.ilp-pg-on .ilp-fc .sec { padding: 16px; border-radius: 14px; }
  body.ilp-pg-on .ilp-fc .drop { padding: 24px 14px; }
}

/* ── CONFERMA DATI: titolo doppione via, resta la spiegazione ──────── */
body.ilp-pg-on .ilp-dc > div[style*="text-align:center"] > div:first-child { display: none; }

/* ── DIVENTA PARTNER: il riquadro errori vuoto non deve vedersi ────── */
body.ilp-pg-on .ilppon .msg:empty { display: none; }
