/* ═══════════════════════════════════════════════════════
   Modulo Prenotazione Servizi — Stili
   Font: Cormorant Garamond (display) + DM Sans (body)
   Tema: Luxury / Refined — oro su avorio caldo
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --mp-bg:        #faf8f5;
  --mp-surface:   #ffffff;
  --mp-border:    #e8e2d9;
  --mp-gold:      #b8986a;
  --mp-gold-dark: #9a7d52;
  --mp-text:      #2c2416;
  --mp-muted:     #8a7d6b;
  --mp-error:     #c0392b;
  --mp-success:   #27ae60;
  --mp-radius:    12px;
  --mp-shadow:    0 4px 32px rgba(44,36,22,0.08);
  --mp-font-h:    'Cormorant Garamond', Georgia, serif;
  --mp-font-b:    'DM Sans', sans-serif;
}

/* ── Wrapper ──────────────────────────────────────────── */
#modulo-prenotazione-wrap {
  max-width: 640px;
  margin: 2rem auto;
  background: var(--mp-surface);
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
  border: 1px solid var(--mp-border);
  overflow: hidden;
  font-family: var(--mp-font-b);
  color: var(--mp-text);
}

/* ── Progress ─────────────────────────────────────────── */
.mp-progress-wrap {
  background: var(--mp-bg);
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--mp-border);
}

.mp-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.75rem;
}

.mp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mp-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--mp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mp-muted);
  background: white;
  transition: all 0.3s ease;
}

.mp-step.active .mp-step-dot,
.mp-step.done .mp-step-dot {
  border-color: var(--mp-gold);
  background: var(--mp-gold);
  color: white;
}

.mp-step-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-muted);
  font-weight: 500;
}

.mp-step.active .mp-step-label {
  color: var(--mp-gold-dark);
}

.mp-step-line {
  flex: 1;
  height: 1px;
  background: var(--mp-border);
  margin: 0 6px;
  margin-bottom: 18px;
  transition: background 0.3s ease;
}

.mp-step-line.done {
  background: var(--mp-gold);
}

.mp-progress-bar {
  height: 3px;
  background: var(--mp-border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.mp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mp-gold-dark), var(--mp-gold));
  border-radius: 999px;
  width: 25%;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Panel ────────────────────────────────────────────── */
.mp-panel {
  display: none;
  padding: 2rem 2rem 1.5rem;
  animation: mp-fade-in 0.35s ease;
}

.mp-panel.active {
  display: block;
}

@keyframes mp-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel Header ─────────────────────────────────────── */
.mp-panel-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.mp-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.mp-panel-header h2 {
  font-family: var(--mp-font-h);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--mp-text);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.mp-panel-header p {
  font-size: 0.875rem;
  color: var(--mp-muted);
  margin: 0;
}

/* ── Fields ───────────────────────────────────────────── */
.mp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mp-field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-field label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mp-text);
}

.req { color: var(--mp-gold); }

.mp-field input[type="text"],
.mp-field input[type="tel"],
.mp-field input[type="email"],
.mp-field textarea {
  border: 1.5px solid var(--mp-border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-family: var(--mp-font-b);
  font-size: 0.95rem;
  color: var(--mp-text);
  background: var(--mp-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.mp-field input:focus,
.mp-field textarea:focus {
  border-color: var(--mp-gold);
  box-shadow: 0 0 0 3px rgba(184,152,106,0.15);
  background: white;
}

.mp-field input.mp-invalid,
.mp-field textarea.mp-invalid {
  border-color: var(--mp-error);
}

.mp-error {
  font-size: 0.75rem;
  color: var(--mp-error);
  min-height: 1em;
}

/* ── Radio Cards ──────────────────────────────────────── */
.mp-radio-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mp-radio-group.vertical {
  flex-direction: column;
  gap: 0.5rem;
}

.mp-radio-card {
  cursor: pointer;
  flex: 1;
  min-width: 120px;
}

.mp-radio-group.vertical .mp-radio-card {
  flex: none;
}

.mp-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mp-radio-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--mp-border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--mp-muted);
  background: var(--mp-bg);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mp-radio-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--mp-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mp-radio-card input:checked + .mp-radio-inner {
  border-color: var(--mp-gold);
  background: rgba(184,152,106,0.08);
  color: var(--mp-gold-dark);
  font-weight: 500;
}

.mp-radio-card input:checked + .mp-radio-inner .mp-radio-check {
  background: var(--mp-gold);
  border-color: var(--mp-gold);
  color: white;
}

/* ── Condizionale ─────────────────────────────────────── */
.mp-conditional {
  display: none;
  overflow: hidden;
  animation: mp-expand 0.3s ease;
}

.mp-conditional.visible {
  display: block;
}

@keyframes mp-expand {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Navigation ───────────────────────────────────────── */
.mp-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mp-border);
}

.mp-btn-prev {
  background: none;
  border: none;
  color: var(--mp-muted);
  font-family: var(--mp-font-b);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.mp-btn-prev:hover { color: var(--mp-text); }

.mp-btn-next,
.mp-btn-submit {
  background: var(--mp-text);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.75rem;
  font-family: var(--mp-font-b);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-btn-next:hover,
.mp-btn-submit:hover {
  background: var(--mp-gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(154,125,82,0.3);
}

.mp-btn-submit {
  background: linear-gradient(135deg, var(--mp-gold-dark), var(--mp-gold));
}

.mp-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ── Privacy Checkbox ─────────────────────────────────── */
.mp-privacy-field {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.mp-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-transform: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mp-muted);
  line-height: 1.5;
}

.mp-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mp-checkbox-inner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1.5px solid var(--mp-border);
  border-radius: 4px;
  background: var(--mp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.2s ease;
}

.mp-checkbox-check {
  font-size: 0.65rem;
  color: transparent;
  transition: color 0.15s ease;
}

.mp-checkbox-label input:checked + .mp-checkbox-inner {
  background: var(--mp-gold);
  border-color: var(--mp-gold);
}

.mp-checkbox-label input:checked + .mp-checkbox-inner .mp-checkbox-check {
  color: white;
}

.mp-checkbox-label.mp-invalid-check .mp-checkbox-inner {
  border-color: var(--mp-error);
}

.mp-checkbox-text {
  flex: 1;
}

.mp-checkbox-text a {
  color: var(--mp-gold-dark);
  text-decoration: underline;
  text-decoration-color: rgba(154,125,82,0.4);
  transition: text-decoration-color 0.2s;
}

.mp-checkbox-text a:hover {
  text-decoration-color: var(--mp-gold-dark);
}

/* ── Success ──────────────────────────────────────────── */
#mp-success {
  padding: 3rem 2rem;
  text-align: center;
}

.mp-success-icon { font-size: 3rem; margin-bottom: 1rem; }

#mp-success h2 {
  font-family: var(--mp-font-h);
  font-size: 2rem;
  color: var(--mp-text);
  margin: 0 0 0.5rem;
}

#mp-success p {
  color: var(--mp-muted);
  font-size: 0.95rem;
}

/* ── Global Error ─────────────────────────────────────── */
#mp-global-error {
  margin: 0 2rem 1rem;
  padding: 0.85rem 1rem;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 8px;
  color: var(--mp-error);
  font-size: 0.875rem;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 520px) {
  .mp-panel { padding: 1.5rem 1.25rem; }
  .mp-row { grid-template-columns: 1fr; }
  .mp-progress-wrap { padding: 1.25rem 1.25rem 0.75rem; }
  .mp-step-label { display: none; }
  .mp-radio-group { flex-direction: column; }
}
