/* ==========================================================================
   Modulo "Richiedi un preventivo"
   Usato da it/en/es richiedi-preventivo.html. Colori e misure ripresi
   dalla pagina Contatti (blu #1685ff, blu notte #050b1c, bordi #dfe4eb).
   ========================================================================== */

:root {
  --pv-blue: #1685ff;
  --pv-blue-soft: #e8f2ff;
  --pv-navy: #050b1c;
  --pv-ink: #080d1b;
  --pv-muted: #536174;
  --pv-line: #dfe4eb;
  --pv-bg: #f4f7fb;
  --pv-error: #c62828;
  --pv-radius: 10px;
}

/* Hero piu' basso rispetto alle altre pagine: qui conta il modulo */
.pv-hero {
  min-height: 420px;
}

.pv-hero .products-overview-hero-bg {
  background-image: url("../assets/images/hero/profilmover-contatti-header.webp");
}

@media (min-width: 1400px) {
  .pv-hero {
    min-height: 460px;
  }
}

/* --------------------------------------------------------------------------
   Contenitore e intro
   -------------------------------------------------------------------------- */
.pv-section-wrap {
  padding: 4rem 0 5rem;
  background: var(--pv-bg);
}

.pv-intro {
  max-width: 720px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.pv-intro::before {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin: 0 auto .8rem;
  background: var(--pv-blue);
}

.pv-intro-title {
  margin-bottom: .4rem;
  color: var(--pv-ink);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

.pv-intro-text {
  margin: 0;
  color: var(--pv-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.pv-form {
  max-width: 1100px;
  margin: 0 auto;
}

/* Il campo con errore non finisce sotto l'header fisso quando riceve il focus */
.pv-form input,
.pv-form textarea {
  scroll-margin-top: 130px;
}

/* --------------------------------------------------------------------------
   Card delle sezioni
   -------------------------------------------------------------------------- */
.pv-card {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 1.75rem 2rem 2rem;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(5, 11, 28, .05);
}

.pv-card-title {
  float: left; /* fa stare la legend dentro il bordo del fieldset */
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.5rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--pv-line);
  color: var(--pv-ink);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
}

.pv-card-title + * {
  clear: both;
}

.pv-step {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--pv-blue);
  font-size: 1rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Griglie
   -------------------------------------------------------------------------- */
.pv-grid {
  display: grid;
  gap: 1.1rem 1.5rem;
}

.pv-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pv-grid-cap {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.pv-span-2 {
  grid-column: 1 / -1;
}

.pv-groups {
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
}

/* Colonna campi + colonna immagine */
.pv-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 1.75rem;
}

.pv-split-tall {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-top: 1.75rem;
  border-top: 1px solid var(--pv-line);
}

/* --------------------------------------------------------------------------
   Campi
   -------------------------------------------------------------------------- */
.pv-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pv-label,
.pv-group-label {
  display: block;
  margin: 0 0 .4rem;
  color: var(--pv-ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
}

.pv-group-label {
  margin-bottom: .7rem;
  font-size: 1rem;
}

.pv-hint {
  color: var(--pv-muted);
  font-weight: 400;
  font-size: .88rem;
}

.pv-req {
  color: var(--pv-blue);
  font-weight: 700;
}

.pv-input {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1px solid #c9d2de;
  border-radius: 8px;
  color: var(--pv-ink);
  background: #fff;
  font-family: inherit;
  font-size: 1rem; /* 16px: evita lo zoom automatico su iPhone */
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}

.pv-input::placeholder {
  color: #8a96a6;
}

.pv-input:hover {
  border-color: #9fb0c4;
}

.pv-input:focus {
  outline: none;
  border-color: var(--pv-blue);
  box-shadow: 0 0 0 3px rgba(22, 133, 255, .18);
}

.pv-input:disabled {
  background: var(--pv-bg);
  cursor: not-allowed;
}

.pv-textarea {
  min-height: 120px;
  resize: vertical;
}

.pv-field.has-error .pv-input {
  border-color: var(--pv-error);
}

.pv-field.has-error .pv-input:focus {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .15);
}

.pv-error {
  display: none;
  margin-top: .35rem;
  color: var(--pv-error);
  font-size: .87rem;
  font-weight: 500;
}

.pv-field.has-error .pv-error {
  display: block;
}

/* Campo con unita' di misura a destra */
.pv-unit {
  position: relative;
  display: flex;
  align-items: stretch;
}

.pv-unit .pv-input {
  padding-right: 3.4rem;
}

.pv-unit-label {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  display: grid;
  place-items: center;
  width: 3rem;
  border-left: 1px solid var(--pv-line);
  border-radius: 0 7px 7px 0;
  color: var(--pv-muted);
  background: var(--pv-bg);
  font-size: .88rem;
  font-weight: 600;
  pointer-events: none;
}

/* Elenco misure */
.pv-measures {
  display: grid;
  gap: 1rem;
}

.pv-measure .pv-label {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.pv-tag {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 .3rem;
  border-radius: 6px;
  color: var(--pv-blue);
  background: var(--pv-blue-soft);
  font-size: .85rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Opzioni (checkbox e radio a pillola)
   -------------------------------------------------------------------------- */
.pv-group {
  min-width: 0;
}

.pv-options {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.pv-option {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.pv-option input,
.pv-guide input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pv-option span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1rem;
  border: 1px solid #c9d2de;
  border-radius: 999px;
  color: var(--pv-ink);
  background: #fff;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color .2s, background-color .2s, color .2s;
  user-select: none;
}

/* Indicatore: quadrato per le checkbox, cerchio per le radio */
.pv-option span::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #9fb0c4;
  border-radius: 5px;
  background: #fff center / 12px no-repeat;
  transition: border-color .2s, background-color .2s;
}

.pv-option input[type="radio"] + span::before {
  border-radius: 50%;
}

.pv-option:hover span {
  border-color: var(--pv-blue);
}

.pv-option input:checked + span {
  border-color: var(--pv-blue);
  color: var(--pv-navy);
  background: var(--pv-blue-soft);
}

.pv-option input[type="checkbox"]:checked + span::before {
  border-color: var(--pv-blue);
  background-color: var(--pv-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E");
}

.pv-option input[type="radio"]:checked + span::before {
  border-color: var(--pv-blue);
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 9px var(--pv-blue);
}

.pv-option input:focus-visible + span,
.pv-guide input:focus-visible ~ .pv-guide-name {
  outline: 3px solid rgba(22, 133, 255, .45);
  outline-offset: 2px;
}

/* Campo "Altro" */
.pv-altro {
  max-width: 460px;
  margin-top: .75rem;
}

/* --------------------------------------------------------------------------
   Immagini
   -------------------------------------------------------------------------- */
.pv-figure {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--pv-line);
  border-radius: var(--pv-radius);
  background: #fff;
}

.pv-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.pv-figure a {
  display: block;
  cursor: zoom-in;
}

/* Contenitore dello schema: grande quanto l'immagine, cosi' le lettere
   (le stesse etichette .pv-tag dei campi) restano al loro posto a ogni larghezza */
.pv-schema {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.pv-schema .pv-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  line-height: 1;
  pointer-events: none;
}

/* Il tema mette overflow:hidden su main.product-page, che impedisce lo sticky.
   "clip" taglia lo stesso cio' che esce di lato ma lascia funzionare lo sticky. */
main.product-page {
  overflow: clip;
}

.pv-figure-sticky {
  position: sticky;
  top: 110px;
}

/* Lo schema resta sempre intero nello schermo mentre si scorre */
.pv-figure-sticky img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  margin: 0 auto;
}

.pv-figcaption {
  margin-top: .6rem;
  color: var(--pv-muted);
  font-size: .85rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Guide di contrasto (card con immagine)
   -------------------------------------------------------------------------- */
.pv-guides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* La card contiene l'etichetta selezionabile e, separato, il link "Ingrandisci" */
.pv-guide {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--pv-line);
  border-radius: var(--pv-radius);
  background: #fff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.pv-guide:hover {
  border-color: #9fc6f5;
}

.pv-guide-select {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0;
  cursor: pointer;
}

/* Area immagine quadrata */
.pv-guide-img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
}

.pv-guide-img img {
  position: absolute;
  inset: 1.25rem;
  width: calc(100% - 2.5rem);
  height: calc(100% - 2.5rem);
  object-fit: contain;
}

.pv-guide-name {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 1; /* se un nome va a capo, le barre delle tre card restano alte uguali */
  min-height: 54px;
  padding: .8rem 8.5rem .8rem 1rem; /* spazio a destra per "Ingrandisci" */
  border-top: 1px solid var(--pv-line);
  color: var(--pv-ink);
  background: var(--pv-bg);
  font-weight: 600;
}

.pv-guide-name::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #9fb0c4;
  border-radius: 50%;
  background: #fff;
}

.pv-guide:has(input:checked) {
  border-color: var(--pv-blue);
  box-shadow: 0 6px 18px rgba(22, 133, 255, .15);
}

.pv-guide input:checked ~ .pv-guide-name {
  color: var(--pv-navy);
  background: var(--pv-blue-soft);
}

.pv-guide input:checked ~ .pv-guide-name::before {
  border-color: var(--pv-blue);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 9px var(--pv-blue);
}

/* Link "Ingrandisci": sta sopra la barra del nome, ma fuori dall'etichetta,
   cosi' il clic apre l'immagine senza selezionare l'opzione */
.pv-zoom {
  position: absolute;
  right: .6rem;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  padding: .3rem .65rem;
  border: 1px solid #c9d2de;
  border-radius: 6px;
  color: var(--pv-blue);
  background: #fff;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}

.pv-zoom:hover,
.pv-zoom:focus-visible {
  border-color: var(--pv-blue);
  color: var(--pv-blue);
  background: var(--pv-blue-soft);
}

.pv-zoom .bi {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Privacy, invio, esito
   -------------------------------------------------------------------------- */
.pv-submit-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: #fff;
}

.pv-submit-area .pv-field {
  max-width: 760px;
}

.pv-privacy {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 0;
  color: var(--pv-ink);
  font-size: .95rem;
  line-height: 1.5;
  cursor: pointer;
}

.pv-privacy input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: .15rem;
  accent-color: var(--pv-blue);
  cursor: pointer;
}

.pv-privacy a {
  color: var(--pv-blue);
  font-weight: 600;
  text-decoration: underline;
}

.pv-field.has-error .pv-privacy {
  color: var(--pv-error);
}

.pv-submit {
  min-width: 260px;
  justify-content: center;
}

.pv-submit:disabled {
  opacity: .6;
  cursor: wait;
}

.pv-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--pv-muted);
  font-weight: 500;
  text-align: center;
}

.pv-status.is-error {
  color: var(--pv-error);
}

.pv-done {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(5, 11, 28, .05);
}

.pv-done:focus {
  outline: none;
}

.pv-done-icon {
  display: block;
  margin-bottom: .75rem;
  color: var(--pv-blue);
  font-size: 3.5rem;
  line-height: 1;
}

.pv-done-title {
  margin-bottom: .5rem;
  color: var(--pv-ink);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
}

.pv-done-text {
  margin: 0;
  color: var(--pv-muted);
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Utilita'
   -------------------------------------------------------------------------- */
.pv-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pv-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .pv-split,
  .pv-split-tall {
    grid-template-columns: 1fr;
  }

  /* Su schermi stretti lo schema va prima delle misure a cui si riferisce */
  .pv-figure {
    order: -1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  .pv-figure-sticky {
    position: static;
    max-width: 420px;
  }
}

@media (max-width: 767.98px) {
  .pv-hero {
    min-height: 360px;
  }

  .pv-section-wrap {
    padding: 2.5rem 0 3.5rem;
  }

  .pv-card {
    padding: 1.25rem 1.1rem 1.5rem;
  }

  .pv-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Su telefono una card per riga, quadrata e larga */
  .pv-guides {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    gap: 1rem;
  }

  .pv-submit-area {
    padding: 1.25rem 1.1rem;
  }

  .pv-submit {
    width: 100%;
    min-width: 0;
  }
}
