/* Riportal — Apri pratica wizard */

#rp-apri-pratica {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: unset;
}

.rp-root {
  --rp-bg: #f2f5f7;
  --rp-surface: #ffffff;
  --rp-ink: #16232e;
  --rp-primary: #1f5c8b;
  --rp-primary-dark: #164667;
  --rp-accent: #f2a93b;
  --rp-muted: #64788a;
  --rp-line: #d9e2e9;
  --rp-ok: #2e8b57;
  --rp-warn: #b3541e;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--rp-ink);
  background: var(--rp-bg);
  min-height: 60vh;
  box-sizing: border-box;
}

.rp-root *,
.rp-root *::before,
.rp-root *::after {
  box-sizing: border-box;
}

.rp-display {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rp-hero {
  position: relative;
  background: linear-gradient(160deg, var(--rp-primary-dark), var(--rp-primary));
  color: #fff;
  padding: 36px 18px 40px;
  overflow: hidden;
}

.rp-hero-inner {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.rp-hero-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.rp-hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
}

.rp-hero p {
  margin: 0;
  font-size: 16px;
  opacity: 0.92;
  max-width: 480px;
}

.rp-hero-phone {
  margin-top: 12px !important;
  font-size: 14px !important;
  opacity: 0.8 !important;
}

.rp-hero-phone a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}

.rp-hero-phone a:hover,
.rp-hero-phone a:focus,
.rp-hero-phone a:active,
.rp-hero-phone a:visited {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rp-wizard {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}

.rp-start-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  color: var(--rp-ink);
  font: inherit;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rp-start-tile:hover {
  border-color: #b8c4ce;
  background: #fafbfc;
}

.rp-start-tile:focus-visible {
  outline: 2px solid var(--rp-primary);
  outline-offset: 2px;
}

.rp-start-tile-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.rp-start-tile-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rp-start-tile-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a2b3a;
  line-height: 1.25;
}

.rp-start-tile-sub {
  font-size: 13px;
  font-weight: 400;
  color: #6b7f90;
  line-height: 1.4;
}

.rp-start-tile-arrow {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--rp-primary);
  line-height: 1;
  padding-left: 4px;
}

.rp-back {
  margin-bottom: 16px;
}

.rp-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.rp-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 20px;
}

.rp-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rp-line);
}

.rp-progress-dot.is-active {
  background: var(--rp-accent);
}

.rp-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 16px;
  padding: 22px;
}

.rp-step-q {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
}

.rp-field {
  margin-bottom: 16px;
}

.rp-field-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.rp-required {
  color: #c62828;
  font-weight: 700;
}

/* Honeypot: nascosto a umani, restano nel DOM per i bot. */
.rp-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.rp-field-hint {
  font-size: 13px;
  color: var(--rp-muted);
  margin-top: 5px;
}

.rp-field-hint.is-error {
  color: var(--rp-warn);
}

.rp-input.is-invalid,
.rp-textarea.is-invalid {
  border-color: var(--rp-warn);
}

.rp-lead {
  margin: 0 0 14px;
  color: var(--rp-muted);
  font-size: 14px;
  line-height: 1.5;
}

.rp-input,
.rp-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rp-line);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--rp-ink);
  outline: none;
}

.rp-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.rp-input-prefix {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1.5px solid var(--rp-line);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #f3f6f9;
  color: var(--rp-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

.rp-input.rp-input-with-prefix {
  border-radius: 0 10px 10px 0;
}

.rp-input-group:focus-within .rp-input-prefix {
  border-color: var(--rp-primary);
}

.rp-input-group:focus-within .rp-input {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 3px rgba(31, 92, 139, 0.12);
}

.rp-input-group .rp-input.is-invalid {
  border-color: var(--rp-warn);
}

.rp-input-group:has(.rp-input.is-invalid) .rp-input-prefix {
  border-color: var(--rp-warn);
}

.rp-input:focus,
.rp-textarea:focus {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 3px rgba(31, 92, 139, 0.12);
}

.rp-textarea {
  resize: vertical;
  min-height: 96px;
}

.rp-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  font-size: 16px;
  padding: 14px 22px;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.rp-btn:active {
  transform: scale(0.98);
}

.rp-btn:focus-visible {
  outline: 3px solid var(--rp-accent);
  outline-offset: 2px;
}

.rp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rp-btn.is-disabled-look {
  opacity: 0.55;
}

.rp-btn-primary {
  background: var(--rp-primary);
  color: #fff;
  width: 100%;
  margin-top: 18px;
}

.rp-btn-primary:hover:not(:disabled) {
  background: var(--rp-primary-dark);
}

.rp-btn-ghost {
  background: transparent;
  color: var(--rp-primary);
  border: 1.5px solid var(--rp-line);
  padding: 8px 14px;
  font-size: 14px;
}

.rp-btn-ghost:hover:not(:disabled) {
  border-color: var(--rp-primary);
}

.rp-btn-block {
  width: 100%;
}

.rp-resume-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.rp-otp-input {
  letter-spacing: 0.42em;
  font-size: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin: 8px 0 14px;
}

.rp-card .rp-btn-block {
  margin-top: 8px;
}

.rp-choice {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--rp-line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
  color: var(--rp-ink);
}

.rp-choice:hover {
  border-color: var(--rp-primary);
}

.rp-choice.is-selected {
  border-color: var(--rp-primary);
  background: rgba(31, 92, 139, 0.07);
  font-weight: 600;
}

.rp-danno-hint {
  margin: 0 0 12px;
  color: var(--rp-muted);
  font-size: 14px;
  line-height: 1.45;
}

.rp-danno-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rp-danno-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--rp-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  color: var(--rp-ink);
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rp-danno-card:hover {
  border-color: var(--rp-primary);
}

.rp-danno-card.is-selected {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 3px rgba(31, 92, 139, 0.18);
}

.rp-danno-card-media {
  display: block;
  background: #e8eef3;
  overflow: hidden;
}

.rp-danno-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rp-danno-card-label {
  display: block;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .rp-danno-cards {
    grid-template-columns: 1fr;
  }
}

.rp-choice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rp-choice-meta {
  font-size: 13px;
  color: var(--rp-muted);
  margin-top: 3px;
  font-weight: 400;
}

a.rp-choice-tel {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

a.rp-choice-tel:hover {
  border-color: var(--rp-primary);
}

.rp-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.rp-pill-ok {
  background: rgba(46, 139, 87, 0.12);
  color: var(--rp-ok);
}

.rp-pill-warn {
  background: rgba(179, 84, 30, 0.12);
  color: var(--rp-warn);
}

.rp-pill-info {
  background: rgba(31, 92, 139, 0.1);
  color: var(--rp-primary);
}

.rp-notice {
  border: 1.5px solid var(--rp-accent);
  background: rgba(242, 169, 59, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.45;
}

/* Avviso cristalli (compagnie gruppo 1/2) sotto "vetri / cristalli rotti". */
.rp-notice-cristalli {
  margin-top: 8px;
  margin-bottom: 4px;
}

/* Messaggio blocco pratica (elenco multi-riga da searchByTarga). */
.rp-notice-block {
  white-space: pre-line;
}

/* Avviso data sinistro diversa (> ±3 giorni) in ripresa. */
.rp-resume-date-mismatch {
  margin: 0 0 16px;
}

.rp-resume-date-line {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--rp-ink);
}

.rp-resume-date-value {
  margin: 0 0 16px;
  font-size: 1.55em;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--rp-ink);
}

.rp-resume-date-cta {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--rp-ink);
}

.rp-notice-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-file-label {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.rp-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.rp-allegati-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.45;
}

.rp-check input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--rp-primary);
  cursor: pointer;
}

.rp-privacy-link {
  color: var(--rp-primary);
  text-decoration: underline;
  cursor: pointer;
}

.rp-privacy-link:hover {
  text-decoration: none;
}

.rp-notice-success {
  border-color: #9bc4a8;
  background: #f0f7f2;
  color: #1e4d32;
}

.rp-summary {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.rp-done {
  max-width: 560px;
  margin: 0 auto;
  padding: 50px 18px;
  text-align: center;
}

.rp-done-icon {
  font-size: 48px;
  margin-bottom: 10px;
  line-height: 1;
}

.rp-done-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 10px;
}

.rp-done-text {
  font-size: 16px;
  color: var(--rp-muted);
  line-height: 1.6;
  margin: 0;
}

.rp-benefits {
  text-align: left;
  margin-top: 18px;
}

.rp-benefits-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.rp-benefits-list {
  font-size: 15px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-error {
  color: var(--rp-warn);
  font-size: 14px;
  margin-top: 10px;
}

/* ── Loader globale fisso a centro pagina ── */
.rp-global-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.rp-global-loader-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.rp-loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--rp-border, #d0d9e0);
  border-top-color: var(--rp-primary, #1a5fa8);
  border-radius: 50%;
  animation: rp-spin 0.7s linear infinite;
}
.rp-loader-label {
  font-size: 15px;
  color: var(--rp-muted, #6b7e8d);
  font-weight: 500;
}

/* Spinner inline nel bottone */
.rp-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rp-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes rp-spin {
  to { transform: rotate(360deg); }
}

.rp-autocomplete {
  position: relative;
}

.rp-autocomplete-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1.5px solid var(--rp-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(22, 35, 46, 0.12);
}

.rp-autocomplete-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  color: var(--rp-ink);
}

.rp-autocomplete-item:hover,
.rp-autocomplete-item:focus {
  background: rgba(31, 92, 139, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .rp-btn {
    transition: none;
  }
}


