/* MP Shipping Banner - blocco "Spedizioni & Recensioni" in home (layout screen-new.jpeg).
   Ogni colonna: header (trattini+icona+titolo) -> box interno -> separatore -> footer.
   Palette brand: blu logo #084c95 + accento oro #f5a623. Namespace mp-sb*. */

.mp-sb {
  padding: 2.5rem 0;
  background: #fff;
  --mp-blue: #084c95;
  --mp-muted: #6a7686;
  --mp-gold: #f5a623;
  --mp-ring: #cfe0f2;
  --mp-line: #e7ecf3;
  --mp-cardline: #eaeef4;
}

.mp-sb__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

/* ---------- colonna = card esterna ---------- */
.mp-sb__col {
  border: 1px solid var(--mp-cardline);
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.35rem;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16, 42, 76, .06);
  display: flex;
  flex-direction: column;
}
.mp-sb__col--reviews {
  background: #fffdf8;
  border-color: #f1e6ce;
}

/* ---------- header con trattini corti agli estremi ---------- */
.mp-sb__head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.15rem;
}
.mp-sb__rule {
  flex: 0 0 26px;
  height: 2px;
  background: var(--mp-blue);
  border-radius: 2px;
  opacity: .9;
}
.mp-sb__rule--gold { background: var(--mp-gold); }
.mp-sb__head-icon { flex: 0 0 auto; color: var(--mp-blue); line-height: 0; }
.mp-sb__head-icon svg { width: 34px; height: 34px; }
.mp-sb__head-icon--gold { color: var(--mp-gold); }
.mp-sb__head-title {
  flex: 1;
  text-align: center;
  margin: 0;
  color: var(--mp-blue);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .2px;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}
.mp-sb__head-title--gold { color: var(--mp-gold); }

/* ---------- box interno ---------- */
.mp-sb__box {
  flex: 1;
  border: 1px solid var(--mp-cardline);
  border-radius: 14px;
  padding: 1.25rem 1.2rem;
  background: #fff;
}
.mp-sb__box--reviews {
  background: #fffdf5;
  border-color: #f1e4c4;
  text-align: center;
}

/* ---------- icone in anello circolare ---------- */
.mp-sb__ring {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1.5px solid var(--mp-ring);
  background: #fff;
  color: var(--mp-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mp-sb__ring svg, .mp-sb__ring .mp-sb__ic { width: 40px; height: 40px; }
.mp-sb__ring--globe { border-color: #dbe6f4; }
.mp-sb__ring--globe svg, .mp-sb__ring--globe .mp-sb__ic { width: 52px; height: 52px; }
.mp-sb__inpost { width: 50px; height: auto; }
/* le icone raster non sono quadrate: contain per non deformarle */
.mp-sb__ic { object-fit: contain; }

/* ---------- ITALIA: box a 2 celle divise ---------- */
.mp-sb__box--split { display: flex; padding: 1.1rem 0; }
.mp-sb__cell {
  flex: 1;
  padding: .3rem 1.1rem;
  text-align: center;
}
.mp-sb__cell + .mp-sb__cell { border-left: 1px solid var(--mp-line); }
.mp-sb__cell-top {
  display: flex;
  align-items: center;
  gap: .7rem;
  justify-content: center;
  margin-bottom: .7rem;
}
.mp-sb__cell-name {
  font-weight: 800;
  color: var(--mp-blue);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .2px;
  line-height: 1.15;
  text-align: left;
}
/* nota per-cella (tempi di consegna): sostituisce la vecchia nota unica nel footer,
   perche' corriere e InPost hanno tempi diversi (24/48h vs 24/72h) */
.mp-sb__cnote {
  color: var(--mp-blue);
  font-weight: 600;
  font-size: .85rem;
  line-height: 1.2;
  margin-bottom: .3rem;
}
.mp-sb__price {
  color: var(--mp-blue);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.05;
}
.mp-sb__free {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  color: var(--mp-muted);
  font-size: .92rem;
  margin-top: .35rem;
}

/* ---------- elementi del solo layout mobile (mockup mobile-idea.jpeg) ----------
   Su desktop sono nascosti; .mp-sb__txt-m usa display:contents cosi' i suoi figli
   restano figli diretti del box e il layout desktop resta identico. */
.mp-sb__txt-m { display: contents; }
.mp-sb__title-m,
.mp-sb__free-ic,
.mp-sb__ring--star,
.mp-sb__cta-ic--m { display: none; }

/* ---------- ESTERO ---------- */
.mp-sb__box--estero { display: flex; flex-direction: column; justify-content: center; }
.mp-sb__estero-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.mp-sb__ring--globe { line-height: 0; }
.mp-sb__claim {
  color: var(--mp-blue);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.15;
}
.mp-sb__countries {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.1rem;
  color: #274867;
  font-size: .95rem;
}
.mp-sb__shield { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------- RECENSIONI ---------- */
.mp-sb__score {
  color: var(--mp-blue);
  font-weight: 800;
  font-size: 2.9rem;
  line-height: 1;
  margin-bottom: .8rem;
}
.mp-sb__stars { display: inline-flex; gap: .4rem; margin-bottom: 1rem; }
.mp-sb__star {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e6e9ef;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mp-sb__star svg { width: 24px; height: 24px; }
.mp-sb__star.is-on { background: var(--mp-gold); }
.mp-sb__countries--rev { margin-top: 0; }

/* ---------- footer (separatore + icona + link) ---------- */
.mp-sb__foot {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--mp-line);
}
.mp-sb__foot-ic { flex: 0 0 auto; color: var(--mp-blue); line-height: 0; }
.mp-sb__foot-ic svg { width: 24px; height: 24px; }
.mp-sb__cta-ic { flex: 0 0 auto; color: var(--mp-blue); line-height: 0; transition: transform .18s ease; }
.mp-sb__cta-ic svg { width: 30px; height: 30px; }
.mp-sb__foot-txt { color: var(--mp-blue); font-weight: 600; font-size: .95rem; line-height: 1.25; }
.mp-sb__foot-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
a.mp-sb__foot-link:hover .mp-sb__foot-txt { text-decoration: underline; }
a.mp-sb__foot-link:hover .mp-sb__cta-ic { transform: translateX(3px); }

/* ============ TABLET: colonna unica (celle Italia affiancate, anello accanto al nome) ============ */
@media (max-width: 991.98px) {
  .mp-sb__grid { grid-template-columns: 1fr; gap: 1rem; }
  .mp-sb__head-title { font-size: 1.12rem; }
}

/* ============ MOBILE (<=767px): layout mockup mobile-idea.jpeg ============
   3 card impilate a tutta larghezza. Italia = header (icona+titolo) + linea +
   2 celle affiancate (anello a sinistra, testo a destra). Estero e Recensioni =
   riga unica [anello][titolo+testo] | divisore verticale | [freccia + CTA]. */
@media (max-width: 767.98px) {
  .mp-sb { padding: 1.2rem 0; }
  .mp-sb__grid { grid-template-columns: 1fr; gap: .7rem; }
  .mp-sb__col { padding: .9rem .8rem; border-radius: 14px; }

  /* header: niente trattini, icona+titolo centrati, separatore sotto */
  .mp-sb__rule { display: none; }
  .mp-sb__head {
    justify-content: center;
    gap: .5rem;
    margin-bottom: .75rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--mp-line);
  }
  .mp-sb__head-title { flex: 0 1 auto; font-size: 1.15rem; white-space: normal; }
  .mp-sb__head-icon svg { width: 30px; height: 30px; }

  /* Estero/Recensioni: header sostituito dal titolo affiancato all'icona */
  .mp-sb__col--estero .mp-sb__head,
  .mp-sb__col--reviews .mp-sb__head { display: none; }
  .mp-sb__txt-m { display: block; min-width: 0; }
  .mp-sb__title-m {
    display: block;
    margin: 0;
    color: var(--mp-blue);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: .2px;
    text-transform: uppercase;
  }

  /* il box interno perde bordo/sfondo: la card esterna basta */
  .mp-sb__box { border: 0; padding: 0; border-radius: 0; background: transparent; }

  /* ---- Italia: celle affiancate, anello a sinistra del testo ---- */
  .mp-sb__box--split { flex-direction: row; padding: 0; gap: 0; }
  .mp-sb__cell {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .5rem;
    align-items: center;
    padding: .2rem .5rem;
    text-align: center;
  }
  .mp-sb__cell + .mp-sb__cell { border-left: 1px solid var(--mp-line); border-top: 0; }
  .mp-sb__cell-top { display: contents; }
  .mp-sb__ring { grid-row: 1 / span 4; align-self: center; width: 64px; height: 64px; }
  .mp-sb__ring svg, .mp-sb__ring .mp-sb__ic { width: 34px; height: 34px; }
  .mp-sb__inpost { width: 44px; }
  /* min-height = 2 righe: tiene prezzi e note delle due celle allineati
     anche quando un nome va a capo e l'altro no */
  .mp-sb__cell-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3em;
    text-align: center;
    font-size: .82rem;
  }
  .mp-sb__cnote { font-size: .75rem; margin: .15rem 0 .1rem; }
  .mp-sb__price { font-size: 1.6rem; }
  .mp-sb__free { color: #16324f; font-weight: 600; font-size: .8rem; margin-top: .2rem; }
  .mp-sb__free-ic { display: inline-block; width: 17px; height: 17px; flex: 0 0 auto; }

  /* ---- Estero + Recensioni: card in riga, CTA a destra ---- */
  .mp-sb__col--estero,
  .mp-sb__col--reviews { flex-direction: row; align-items: center; gap: .6rem; }
  .mp-sb__col--estero .mp-sb__box,
  .mp-sb__col--reviews .mp-sb__box { flex: 1; min-width: 0; }

  .mp-sb__estero-body { flex-direction: row; gap: .7rem; justify-content: flex-start; text-align: left; }
  .mp-sb__ring--globe { width: 64px; height: 64px; }
  .mp-sb__ring--globe svg, .mp-sb__ring--globe .mp-sb__ic { width: 52px; height: 52px; }
  .mp-sb__claim { color: #16324f; font-weight: 600; font-size: .95rem; margin-top: .1rem; }
  .mp-sb__col--estero .mp-sb__countries { display: none; } /* non previsto dal mockup mobile */

  /* Recensioni: card bianca come le altre, stella in anello, stelle piene senza tessera */
  .mp-sb__col--reviews { background: #fff; border-color: var(--mp-cardline); }
  .mp-sb__col--reviews .mp-sb__box { display: flex; align-items: center; gap: .7rem; text-align: left; }
  .mp-sb__box--reviews { background: transparent; border: 0; }
  .mp-sb__ring--star {
    display: inline-flex;
    width: 64px;
    height: 64px;
    color: var(--mp-gold);
    border-color: #f1e0bf;
  }
  .mp-sb__ring--star svg, .mp-sb__ring--star .mp-sb__ic { width: 40px; height: 40px; }
  .mp-sb__score { display: none; } /* il mockup mobile mostra solo le stelle */
  .mp-sb__stars { gap: .15rem; margin: .2rem 0; }
  .mp-sb__star { width: auto; height: auto; border-radius: 0; background: transparent; color: #dfe3ea; }
  .mp-sb__star.is-on { background: transparent; color: var(--mp-gold); }
  .mp-sb__star svg { width: 22px; height: 22px; }
  .mp-sb__countries--rev {
    justify-content: flex-start;
    margin-top: 0;
    color: #16324f;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
  }
  .mp-sb__countries--rev .mp-sb__shield { display: none; }

  /* footer -> colonna CTA a destra, separata da linea verticale */
  .mp-sb__foot {
    flex: 0 0 34%;
    margin-top: 0;
    padding: 0 0 0 .7rem;
    border-top: 0;
    border-left: 1px solid var(--mp-line);
  }
  .mp-sb__foot-ic--d { display: none; }
  .mp-sb__cta-ic--m { display: inline-flex; }
  .mp-sb__cta-ic svg { width: 38px; height: 38px; }
  .mp-sb__foot-txt { font-weight: 700; font-size: .82rem; }
}

/* ---- TELEFONI: celle Italia IMPILATE ----------------------------------------
   Prima si tenevano affiancate rimpicciolendo tutto (font .68rem): a 390px il
   testo era illeggibile e "CORRIERE ESPRESSO" andava comunque a capo, perche'
   anello 64px + meta' card = ~110px di testo. Impilate, ogni riga ha la
   larghezza piena: il nome sta su UNA riga e i corpi tornano come nel mockup
   (_migrazione/screens/mobile-idea.jpeg).                                     */
@media (max-width: 575.98px) {
  /* Celle Italia AFFIANCATE anche su telefono (richiesta utente 29/07), con
     l'ANELLO SOPRA il testo invece che di fianco. E' questo che rende possibile
     la riga singola: di fianco l'anello mangiava ~64px e al nome ne restavano
     ~110 -> "CORRIERE ESPRESSO" andava a capo comunque e per evitarlo si era
     finiti a font .68rem illeggibili (motivo per cui il 16/07 le avevamo
     impilate). Sopra, il nome dispone di tutta la larghezza della cella. */
  .mp-sb__box--split { flex-direction: row; }
  .mp-sb__cell + .mp-sb__cell {
    border-left: 1px solid var(--mp-line);
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
  }
  .mp-sb__cell {
    grid-template-columns: 1fr;   /* una colonna sola: tutto incolonnato */
    justify-content: stretch;
    justify-items: center;
    column-gap: 0;
    row-gap: .1rem;
    padding: .1rem .3rem;
    text-align: center;
  }
  /* l'anello rientra nel flusso: niente piu' span su 4 righe (vedi <=767.98) */
  .mp-sb__ring {
    grid-row: auto;
    width: 46px;
    height: 46px;
    margin-bottom: .35rem;
  }
  .mp-sb__ring svg, .mp-sb__ring .mp-sb__ic { width: 26px; height: 26px; }
  .mp-sb__inpost { width: 32px; }
  /* min-height:0 va bene solo finche' i nomi stanno su UNA riga: se uno andasse
     a capo e l'altro no, prezzi e note delle 2 celle si disallineerebbero
     (sono grid indipendenti). I font qui sotto sono tarati per evitarlo. */
  .mp-sb__cell-name {
    justify-content: center;
    text-align: center;
    min-height: 0;
    font-size: .84rem;
    line-height: 1.15;
  }
  .mp-sb__cnote { font-size: .72rem; }
  .mp-sb__price { font-size: 1.4rem; line-height: 1.1; }
  .mp-sb__free { font-size: .7rem; justify-content: center; gap: .25rem; }
  .mp-sb__free-ic { width: 14px; height: 14px; }
}

/* ---- telefoni stretti: riduzione delle SOLE card Estero/Recensioni.
   Restano affiancate icona|testo|CTA, quindi senza questa riduzione la CTA
   sfonda a destra (il .mp-sb__foot ha flex-shrink:0). Le celle Italia NON si
   toccano: impilate hanno gia' la larghezza piena. ---- */
@media (max-width: 400px) {
  .mp-sb__col { padding: .7rem .5rem; }
  .mp-sb__head-title { font-size: .95rem; }
  .mp-sb__head-icon svg { width: 24px; height: 24px; }

  /* Da quando le celle Italia sono affiancate (29/07) vanno ristrette anche
     loro qui sotto, o a 320px "CORRIERE ESPRESSO" va a capo e la card sfonda
     in orizzontale. Selettori scoped a .mp-sb__cell per non rimpicciolire
     anche gli anelli globo/stella, che hanno le loro misure qui sotto. */
  .mp-sb__cell { padding-inline: .15rem; }
  .mp-sb__cell .mp-sb__ring { width: 40px; height: 40px; margin-bottom: .25rem; }
  .mp-sb__cell .mp-sb__ring svg, .mp-sb__cell .mp-sb__ring .mp-sb__ic { width: 22px; height: 22px; }
  .mp-sb__cell .mp-sb__inpost { width: 28px; }
  .mp-sb__cell-name { font-size: .72rem; }
  .mp-sb__cnote { font-size: .64rem; }
  .mp-sb__price { font-size: 1.2rem; }
  .mp-sb__free { font-size: .62rem; gap: .18rem; }
  .mp-sb__free-ic { width: 12px; height: 12px; }

  .mp-sb__ring--globe,
  .mp-sb__ring--star { width: 50px; height: 50px; }
  .mp-sb__ring--globe svg, .mp-sb__ring--globe .mp-sb__ic { width: 40px; height: 40px; }
  .mp-sb__ring--star svg, .mp-sb__ring--star .mp-sb__ic { width: 30px; height: 30px; }
  .mp-sb__title-m { font-size: .85rem; }
  .mp-sb__claim { font-size: .8rem; }
  .mp-sb__star svg { width: 17px; height: 17px; }
  .mp-sb__countries--rev { font-size: .62rem; }

  .mp-sb__foot { flex-basis: 36%; padding-left: .5rem; }
  .mp-sb__cta-ic svg { width: 30px; height: 30px; }
  .mp-sb__foot-txt { font-size: .72rem; }
}
