/* ============================================================
   Asador Asomadilla · Widget de reservas
   Tema OSCURO / ORO — coherente con la web (estilo Lecanda).
   ============================================================ */
:root {
  --brasa: #e8a33d;        /* oro: acento principal */
  --brasa-dark: #d18f2c;   /* oro oscuro (hover) */
  --ember: #e07b39;        /* cálido / alertas suaves */
  --gold: #e8a33d;         /* dorado */
  --cream: #0c0a09;        /* fondo noche */
  --paper: #16120f;        /* tarjetas/inputs (noche-2) */
  --paper-2: #221b14;      /* realce/hover */
  --ink: #f5f0e6;          /* texto crema */
  --muted: #9a8f80;        /* texto humo */
  --line: #2e2820;         /* bordes */
  --ok: #43a047;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

.widget {
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

/* ── Cabecera ── */
.w-header {
  background: linear-gradient(135deg, #1a1410 0%, #0c0a09 100%);
  color: var(--ink);
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.w-brand { display: flex; align-items: center; gap: 14px; }
.w-logo {
  font-size: 28px;
  background: rgba(232, 163, 61, 0.12);
  border: 1px solid rgba(232, 163, 61, 0.5);
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.w-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px; margin: 0; letter-spacing: 0.3px; font-weight: 600;
}
.w-sub { margin: 2px 0 0; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

/* ── Pasos ── */
.w-steps {
  display: flex; gap: 4px;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.w-step {
  flex: 1; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 6px 4px; border-radius: 20px; white-space: nowrap;
  position: relative;
}
.w-step.is-active { color: var(--brasa); background: rgba(232, 163, 61, 0.14); }
.w-step.is-done { color: var(--ok); }
.w-step.is-done::after { content: ' ✓'; }

/* ── Cuerpo ── */
.w-body { flex: 1; padding: 24px 22px; }
.w-panel { display: none; animation: fade 0.25s ease; }
.w-panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.w-q {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px; margin: 0 0 20px; color: var(--ink); font-weight: 600;
}

/* ── Campos ── */
.w-field { margin-bottom: 18px; }
.w-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.w-field label small { font-weight: 400; color: var(--muted); }
.w-field input, .w-field textarea, .w-field select {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: var(--paper); color: var(--ink);
  transition: border-color 0.15s;
}
.w-field input::placeholder, .w-field textarea::placeholder { color: rgba(154, 143, 128, 0.7); }
.w-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.w-field input:focus, .w-field textarea:focus, .w-field select:focus {
  outline: none; border-color: var(--brasa);
}
.w-field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; cursor: pointer; }
.w-field textarea { resize: vertical; }

/* ── Stepper +/- ── */
.w-stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper);
}
.w-stepper button {
  width: 52px; height: 52px; border: none; background: var(--paper);
  font-size: 26px; color: var(--brasa); cursor: pointer; font-weight: 600;
  transition: background 0.12s;
}
.w-stepper button:hover { background: rgba(232, 163, 61, 0.12); }
.w-stepper button:disabled { color: var(--line); cursor: not-allowed; background: var(--paper); }
.w-st-value { width: 64px; text-align: center; font-size: 22px; font-weight: 700; }

/* ── Selector de zona (Comedor / Terraza) ── */
.w-zonas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-zona {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); cursor: pointer; transition: all 0.15s; color: var(--ink);
}
.w-zona:hover { border-color: var(--brasa); }
.w-zona.is-selected { background: var(--brasa); border-color: var(--brasa); color: #0c0a09; }
.w-zona-ico { font-size: 26px; line-height: 1; }
.w-zona-txt { font-size: 15px; font-weight: 700; }

.w-bignote {
  font-size: 13px; color: var(--gold); background: rgba(232, 163, 61, 0.10);
  border: 1px solid rgba(232, 163, 61, 0.35); border-radius: 10px; padding: 10px 12px; margin-top: 4px;
  display: none;
}
.w-bignote.show { display: block; }

/* ── Calendario ── */
.w-cal { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.w-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.w-cal-head button {
  width: 36px; height: 36px; border: none; background: rgba(232, 163, 61, 0.12); color: var(--brasa);
  border-radius: 8px; font-size: 18px; cursor: pointer;
}
.w-cal-head button:disabled { opacity: 0.3; cursor: not-allowed; }
.w-cal-title { font-weight: 700; font-size: 15px; text-transform: capitalize; }
.w-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.w-cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.w-cal-day {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 8px;
  font-size: 14px; cursor: pointer; color: var(--ink); font-weight: 500;
}
.w-cal-day:hover:not(:disabled) { background: rgba(232, 163, 61, 0.12); }
.w-cal-day.is-closed { color: #5a5048; text-decoration: line-through; cursor: not-allowed; }
.w-cal-day:disabled { color: #4a423a; cursor: not-allowed; }
.w-cal-day.is-selected { background: var(--brasa); color: #0c0a09; font-weight: 700; }
.w-cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.w-cal-day.is-empty { visibility: hidden; }

/* ── Horarios ── */
.w-day-label { text-transform: capitalize; color: var(--brasa); font-weight: 600; margin: -8px 0 16px; }
.w-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; min-height: 80px; }
.w-slot {
  padding: 12px 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink); transition: all 0.12s;
}
.w-slot:hover:not(:disabled) { border-color: var(--brasa); }
.w-slot.is-selected { background: var(--brasa); color: #0c0a09; border-color: var(--brasa); }
.w-slot:disabled { color: #5a5048; background: #14100d; cursor: not-allowed; text-decoration: line-through; }
.w-svc-label {
  grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px; padding-top: 4px;
}
.w-svc-label:first-child { margin-top: 0; }
.w-loading, .w-closed { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 20px; }
.w-closed { color: var(--ember); }

/* ── Resumen ── */
.w-summary { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.w-summary-row { display: flex; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.w-summary-row:last-child { border-bottom: none; }
.w-summary-row .k { color: var(--muted); }
.w-summary-row .v { font-weight: 600; text-align: right; }

.w-notice {
  margin-top: 16px; font-size: 13px; color: var(--gold);
  background: rgba(232, 163, 61, 0.10); border: 1px solid rgba(232, 163, 61, 0.30); border-radius: 10px; padding: 11px 13px;
}
.w-error {
  margin-top: 14px; font-size: 14px; color: #ff8a80;
  background: rgba(229, 57, 53, 0.12); border: 1px solid rgba(229, 57, 53, 0.4); border-radius: 10px; padding: 11px 13px;
}

/* ── Checkbox ── */
.w-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.w-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brasa); }

/* ── Botones ── */
.w-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.w-btn {
  padding: 13px 22px; border-radius: 10px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer; border: 1.5px solid transparent; font-family: inherit; transition: all 0.15s;
}
.w-btn-primary { background: var(--brasa); color: #0c0a09; }
.w-btn-primary:hover { background: var(--brasa-dark); }
.w-btn-primary:disabled { background: #3a322a; color: #7a7066; cursor: not-allowed; }
.w-btn-ghost { background: transparent; color: var(--brasa); border-color: var(--line); }
.w-btn-ghost:hover { background: rgba(232, 163, 61, 0.10); }
.w-btn-block { width: 100%; margin-top: 20px; }

/* ── Éxito ── */
.w-success { text-align: center; }
.w-check-circle {
  width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 40px; display: grid; place-items: center; margin: 6px auto 18px;
}
.w-success-text { color: var(--muted); margin: 0 0 8px; }
.w-ref {
  font-family: 'Cormorant Garamond', serif; font-size: 32px; letter-spacing: 3px; font-weight: 700;
  color: var(--gold); background: var(--paper); border: 2px dashed var(--gold);
  border-radius: 12px; padding: 12px; margin: 0 0 18px;
}

.w-manage-hint { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.w-manage-hint a { color: var(--brasa); font-weight: 600; }

/* ── Pie ── */
.w-footer {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 22px; background: var(--paper); border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .widget { border-radius: 0; min-height: 100vh; border: none; }
  .w-slots { grid-template-columns: repeat(3, 1fr); }
}
