/* Pagina /recensioni: si appoggia a site.css (colori, carattere, .hero, .cta, .btn-outline, .footer). */

.rv [hidden] { display: none !important; }

.rv .hero .wrap { padding-top: 24px; padding-bottom: 28px; }
.rv-top { display: flex; align-items: center; gap: 14px; }
.avatar--sm, .avatar--sm img { width: 72px; height: 72px; }
.avatar--sm::after { top: 4px; right: 4px; width: 10px; height: 10px; }
.rv-top .label { margin: 0; }
.rv-name { margin: 2px 0 0; font-size: 17px; font-weight: 700; }
.rv h1 { margin-top: 20px; font-size: 30px; line-height: 1.12; text-wrap: balance; }
.rv-intro { margin: 12px 0 0; font-size: 17px; line-height: 1.5; font-weight: 500; }

/* Modulo */
.rv-form { display: flex; flex-direction: column; gap: 24px; padding-top: 28px; }
.rv-legend { margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.req { color: var(--accent); font-weight: 800; }
.opt { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .field-label { font-size: 16px; font-weight: 700; line-height: 1.35; padding: 0; }
.field > legend { margin-bottom: 8px; }
.hint { margin: -2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); font-weight: 500; }
fieldset.field .hint { margin-top: 2px; }

.rv input[type="text"], .rv select, .rv textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--navy); font: inherit; font-size: 16px; line-height: 1.45;
  -webkit-appearance: none; appearance: none;
}
.rv textarea { resize: vertical; min-height: 120px; }
.rv select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23213866' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.rv select:invalid { color: var(--muted); }
.rv input[type="text"]:focus, .rv select:focus, .rv textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(33, 56, 102, 0.12);
}
.rv ::placeholder { color: #8A97B2; opacity: 1; }
.field.invalid input[type="text"], .field.invalid select, .field.invalid textarea { border-color: var(--red); }

/* Scelte a pulsante */
.choices { display: grid; grid-template-columns: 1fr; gap: 8px; }
.choices--2 { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--white);
  font-size: 16px; font-weight: 600;
}
.choice span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--muted); background: var(--white);
}
.choice input:checked + span { border-color: var(--navy); background: var(--ice); }
.choice input:checked + span::before { border-color: var(--navy); background: radial-gradient(circle, var(--accent) 0 5px, var(--white) 5.5px); }
.choice input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.field.invalid .choice span { border-color: var(--red); }

/* Caselle di spunta */
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 2px; cursor: pointer; font-size: 15.5px; line-height: 1.45; font-weight: 500; }
.check input {
  flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--muted); border-radius: 6px;
  background: var(--white); -webkit-appearance: none; appearance: none; cursor: pointer; display: grid; place-content: center;
}
.check input::after {
  content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--white); border-bottom: 2.5px solid var(--white);
  transform: translateY(-1px) rotate(-45deg); opacity: 0;
}
.check input:checked { background: var(--navy); border-color: var(--navy); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.field.invalid .check input { border-color: var(--red); }

/* Foto */
.upload {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px;
  border: 1.5px dashed #B4BDD0; border-radius: 12px; background: var(--ice); cursor: pointer;
  font-size: 16px; font-weight: 700;
}
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.preview { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.preview img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--ice); }
.preview-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; font-weight: 600; }
.preview-info span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* Privacy */
.privacy { padding: 16px; border-radius: 16px; background: var(--ice); }
.privacy > p { margin: 0; font-size: 14px; line-height: 1.55; font-weight: 500; }
.privacy details summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer;
  font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.privacy-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; }

/* Errori */
.err { margin: 0; font-size: 14px; font-weight: 600; color: var(--red); }
.err--form { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--red); background: var(--white); line-height: 1.45; }

/* Trappola per i bot */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Invio */
.rv-submit { width: 100%; margin-top: 4px; border: 0; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.rv-submit:disabled { cursor: progress; filter: none; opacity: 0.75; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: var(--white); animation: rv-spin 0.8s linear infinite; }
.rv-submit.is-busy .spinner { display: inline-block; }
@keyframes rv-spin { to { transform: rotate(360deg); } }

/* Grazie */
.rv-thanks { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 40px; outline: none; }
.rv-target { width: 56px; height: 56px; }
.rv-thanks h2 { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.rv-thanks p { margin: 0; font-size: 17px; line-height: 1.55; font-weight: 500; }
.rv-thanks .rv-sign { font-weight: 800; }
.rv-thanks .btn-outline { margin-top: 8px; }

.rv .footer { padding-top: 40px; }
.rv .footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}
