/*
 * Sound Max — pagina Richiesta preventivo (template-richiesta.php).
 */

.sm-rq { padding-bottom: 120px; }

/* ---------- Intestazione ---------- */
.sm-rq__head { padding: 56px 0 24px; display: flex; flex-direction: column; gap: 24px; }
/* Testo introduttivo scritto nell'editor, sopra il modulo */
.sm-rq__contenuto > p { margin: 0 0 16px; max-width: 60ch; color: var(--sm-text-2); font-size: 18px; }
.sm-rq__blocco > .sm-rq__passi { margin: 24px 0 40px; }
.sm-rq__head h1 { font-weight: 800; font-size: clamp(36px, 5.6vw, 76px); line-height: .95; letter-spacing: -.02em; max-width: 14ch; }
.sm-rq__intro { max-width: 60ch; color: var(--sm-text-2); font-size: 18px; }
.sm-rq__intro > * { margin: 0; }
.sm-rq__intro > * + * { margin-top: 12px; }
.sm-rq__passi { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font: 500 12px/1.2 var(--sm-font-mono); letter-spacing: .075em; text-transform: uppercase; }
.sm-rq__passi a { color: var(--sm-muted); text-decoration: none; }
.sm-rq__passi a:hover { color: var(--sm-accent); }

/* ---------- Colonne ---------- */
.sm-rq__cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.sm-rq__main { flex: 1.6 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.sm-rq__aside { flex: 1 1 320px; min-width: 0; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }

/*
 * Su schermo largo la colonna di destra ("Come funziona" + invio) parte
 * all'altezza del titolo della pagina. Titolo e colonna stanno in contenitori
 * diversi (template e blocco): i contenitori in mezzo diventano "trasparenti"
 * (display: contents) e .sm-rq fa da griglia. Tutto il resto va a sinistra.
 */
@media (min-width: 1000px) {
	.sm-rq { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); column-gap: 56px; align-items: start; }
	.sm-rq > *, .sm-rq__blocco > *, .sm-rq__form > *, .sm-rq__cols > * { grid-column: 1; }
	.sm-rq__contenuto, .sm-rq__blocco, .sm-rq__form:not([hidden]), .sm-rq__cols { display: contents; }
	.sm-rq__cols > .sm-rq__aside { grid-column: 2; grid-row: 1 / span 30; margin-top: 56px; }
}

.sm-rq__sez { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 100px; }
.sm-rq__sez h2 { display: flex; align-items: baseline; gap: 14px; font-size: 24px; }
.sm-rq__sez h2 > span:first-child { font: 500 12px var(--sm-font-mono); letter-spacing: .075em; color: var(--sm-accent); }
.sm-rq__sez-nota { margin: -8px 0 0; max-width: 60ch; font-size: 15px; color: var(--sm-muted); }

/* ---------- 01 Attrezzatura: "Mi affido a voi" oppure il carrello ---------- */
.sm-rq__sez h3 { margin: 0; font-size: 18px; }
.sm-rq__sez-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.sm-rq__affido-box { display: flex; flex-direction: column; gap: 10px; }
.sm-rq__affido { scroll-margin-top: 120px; }
/* Casella quadrata con la spunta (le scelte del servizio hanno il pallino). */
.sm-rq__affido .sm-servizio__top i { border-radius: 5px; }
.sm-rq__affido:has(input:checked) .sm-servizio__top i { background: var(--sm-accent); }
.sm-servizio.sm-rq__affido:has(input:checked) .sm-servizio__top i::after {
	width: 5px; height: 9px; margin-top: -2px; border-radius: 0; background: none;
	border: solid var(--sm-on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.sm-rq__affido:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.sm-rq__affido:has(input:disabled):hover { border-color: var(--sm-line-strong); }
.sm-rq__affido-pieno { margin: 0; font-size: 14px; color: var(--sm-muted); }
.sm-rq__affido-pieno[hidden] { display: none; }
.sm-rq__link {
	padding: 0; border: 0; background: none; cursor: pointer;
	font: inherit; font-weight: 600; color: var(--sm-accent); text-decoration: underline; text-underline-offset: 3px;
}
.sm-rq__link:hover { color: var(--sm-text); }

.sm-rq__carrello { display: flex; flex-direction: column; gap: 14px; }
.sm-rq__carrello[hidden], .sm-rq__bisogni[hidden] { display: none; }
.sm-rq__vuota { margin: 0; padding: 20px 0; border-top: 1px solid var(--sm-line); border-bottom: 1px solid var(--sm-line); color: var(--sm-muted); }
.sm-rq__vuota[hidden] { display: none; }
.sm-rq__lista { list-style: none; margin: 0; padding: 0; }
.sm-rq__lista:not(:empty) { border-top: 1px solid var(--sm-line); }
.sm-rq__item { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--sm-line); }
.sm-rq__item-media { flex: 0 0 72px; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; --disco: 88cqmin; }
.sm-rq__item-media img { width: 82%; height: 82%; object-fit: contain; }
.sm-rq__item-nome { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 17px; font-weight: 600; }
.sm-rq__item-nome a { text-decoration: none; }
.sm-rq__item .sm-qty button { width: 42px; height: 44px; font-size: 18px; }
.sm-rq__item .sm-qty button:disabled { color: var(--sm-faint); cursor: default; }
.sm-rq__item .sm-qty span { min-width: 24px; text-align: center; font-family: var(--sm-font-mono); }
.sm-rq__bisogni-opz { flex-wrap: wrap; }
.sm-rq__bisogni .sm-rq__sez-nota { margin: -4px 0 4px; }

/* Sotto "Invia": carrello vuoto senza "Mi affido a voi". */
.sm-rq__blocco-msg { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sm-text-2); }
.sm-rq__blocco-msg[hidden] { display: none; }
.sm-rq__blocco-msg a { color: var(--sm-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sm-rq__blocco-msg a:hover { color: var(--sm-text); }

/* ---------- Servizio ---------- */
.sm-rq__servizi { margin: 0; padding: 0; border: 0; min-width: 0; }
.sm-rq__servizi legend { padding: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--sm-text-2); }
.sm-rq__servizi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.sm-servizio {
	position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; cursor: pointer;
	border: 1px solid var(--sm-line-strong); border-radius: var(--sm-radius); background: transparent;
	transition: border-color .15s, background-color .15s;
}
.sm-servizio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sm-servizio__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.sm-servizio__top i {
	flex: 0 0 18px; width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--sm-line-strong);
	display: flex; align-items: center; justify-content: center;
}
.sm-servizio__desc { font-size: 14px; line-height: 1.4; color: var(--sm-muted); }
.sm-servizio:hover { border-color: var(--sm-muted); }
.sm-servizio:has(input:checked) { border-color: var(--sm-accent); background: rgba(255, 79, 139, .06); }
.sm-servizio:has(input:checked) .sm-servizio__top i { border-color: var(--sm-accent); }
.sm-servizio:has(input:checked) .sm-servizio__top i::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--sm-accent); }
.sm-servizio:has(input:focus-visible) { outline: 2px solid var(--sm-accent); outline-offset: 2px; }

/* ---------- Campi ---------- */
.sm-rq__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.sm-rq__grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.sm-rq__grid--3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 600px) {
	.sm-rq__grid--3 { grid-template-columns: 1fr 1fr; }
	.sm-rq__grid--3 > :first-child { grid-column: 1 / -1; }
}
.sm-f { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--sm-text-2); }
.sm-f--full { grid-column: 1 / -1; }
.sm-f--wide { grid-column: span 2; }
@media (max-width: 720px) { .sm-f--wide { grid-column: 1 / -1; } }
.sm-f em, .sm-consenso em, .sm-allegati__titolo em { font-style: normal; font-weight: 400; color: var(--sm-faint); }
.sm-f input, .sm-f select, .sm-f textarea {
	font: 400 16px/1.4 var(--sm-font-body); color: var(--sm-text); background: var(--sm-surface);
	border: 1px solid var(--sm-line); border-radius: var(--sm-radius-s); padding: 13px 14px; width: 100%;
	color-scheme: dark;
}
.sm-f textarea { resize: vertical; }
.sm-f :is(input, select, textarea):focus { outline: 2px solid var(--sm-accent); outline-offset: 2px; border-color: transparent; }
.sm-f [aria-invalid="true"] { border-color: var(--sm-error); }
.sm-f small { font: 400 12px var(--sm-font-mono); color: var(--sm-dim); }
.sm-f[hidden], .sm-f small[hidden] { display: none; }
.sm-f small[data-sm-rq-dopo] { color: var(--sm-accent); }

/* ---------- Parcheggio: Sì / No ---------- */
.sm-rq__scelta { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sm-rq__scelta legend { padding: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--sm-text-2); }
.sm-rq__scelta-opz { display: flex; gap: 10px; }
.sm-pill { position: relative; cursor: pointer; }
.sm-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sm-pill span {
	display: flex; align-items: center; justify-content: center; min-width: 88px; min-height: 48px; padding: 0 20px;
	border: 1px solid var(--sm-line-strong); border-radius: var(--sm-radius-s); font-weight: 600; color: var(--sm-text-2);
	transition: border-color .15s, background-color .15s, color .15s;
}
.sm-pill:hover span { border-color: var(--sm-muted); }
.sm-pill input:checked + span { border-color: var(--sm-accent); background: rgba(255, 79, 139, .06); color: var(--sm-text); }
.sm-pill input:focus-visible + span { outline: 2px solid var(--sm-accent); outline-offset: 2px; }
.sm-pill input[aria-invalid="true"] + span { border-color: var(--sm-error); }

/* ---------- Foto e video del luogo ---------- */
.sm-allegati { display: flex; flex-direction: column; gap: 12px; }
.sm-allegati__titolo { font-size: 14px; font-weight: 600; color: var(--sm-text-2); }
.sm-allegati__drop {
	position: relative; display: flex; align-items: center; gap: 16px; padding: 20px;
	border: 1px dashed var(--sm-line-strong); border-radius: var(--sm-radius); cursor: pointer;
	color: var(--sm-muted); font-size: 14px; transition: border-color .15s, background-color .15s;
}
.sm-allegati__drop svg { flex: 0 0 auto; color: var(--sm-accent); }
.sm-allegati__drop strong { display: block; margin-bottom: 2px; font-size: 15px; color: var(--sm-text); }
.sm-allegati__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sm-allegati__drop:hover, .sm-allegati__drop.is-sopra { border-color: var(--sm-accent); background: rgba(255, 79, 139, .04); }
.sm-allegati__drop:has(input:focus-visible) { outline: 2px solid var(--sm-accent); outline-offset: 2px; }
.sm-allegati__lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sm-line); }
.sm-allegati__lista[hidden] { display: none; }
.sm-allegati__file { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--sm-line); }
.sm-allegati__media {
	flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--sm-radius-s); overflow: hidden;
	background: var(--sm-surface); display: flex; align-items: center; justify-content: center;
}
.sm-allegati__media img { width: 100%; height: 100%; object-fit: cover; }
.sm-allegati__icona { font: 500 12px var(--sm-font-mono); letter-spacing: .075em; color: var(--sm-accent); }
.sm-allegati__nome { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.sm-allegati__nome span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-allegati__nome small { font: 400 12px var(--sm-font-mono); color: var(--sm-dim); }
.sm-allegati .sm-f { margin-top: 8px; }

.sm-f__err { margin: 0; font-size: 14px; font-weight: 400; color: var(--sm-error); }
.sm-rq__errore {
	margin: 0 0 32px; padding: 14px 18px; border: 1px solid var(--sm-error); border-radius: var(--sm-radius);
	color: var(--sm-error); font-size: 15px;
}

/* ---------- Consenso ---------- */
.sm-consenso { display: flex; flex-direction: column; gap: 8px; }
.sm-consenso label { position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--sm-text-2); cursor: pointer; }
.sm-consenso input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sm-consenso__box {
	flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px;
	border: 2px solid var(--sm-line-strong); display: flex; align-items: center; justify-content: center;
}
.sm-consenso input:checked + .sm-consenso__box { background: var(--sm-accent); border-color: var(--sm-accent); }
.sm-consenso input:checked + .sm-consenso__box::after {
	content: ""; width: 10px; height: 5px; margin-top: -3px;
	border-left: 3px solid var(--sm-on-accent); border-bottom: 3px solid var(--sm-on-accent); transform: rotate(-45deg);
}
.sm-consenso input:focus-visible + .sm-consenso__box { outline: 2px solid var(--sm-accent); outline-offset: 2px; }
.sm-consenso input[aria-invalid="true"] + .sm-consenso__box { border-color: var(--sm-error); }
.sm-consenso a { color: var(--sm-accent); }
.sm-consenso .sm-f__err { margin-left: 34px; }

/* Campo trappola per i bot: fuori dallo schermo, non "display:none". */
.sm-rq__trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Riepilogo ---------- */
.sm-rq__box { border-top: 1px solid var(--sm-line-strong); padding-top: 18px; display: flex; flex-direction: column; gap: 18px; }

/* Carrello nella colonna di destra (v0.27): compatto, tra "Come funziona" e il pulsante (v0.27.1, scelta dell'utente).
   Se è lungo scorre dentro di sé, così il pulsante resta a portata anche con la colonna sticky.
   Con il carrello vuoto il messaggio "vuoto" non si mostra: lo dice già l'invito sotto il pulsante. */
.sm-rq__box .sm-rq__carrello { gap: 10px; margin-top: -4px; }
.sm-rq__box .sm-rq__carrello h3 { font-size: 16px; }
.sm-rq__box .sm-rq__carrello .sm-link { font-size: 14px; }
.sm-rq__box .sm-rq__vuota { display: none; }
.sm-rq__box .sm-rq__lista { max-height: min(46vh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sm-rq__box .sm-rq__item { flex-wrap: nowrap; gap: 12px; padding: 10px 0; }
.sm-rq__box .sm-rq__item-media { flex-basis: 48px; width: 48px; height: 48px; }
.sm-rq__box .sm-rq__item-nome { flex: 1 1 auto; font-size: 14px; line-height: 1.3; }
.sm-rq__box .sm-rq__item-nome .sm-label { font-size: 11px; }
.sm-rq__box .sm-rq__item .sm-qty button { width: 30px; height: 34px; font-size: 16px; }
.sm-rq__box .sm-rq__item .sm-qty span { min-width: 18px; font-size: 14px; }
.sm-rq__box .sm-rq__rimuovi { width: 34px; height: 34px; }
.sm-rq__box .sm-rq__carrello { padding-top: 16px; border-top: 1px solid var(--sm-line); }

/* Avviso disponibilità sotto i prodotti del carrello: solo se ci sono prodotti. */
.sm-rq__box .sm-rq__disp { font-size: 13px; gap: 8px; }
.sm-rq__box .sm-rq__disp svg { width: 16px; height: 16px; }
.sm-rq__lista:empty + .sm-rq__disp { display: none; }

/* Come funziona: roadmap verticale (blocchi interni del modulo, stile in blocchi.css) */
.sm-rq__box > .sm-label, .sm-rq__box > p.sm-label { margin: 0; }
.sm-rq__box .sm-roadmap { --gap: 22px; margin: 4px 0 6px !important; gap: 22px; }
.sm-rq__box .sm-tappa h3 { font-size: 16px; }
.sm-rq__box .sm-tappa p { font-size: 14px; }

/* Barra di avanzamento dell'invio (col gradiente: è una "luce", senza testo sopra) */
.sm-rq__progresso { height: 3px; border-radius: 3px; background: var(--sm-line); overflow: hidden; margin-top: -8px; }
.sm-rq__progresso[hidden] { display: none; }
.sm-rq__progresso span { display: block; height: 100%; width: 0; background: var(--sm-grad); transition: width .2s; }
.sm-rq__invia { width: 100%; min-height: 56px; font-size: 17px; border: 0; }
.sm-rq__invia:disabled { opacity: .6; cursor: progress; }
.sm-rq__invia.is-bloccato:disabled { opacity: .4; cursor: not-allowed; }
.sm-rq__nota { margin: 0; font-size: 13px; color: var(--sm-muted); }
.sm-rq__wa {
	display: flex; align-items: center; gap: 12px; padding: 16px 20px; border: 1px solid var(--sm-line);
	border-radius: var(--sm-radius-l); text-decoration: none; font-size: 15px;
}
.sm-rq__wa svg { color: var(--sm-accent); flex: 0 0 auto; }
.sm-rq__wa:hover { border-color: var(--sm-accent); color: var(--sm-text); }

/* ---------- Conferma ---------- */
.sm-rq__ok {
	border-top: 1px solid var(--sm-line-strong);
	padding: 56px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; outline: none;
}
.sm-rq__ok[hidden] { display: none; }
.sm-rq__ok h2 { font-size: clamp(26px, 3.4vw, 44px); }
.sm-rq__ok p { margin: 0; font-size: 18px; color: var(--sm-text-2); max-width: 52ch; }
.sm-rq__ok-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.sm-rq__ok-bars i { width: 10px; background: var(--sm-accent); animation: sm-ok-bars 1.1s ease-in-out infinite alternate; }
.sm-rq__ok-bars i:nth-child(1) { height: 24px; animation-delay: -.2s; }
.sm-rq__ok-bars i:nth-child(2) { height: 56px; animation-delay: -.6s; }
.sm-rq__ok-bars i:nth-child(3) { height: 36px; animation-delay: -.1s; }
.sm-rq__ok-bars i:nth-child(4) { height: 48px; animation-delay: -.8s; }
.sm-rq__ok-bars i:nth-child(5) { height: 18px; animation-delay: -.4s; }
@keyframes sm-ok-bars { to { transform: scaleY(.45); } }
.sm-rq__ok-bars i { transform-origin: bottom; }

@media (max-width: 720px) {
	.sm-rq__head { padding: 40px 0 28px; }
	.sm-rq__main { gap: 44px; }
	.sm-rq__aside { position: static; }
	.sm-rq__ok { padding: 40px 24px; }
}

/* Pulsante per togliere un file */
.sm-rq__rimuovi {
	flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: var(--sm-radius-s); background: transparent;
	color: var(--sm-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.sm-rq__rimuovi:hover { color: var(--sm-error); background: var(--sm-surface); }
