/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

/* Nasconde il campo "Customer" inutile nella form indirizzo FO */
.form-group.row.id_customer,
.form-group.row.customer,
.form-group.row.id-customer,
.form-group.row.customer_id,
.form-group.row.idcustomer {
  display: none !important;
}

/* === AGECHECK (B2C) === */
.di-agecheck .di-agecheck-card {
  margin: 16px 0;
}
.di-agecheck .di-agecheck-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 12px;
}
.di-agecheck .di-agecheck-qr {
  width: 180px;
  height: 180px;
  background: #fff;
  border: 1px solid #eee;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.di-agecheck .di-agecheck-qr-status {
  font-size: 12px;
  color: #666;
  margin: 6px 0 0;
  word-break: break-word;
}
.di-agecheck .di-agecheck-qr-attempts {
  margin: 4px 0 0 16px;
  padding: 0;
  font-size: 12px;
}
.di-agecheck .di-agecheck-qr-attempts li {
  margin: 0 0 2px 0;
}
.di-agecheck .di-agecheck-qr-attempts a {
  color: #666;
  text-decoration: underline;
}
.di-agecheck .di-agecheck-qr img,
.di-agecheck .di-agecheck-qr canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.di-agecheck .di-agecheck-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.di-agecheck .di-agecheck-back {
  text-decoration: none;
}
.di-agecheck .di-agecheck-linkbox input {
  font-size: 12px;
}
.di-agecheck .di-agecheck-copy-status {
  margin-left: 8px;
  font-size: 12px;
  color: #28a745;
}
.di-agecheck--mobile .btn-block {
  width: 100%;
}

/* === REGISTRAZIONE (B2B/B2C) — UI polish === */
/* Campi auto-compilati/disabilitati: mantieni leggibilità (alcuni temi applicano opacity bassa) */
#customer-form input[disabled],
#customer-form select[disabled],
#customer-form textarea[disabled],
#customer-form input[readonly],
#customer-form select[readonly],
#customer-form textarea[readonly] {
  opacity: 1 !important;
  background-color: #f3f4f6 !important;
  color: #444 !important;
  cursor: not-allowed;
}

/* Campi precompilati (OpenAPI o modal): grigio leggero ma EDITABILI */
#customer-form .di-prefilled {
  background-color: #f3f4f6 !important;
  color: #444 !important;
}

/* Righe campi custom del modulo: spacing più coerente */
#customer-form .form-group.row.piva,
#customer-form .form-group.row.denominazione,
#customer-form .form-group.row.codice_destinatario,
#customer-form .form-group.row.indirizzo,
#customer-form .form-group.row.cap,
#customer-form .form-group.row.provincia,
#customer-form .form-group.row.comune,
#customer-form .form-group.row.iso_country,
#customer-form .form-group.row.extra_country {
  margin-bottom: 0.85rem;
}

/* Selettore tipo registrazione (se presente nel tema) */
#registration-type-selector {
  margin: 0 0 1.25rem 0;
}

.di-reg-selector {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(34, 27, 25, 0.08);
  background: #ffffff;
  box-shadow:
    0 24px 50px -26px rgba(20, 14, 12, 0.28),
    0 10px 24px -16px rgba(139, 111, 71, 0.18);
}

.di-reg-selector__hero {
  position: relative;
  overflow: hidden;
  padding: 34px 28px 28px;
  background-color: #221B19;
  background-image:
    radial-gradient(circle at 16% 0%, rgba(139, 111, 71, 0.35) 0%, rgba(139, 111, 71, 0) 52%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 56%);
}

.di-reg-selector__hero::before,
.di-reg-selector__hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.di-reg-selector__hero::before {
  top: 18px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.di-reg-selector__hero::after {
  left: 18px;
  bottom: 18px;
  width: 70px;
  height: 70px;
  border-radius: 999px;
}

.di-reg-selector__hero-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(139, 111, 71, 0.45);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
  animation: diRegSelectorFloatX 2.8s ease-in-out infinite;
  will-change: transform;
}

@keyframes diRegSelectorFloatX {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-7px) rotate(-2deg);
  }
  50% {
    transform: translateX(7px) rotate(2deg);
  }
  75% {
    transform: translateX(-4px) rotate(-1deg);
  }
}

.di-reg-selector__title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #ffffff;
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.di-reg-selector__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 26px;
}

.registration-card-wrapper {
  min-width: 0;
}

.registration-card {
  height: 100%;
}

.di-reg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 28px 24px 24px;
  border-radius: 22px;
  border: 1px solid rgba(34, 27, 25, 0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,245,243,0.96) 100%);
  box-shadow:
    0 18px 34px -22px rgba(20, 14, 12, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.65);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.di-reg-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 38px -24px rgba(20, 14, 12, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

.di-reg-card.is-selected {
  transform: translateY(-4px);
}

.di-reg-card--priv {
  border-color: rgba(47, 159, 96, 0.28);
}

.di-reg-card--priv.is-selected {
  border-color: rgba(47, 159, 96, 0.62);
  box-shadow:
    0 24px 38px -24px rgba(47, 159, 96, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.di-reg-card--comp {
  border-color: rgba(34, 27, 25, 0.18);
}

.di-reg-card--comp.is-selected {
  border-color: rgba(34, 27, 25, 0.50);
  box-shadow:
    0 24px 38px -24px rgba(34, 27, 25, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.di-reg-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.di-reg-card--priv .di-reg-card__icon-wrap {
  color: #2f9f60;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 16px 26px -20px rgba(47, 159, 96, 0.55);
}

.di-reg-card--comp .di-reg-card__icon-wrap {
  color: #221B19;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 16px 26px -20px rgba(34, 27, 25, 0.45);
}

.di-reg-card__icon {
  font-size: 3.75rem;
}

.di-reg-card__title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.di-reg-card--priv .di-reg-card__title {
  color: #2f9f60;
}

.di-reg-card--comp .di-reg-card__title {
  color: #221B19;
}

.di-reg-card__text {
  margin: 0 0 22px;
  color: #5f6368;
  font-size: 0.98rem;
  line-height: 1.45;
}

.di-reg-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.di-reg-card__btn:hover {
  transform: translateY(-1px);
}

.di-reg-card__btn--priv {
  background: linear-gradient(135deg, #31aa67 0%, #268b54 100%);
  box-shadow: 0 16px 28px -18px rgba(47, 159, 96, 0.55);
}

.di-reg-card__btn--comp {
  background: linear-gradient(135deg, #221B19 0%, #3a2d28 100%);
  box-shadow: 0 16px 28px -18px rgba(34, 27, 25, 0.52);
}

.di-reg-note {
  padding: 0 26px 26px;
}

.di-reg-note__alert {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(139, 111, 71, 0.22);
  background: rgba(255, 246, 227, 0.88);
  color: #6a4f23;
  box-shadow: 0 14px 24px -24px rgba(139, 111, 71, 0.45);
}

.di-reg-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(34, 27, 25, 0.18);
  border-radius: 14px;
  background: #ffffff;
  color: #221B19;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 16px 28px -24px rgba(20, 14, 12, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.di-reg-back-btn:hover {
  transform: translateY(-1px);
  background: #f7f3f1;
  box-shadow: 0 18px 30px -24px rgba(20, 14, 12, 0.28);
}

.di-reg-back-btn .material-icons {
  font-size: 20px;
}

/* Bottone/tab che mostra il tipo scelto */
#txt_tipo {
  margin: 0.25rem 0 0.75rem 0;
}
#txt_tipo_btn {
  white-space: normal;
  line-height: 1.2;
}

/* Messaggio rivenditore/contatti (se presente) */
#txt_comp,
#txt_contatti {
  margin: 0.75rem 0 0 0;
  font-size: 0.95rem;
  color: #444;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .di-reg-selector__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .di-reg-selector__hero {
    padding: 28px 22px 24px;
  }
  .di-reg-selector__title {
    font-size: 1.55rem;
  }
  .di-reg-selector__grid {
    gap: 16px;
    padding: 20px;
  }
  .di-reg-card {
    padding: 22px 18px 18px;
  }
  .di-reg-card__title {
    font-size: 1.2rem;
  }
  .di-reg-card__text {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }
}

@media (max-width: 480px) {
  .di-reg-selector__hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
  }
  .di-reg-selector__title {
    font-size: 1.3rem;
  }
  .di-reg-selector__grid {
    gap: 12px;
    padding: 16px;
  }
  .di-reg-card__icon {
    font-size: 3rem;
  }
  .di-reg-card__btn {
    min-height: 46px;
    font-size: 0.94rem;
  }
  .di-reg-back-btn {
    width: 100%;
    padding: 0 18px;
    font-size: 0.92rem;
  }
}

/* Footer registrazione: centra anche il bottone SALVA (alcuni temi lo flottano a sinistra) */
#customer-form #registration-form-footer .form-control-submit,
#customer-form .form-footer .form-control-submit {
  float: none !important;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-left: auto !important;
  margin-right: auto !important;
  min-width: 180px;
}

/* Footer registrazione: centra DAVVERO il blocco (tema con colonne non bilanciate) */
#customer-form #registration-form-footer.form-footer.row {
  justify-content: center;
}
#customer-form #registration-form-footer.form-footer.row > .col-lg-3 {
  display: none;
}
#customer-form #registration-form-footer.form-footer.row > .col-lg-6 {
  flex: 0 1 720px;
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Forza centratura reale del contenuto dentro la colonna footer (testo + bottone) */
#customer-form #registration-form-footer.form-footer.row > .col-lg-6 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center !important;
}
#customer-form #registration-form-footer #txt_contatti {
  width: 100%;
  max-width: 720px;
  text-align: center !important;
}
#customer-form #registration-form-footer #txt_contatti a {
  display: inline-block;
}

/* reCAPTCHA: evita overflow su mobile */
.g-recaptcha {
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 380px) {
  .g-recaptcha {
    transform: scale(0.92);
    transform-origin: 0 0;
  }
}

/* === Modal guidato B2B (OpenAPI) — riprogettato in coerenza col Welcome modal === */
.di-b2b-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}
.di-b2b-modal.is-open {
  display: block;
}
.di-vat-retry-modal {
  z-index: 100030;
}
.di-vat-retry-modal .di-b2b-modal__dialog {
  max-width: 460px;
}
.di-vat-retry-modal__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6f625a;
}
.di-b2b-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(139, 111, 71, 0.28), rgba(20, 14, 12, 0.78));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: default;
  animation: diB2bFade 260ms ease-out;
}
@keyframes diB2bFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.di-b2b-modal__dialog {
  position: relative;
  margin: 6vh auto 0;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 22px;
  padding: 0;
  z-index: 100001;
  box-shadow:
    0 30px 60px -15px rgba(20, 14, 12, 0.55),
    0 12px 25px -10px rgba(139, 111, 71, 0.30);
  animation: diB2bPop 320ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}
@keyframes diB2bPop {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* HERO scuro (#221B19) con texture sottile e decorazioni SVG */
.di-b2b-modal__hero {
  position: relative;
  padding: 26px 32px 24px;
  color: #ffffff;
  overflow: hidden;
  background-color: #221B19;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(139, 111, 71, 0.35) 0%, rgba(139, 111, 71, 0) 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
}
.di-b2b-modal__hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.di-b2b-modal__hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.di-b2b-modal__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  backdrop-filter: blur(4px);
  margin-bottom: 12px;
}
.di-b2b-modal__step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.di-b2b-modal__step-dot.is-active {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}
.di-b2b-modal__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(139, 111, 71, 0.45);
  align-self: center;
  margin: 2px auto 14px;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
  animation: diB2bFloatX 2.8s ease-in-out infinite;
  will-change: transform;
}
@keyframes diB2bFloatX {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-7px) rotate(-2deg);
  }
  50% {
    transform: translateX(7px) rotate(2deg);
  }
  75% {
    transform: translateX(-4px) rotate(-1deg);
  }
}
.di-b2b-modal__title {
  position: relative;
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.di-b2b-modal__desc {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  line-height: 1.45;
}

/* CLOSE button sopra l'hero scuro */
.di-b2b-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  font-size: 0;
  line-height: 1;
  transition: background 160ms ease, transform 160ms ease;
  backdrop-filter: blur(4px);
}
.di-b2b-modal__close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

/* BODY con campi a card */
.di-b2b-modal__body {
  padding: 22px 32px 8px;
}
.di-b2b-modal__fields {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}
.di-b2b-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.di-b2b-modal__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.di-b2b-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.di-b2b-modal__input-icon {
  position: absolute;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color 160ms ease;
  z-index: 1;
}
.di-b2b-modal__input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  outline: none;
}
.di-b2b-modal__input--with-icon {
  padding-left: 42px;
}
.di-b2b-modal__input:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.di-b2b-modal__input:focus {
  background: #ffffff;
  border-color: #8B6F47;
  box-shadow: 0 0 0 4px rgba(139, 111, 71, 0.18);
}
.di-b2b-modal__input::placeholder {
  color: #94a3b8;
}
.di-b2b-modal__input-wrap:focus-within .di-b2b-modal__input-icon {
  color: #8B6F47;
}
select.di-b2b-modal__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B6F47' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 36px;
  cursor: pointer;
}

/* Phone badge (fallback se intl-tel-input non caricato) */
.di-b2b-modal__phone-wrap {
  position: relative;
}
.di-b2b-modal__phone-badge {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(139, 111, 71, 0.12);
  border: 1px solid rgba(139, 111, 71, 0.30);
  color: #221B19;
  font-size: 12px;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 1;
}
.di-b2b-modal__phone-input {
  padding-left: 92px;
}
.di-b2b-modal__hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

/* FOOTER azioni */
.di-b2b-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 32px 24px;
  margin-top: 8px;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.di-b2b-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 12px;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease, color 160ms ease, border-color 160ms ease;
  border: 0;
}
.di-b2b-modal__btn--ghost {
  background: transparent;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  padding: 10.5px 18px;
}
.di-b2b-modal__btn--ghost:hover {
  background: #f1f5f9;
  color: #221B19;
  border-color: #cbd5e1;
}
.di-b2b-modal__btn--primary {
  min-width: 160px;
  background: #221B19;
  color: #ffffff;
  box-shadow:
    0 8px 18px -6px rgba(34, 27, 25, 0.55),
    inset 0 0 0 1px rgba(139, 111, 71, 0.35);
}
.di-b2b-modal__btn--primary:hover {
  transform: translateY(-1px);
  background: #2e2520;
  box-shadow:
    0 12px 22px -6px rgba(34, 27, 25, 0.65),
    inset 0 0 0 1px rgba(139, 111, 71, 0.55);
}
.di-b2b-modal__btn--primary:active {
  transform: translateY(0);
}
.di-b2b-modal__btn--primary svg {
  transition: transform 200ms ease;
}
.di-b2b-modal__btn--primary:hover svg {
  transform: translateX(3px);
}
.di-b2b-modal__error {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13.5px;
  line-height: 1.4;
}

/* Responsive: bottom sheet su mobile (allineato al welcome modal) */
@media (max-width: 540px) {
  .di-b2b-modal__dialog {
    margin: 0;
    border-radius: 22px 22px 0 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    animation: diB2bSlideUp 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes diB2bSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .di-b2b-modal__hero { padding: 22px 22px 22px; }
  .di-b2b-modal__body { padding: 20px 22px 8px; }
  .di-b2b-modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 16px 22px 22px;
  }
  .di-b2b-modal__btn { width: 100%; }
}

/* blocca scroll pagina quando modal aperto */
html.di-b2b-modal-open,
html.di-b2b-modal-open body {
  overflow: hidden !important;
}

/* =========================================================================
   intl-tel-input — adattamenti per layout PrestaShop / modal B2B
   ========================================================================= */

/* Wrapper iti deve occupare tutta la larghezza del campo (PS usa form-control 100%). */
.iti {
  display: block;
  width: 100%;
}

/* Quando l'input è dentro il modal B2B: rimuovere il padding-left aggiunto per
   il vecchio "badge" (ora nascosto perché soppiantato dalla bandierina iti). */
.di-b2b-modal__phone-wrap .iti .di-b2b-modal__phone-input {
  padding-left: 12px;
}

/* L'input dentro .iti deve restare full width e mantenere l'altezza dei campi PS. */
.iti input.form-control,
.iti input.di-b2b-modal__input {
  width: 100% !important;
}

/* z-index del dropdown paesi: i modal/banner FO talvolta hanno overlay alti.
   Assicuriamo che il menu paesi sia sempre cliccabile. */
.iti__dropdown-content,
.iti__country-list {
  z-index: 100010 !important;
}

/* Bandierine: assicura che le flag sprite siano visibili dentro il modal
   (z-index alto per stare sopra il backdrop). */
.di-b2b-modal .iti__selected-country-primary {
  z-index: 100002;
}
.iti__flag {
  display: inline-block;
}

/* Nel modal, il campo telefono con iti non deve avere il padding-left extra del badge */
.di-b2b-modal .iti input[type="tel"] {
  padding-left: 52px;
}

/* Dropdown paesi nel modal: assicura posizionamento sopra il dialog */
.di-b2b-modal .iti--inline-dropdown .iti__dropdown-content {
  z-index: 100010 !important;
}

/* Nel modal B2B il menu paesi deve poter uscire dal dialog senza essere
   tagliato e avere abbastanza spazio per mostrare nome paese + prefisso. */
.di-b2b-modal__body,
.di-b2b-modal__fields,
.di-b2b-modal__field,
.di-b2b-modal__phone-wrap,
.di-b2b-modal .iti,
.di-b2b-modal .iti--inline-dropdown {
  overflow: visible;
}

.di-b2b-modal .iti--inline-dropdown .iti__dropdown-content,
.di-b2b-modal .iti__country-list {
  min-width: 320px;
  width: max-content;
  max-width: min(420px, calc(100vw - 48px));
}

.di-b2b-modal .iti__country {
  white-space: nowrap;
}

.di-b2b-modal .iti__dial-code {
  margin-left: auto;
  padding-left: 14px;
}

@media (max-width: 540px) {
  .di-b2b-modal .iti--inline-dropdown .iti__dropdown-content,
  .di-b2b-modal .iti__country-list {
    min-width: 0;
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
  }
}

/* Campo telefono nel form registrazione: più spazio per la bandierina */
#customer-form .iti input[type="tel"] {
  padding-left: 52px;
}

/* ============================================================== */
/* Welcome modal (raccoglie nome + cognome subito dopo PRIVATO/RIVENDITORE) */
/* ============================================================== */
.di-welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: none;
}
.di-welcome-modal.is-open {
  display: block;
}
html.di-welcome-modal-open {
  overflow: hidden;
}
.di-welcome-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(139, 111, 71, 0.28), rgba(20, 14, 12, 0.78));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: diWelcomeFade 260ms ease-out;
}
@keyframes diWelcomeFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.di-welcome-modal__dialog {
  position: relative;
  margin: 6vh auto 0;
  max-width: 520px;
  width: calc(100% - 32px);
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -15px rgba(20, 14, 12, 0.55),
    0 12px 25px -10px rgba(139, 111, 71, 0.30);
  animation: diWelcomePop 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes diWelcomePop {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* HERO: sfondo brand #221B19 con texture sottile (radial warm + grain SVG) */
.di-welcome-modal__hero {
  position: relative;
  padding: 28px 32px 26px;
  color: #ffffff;
  overflow: hidden;
  background-color: #221B19;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(139, 111, 71, 0.35) 0%, rgba(139, 111, 71, 0) 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
}
.di-welcome-modal__hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.di-welcome-modal__hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.di-welcome-modal__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  backdrop-filter: blur(4px);
  margin-bottom: 14px;
}
.di-welcome-modal__step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.di-welcome-modal__step-dot.is-active {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.di-welcome-modal__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  align-self: center;
  margin: 2px auto 14px;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
  animation: diWelcomeFloatX 2.8s ease-in-out infinite;
  will-change: transform;
}
@keyframes diWelcomeFloatX {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-7px) rotate(-2deg);
  }
  50% {
    transform: translateX(7px) rotate(2deg);
  }
  75% {
    transform: translateX(-4px) rotate(-1deg);
  }
}
.di-welcome-modal__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.di-welcome-modal__tagline {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

/* CLOSE button (sopra il hero) */
.di-welcome-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  color: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  transition: background 160ms ease, transform 160ms ease;
  backdrop-filter: blur(4px);
}
.di-welcome-modal__close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

/* BODY con campi */
.di-welcome-modal__body {
  padding: 22px 32px 8px;
}
.di-welcome-modal__desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: #475569;
  line-height: 1.5;
}
.di-welcome-modal__fields {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}
.di-welcome-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.di-welcome-modal__label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.di-welcome-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.di-welcome-modal__input-icon {
  position: absolute;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color 160ms ease;
}
.di-welcome-modal__input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  font-size: 15px;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.di-welcome-modal__input::placeholder {
  color: #94a3b8;
}
.di-welcome-modal__input:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.di-welcome-modal__input:focus {
  outline: none;
  background: #ffffff;
  border-color: #8B6F47;
  box-shadow: 0 0 0 4px rgba(139, 111, 71, 0.18);
}
.di-welcome-modal__input:focus + .di-welcome-modal__input-icon,
.di-welcome-modal__input-wrap:focus-within .di-welcome-modal__input-icon {
  color: #8B6F47;
}
.di-welcome-modal__error {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 13.5px;
}

/* FOOTER con privacy + bottone */
.di-welcome-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 32px 24px;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.di-welcome-modal__privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
  flex: 1;
}
.di-welcome-modal__privacy svg {
  color: #10b981;
  flex-shrink: 0;
}
.di-welcome-modal__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  background: #221B19;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  box-shadow:
    0 8px 18px -6px rgba(34, 27, 25, 0.55),
    inset 0 0 0 1px rgba(139, 111, 71, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  justify-content: center;
}
.di-welcome-modal__btn:hover {
  transform: translateY(-1px);
  background: #2e2520;
  box-shadow:
    0 12px 22px -6px rgba(34, 27, 25, 0.65),
    inset 0 0 0 1px rgba(139, 111, 71, 0.55);
}
.di-welcome-modal__btn:active {
  transform: translateY(0);
}
.di-welcome-modal__btn svg {
  transition: transform 200ms ease;
}
.di-welcome-modal__btn:hover svg {
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 540px) {
  .di-welcome-modal__dialog {
    margin: 0;
    border-radius: 22px 22px 0 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
    animation: diWelcomeSlideUp 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes diWelcomeSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .di-welcome-modal__hero { padding: 22px 22px 22px; }
  .di-welcome-modal__body { padding: 20px 22px 8px; }
  .di-welcome-modal__footer {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 22px 22px;
  }
  .di-welcome-modal__privacy { order: 2; justify-content: center; text-align: center; }
  .di-welcome-modal__btn { order: 1; width: 100%; }
}

/* ============================================================== */
/* Banner di benvenuto personalizzato (B2C, sopra al form)        */
/* ============================================================== */
.di-b2c-welcome-banner {
  position: relative;
  margin: 0 0 22px;
  padding: 18px 22px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34, 27, 25, 0.06) 0%, rgba(139, 111, 71, 0.10) 100%),
    #ffffff;
  border: 1px solid rgba(139, 111, 71, 0.28);
  box-shadow: 0 10px 30px -12px rgba(34, 27, 25, 0.22);
  overflow: hidden;
  animation: diBannerSlide 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.di-b2c-welcome-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(139, 111, 71, 0.22) 0%, rgba(139, 111, 71, 0) 70%);
  pointer-events: none;
}
.di-b2c-welcome-banner::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #221B19 0%, #8B6F47 100%);
  border-radius: 4px 0 0 4px;
}
@keyframes diBannerSlide {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.di-b2c-welcome-banner__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}
.di-b2c-welcome-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #221B19 0%, #3a2c25 60%, #8B6F47 100%);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 6px 14px -4px rgba(34, 27, 25, 0.50);
  flex-shrink: 0;
  animation: diBannerWave 2.4s ease-in-out 0.3s 2;
  transform-origin: 70% 70%;
}
@keyframes diBannerWave {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-12deg); }
  40%      { transform: rotate(14deg); }
  60%      { transform: rotate(-8deg); }
  80%      { transform: rotate(8deg); }
}
.di-b2c-welcome-banner__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.di-b2c-welcome-banner__greet {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.di-b2c-welcome-banner__sub {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.4;
}
