/* Rian App — widget prenotazione del sito. Palette del sito (nero + ambra), Liquid Glass */

.rp {
  --rp-bianco: #f5f0e8;
  --rp-dim: rgba(245, 240, 232, 0.58);
  --rp-ambra: #6e9484;
  --rp-ambra-chiaro: #9dbdb0;
  --rp-bordo: rgba(255, 255, 255, 0.12);
  --rp-rosso: #e0705a;

  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--rp-bordo);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--rp-bianco);
  text-align: center;
}
.rp [hidden] { display: none !important; }
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }

.rp-foto {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 55%;
}

/* ─── Passo 1: righe con frecce ─────────────────────────────────────────── */

.rp-riga {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: stretch;
  min-height: 78px;
  border-bottom: 1px solid var(--rp-bordo);
}

.rp-freccia {
  background: none;
  border: 0;
  color: var(--rp-bianco);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.rp-freccia:active { transform: scale(0.85); }
.rp-freccia:disabled { opacity: 0.2; cursor: default; }

.rp-valore {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.rp-v { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.rp-l { font-size: 13px; color: var(--rp-dim); letter-spacing: 0.03em; }

/* Calendario invisibile sopra la data: un tocco apre il selettore del telefono */
.rp-data-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ─── Pulsanti e messaggi ───────────────────────────────────────────────── */

.rp-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 16px;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: var(--rp-ambra);
  color: #080808;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.rp-btn:active { transform: scale(0.98); }
.rp-btn:disabled { opacity: 0.35; cursor: default; }
.rp-btn-secondario { background: transparent; border: 1px solid var(--rp-bordo); color: var(--rp-bianco); }

.rp-msg { margin: 14px 20px 0; font-size: 14px; line-height: 1.45; color: var(--rp-dim); }
.rp-msg:empty { display: none; }
.rp-msg-errore { color: var(--rp-rosso); }

/* ─── Passo 2: dati del cliente ─────────────────────────────────────────── */

.rp-form { display: grid; gap: 14px; padding: 0 16px; text-align: left; }
.rp-form .rp-btn { width: 100%; margin: 2px 0 16px; }
.rp-form .rp-msg { margin: 0; }

.rp-riepilogo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 18px 16px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rp-bordo);
  color: var(--rp-bianco);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.rp-link { color: var(--rp-ambra-chiaro); font-size: 14px; white-space: nowrap; }

.rp-campo span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--rp-dim); }
.rp-campo input,
.rp-campo textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--rp-bordo);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--rp-bianco);
  font: inherit;
  font-size: 16px; /* evita lo zoom automatico di Safari iOS */
  -webkit-appearance: none;
  appearance: none;
}
.rp-campo textarea { resize: vertical; }
.rp-campo input:focus,
.rp-campo textarea:focus { outline: none; border-color: var(--rp-ambra); }
.rp-campo input::placeholder,
.rp-campo textarea::placeholder { color: rgba(245, 240, 232, 0.35); }

.rp-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--rp-dim); }
.rp-privacy input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--rp-ambra); }
.rp-privacy a { color: var(--rp-ambra-chiaro); }

/* ─── Passo 3: conferma ─────────────────────────────────────────────────── */

.rp-fatto { padding: 28px 20px 4px; animation: rp-appari 0.3s ease; }
.rp-fatto h3 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.rp-fatto p { margin: 0 auto; max-width: 380px; font-size: 15px; line-height: 1.5; color: var(--rp-dim); }
.rp-fatto .rp-btn { width: 100%; margin: 24px 0 16px; }
.rp-spunta {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--rp-ambra);
  color: #080808;
  font-size: 28px;
  font-weight: 600;
}

@keyframes rp-appari { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .rp *, .rp { animation: none !important; transition: none !important; }
}

/* Orario al completo: si vede l'ora ma l'etichetta diventa rossa */
.rp-l-completo { color: var(--rp-rosso); font-weight: 600; }
