/* ============================================================
   WIDGET CSS – Balcó del Vedat Reservation Form
   Warm, elegant Mediterranean design system
   ============================================================ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* Brand colors */
  --color-primary:       #462a18;
  --color-primary-light: #8B5E3C;
  --color-primary-dark:  #4A2E1A;
  --color-primary-rgb:   70, 42, 24;

  /* Backgrounds */
  --color-bg:            #f4f2f0;
  --color-bg-alt:        #f4f2f0;
  --color-bg-card:       #FFFFFF;
  --color-bg-input:      #f4f2f0;

  /* Text */
  --color-text:          #2C1810;
  --color-text-light:    #6B5B50;
  --color-text-muted:    #9B8A7D;

  /* Accent */
  --color-accent:        #C8942A;
  --color-accent-light:  #E0B04A;
  --color-accent-dark:   #A07820;

  /* Feedback */
  --color-success:       #4CAF50;
  --color-success-bg:    #E8F5E9;
  --color-error:         #D32F2F;
  --color-error-bg:      #FFEBEE;
  --color-warning:       #FF9800;
  --color-info:          #5B8DB8;
  --color-info-bg:       #EAF0F6;

  /* Borders */
  --color-border:        #E8DDD4;
  --color-border-focus:  var(--color-primary);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(70, 42, 24, 0.06), 0 1px 2px rgba(70, 42, 24, 0.08);
  --shadow-md:  0 4px 12px rgba(70, 42, 24, 0.08), 0 2px 4px rgba(70, 42, 24, 0.06);
  --shadow-lg:  0 10px 30px rgba(70, 42, 24, 0.10), 0 4px 8px rgba(70, 42, 24, 0.06);
  --shadow-xl:  0 20px 50px rgba(70, 42, 24, 0.12), 0 8px 16px rgba(70, 42, 24, 0.06);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Typography */
  --font-heading: 'Roboto Slab', 'Georgia', serif;
  --font-body:    'Manrope', 'Segoe UI', system-ui, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ── Widget Container ── */
.widget-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    position: relative;
    animation: fadeInUp 0.6s var(--ease-out) both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Loading Overlay ── */
.widget-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.widget-loader.active {
  opacity: 1;
  pointer-events: all;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Header ── */
.widget-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.widget-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.widget-logo-img {
  height: 70px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.widget-subtitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

/* ── Welcome Section ── */
.widget-welcome {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.widget-welcome > p:first-child {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.widget-notice {
  display: flex;
  gap: var(--space-sm);
  background: var(--color-info-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 3px solid var(--color-info);
}

.notice-icon {
  width: 20px;
  height: 20px;
  color: var(--color-info);
  flex-shrink: 0;
  margin-top: 2px;
}

.widget-notice p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ── Form Styles ── */
.widget-form {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

/* Form group */
.form-group {
  margin-bottom: var(--space-lg);
  animation: fadeIn var(--duration-normal) var(--ease-out) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Show/hide animation for arroz fields */
.form-group--slide {
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out),
              margin var(--duration-slow) var(--ease-out);
}
.form-group--slide.hidden {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}
.form-group--slide.visible {
  max-height: 200px;
  opacity: 1;
}

/* Two-column row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Labels */
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.01em;
}

.required {
  color: var(--color-error);
  font-weight: 700;
}

.arroz-note {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Inputs & Selects */
.widget-form input[type="text"],
.widget-form input[type="tel"],
.widget-form input[type="date"],
.widget-form input[type="number"],
.widget-form select,
.widget-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg-input);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

/* Select arrow */
.widget-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B5B50' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Number input arrows */
.widget-form input[type="number"] {
  -moz-appearance: textfield;
}
.widget-form input[type="number"]::-webkit-inner-spin-button,
.widget-form input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 36px;
}

/* Focus states */
.widget-form input:focus,
.widget-form select:focus,
.widget-form textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
  background: #FFFFFF;
}

/* Hover states */
.widget-form input:hover:not(:focus):not(:disabled),
.widget-form select:hover:not(:focus):not(:disabled),
.widget-form textarea:hover:not(:focus):not(:disabled) {
  border-color: var(--color-primary-light);
}

/* Disabled state */
.widget-form input:disabled,
.widget-form select:disabled,
.widget-form textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--color-bg-alt);
}

/* Error state */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}
.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

/* Textarea */
.widget-form textarea {
  resize: vertical;
  min-height: 80px;
}

/* Field hint */
.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* Field error message */
.field-error {
  display: none;
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 4px;
  font-weight: 500;
  animation: shakeIn 0.3s var(--ease-spring);
}

.form-group.has-error .field-error {
  display: block;
}

@keyframes shakeIn {
  0%   { transform: translateX(-6px); opacity: 0; }
  40%  { transform: translateX(4px); }
  70%  { transform: translateX(-2px); }
  100% { transform: translateX(0); opacity: 1; }
}

/* ── Submit Button ── */
.form-actions {
  margin-top: var(--space-xl);
}

.btn-submit {
  width: 100%;
  padding: 0.95rem 2rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3);
  letter-spacing: 0.02em;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

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

/* Shimmer effect on button */
.btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: none;
}
.btn-submit:hover::after {
  animation: shimmer 1.2s ease;
}

@keyframes shimmer {
  to { left: 100%; }
}

/* Loading state */
.btn-submit.loading .btn-text {
  opacity: 0;
}
.btn-submit.loading .btn-spinner {
  display: block;
}
.btn-submit .btn-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* General error */
.form-error-general {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-md);
  color: var(--color-error);
  font-size: 0.9rem;
  text-align: center;
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

/* ── Success Screen ── */
.success-screen {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  text-align: center;
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.success-animation {
  margin-bottom: var(--space-lg);
}

.success-checkmark {
  width: 80px;
  height: 80px;
}

.checkmark-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle 0.6s 0.2s var(--ease-out) forwards;
}

.checkmark-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s 0.7s var(--ease-out) forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-success);
  margin-bottom: var(--space-sm);
}

.success-message {
  color: var(--color-text-light);
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.success-details {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  text-align: left;
}

.success-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}
.success-details .detail-row:last-child {
  border-bottom: none;
}
.success-details .detail-label {
  font-weight: 600;
  color: var(--color-text);
}
.success-details .detail-value {
  color: var(--color-text-light);
}

.success-contact {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.btn-new-reservation {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-new-reservation:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

/* ── Footer ── */
.widget-footer {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
}

.widget-footer p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .widget-container {
    padding: var(--space-md) var(--space-sm);
  }

  .widget-logo-img {
    height: 55px;
  }

  .widget-form {
    padding: var(--space-lg) var(--space-md);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .widget-welcome {
    padding: var(--space-md);
  }

  .widget-notice {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .success-screen {
    padding: var(--space-xl) var(--space-md);
  }
}

/* ── Print ── */
@media print {
  .widget-form,
  .widget-footer,
  .btn-new-reservation {
    display: none;
  }
}

/* ── Accessibility: focus-visible ── */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   NUEVOS ESTILOS - FLUJO DE 2 PASOS E INLINE CALENDAR
   ============================================================ */

.form-step {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .step-layout-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.form-label-header {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* Calendario Inline */
.calendar-inline {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
}

.calendar-inline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.calendar-inline-month-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  white-space: nowrap;
  flex: 1;
}

.btn-cal-nav {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: 1rem;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-cal-nav:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.calendar-inline-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.calendar-inline-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day, .calendar-day-empty {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  user-select: none;
}

.calendar-day {
  cursor: pointer;
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease-out);
}

.calendar-day:hover:not(.disabled) {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.calendar-day.today {
  border: 1.5px solid var(--color-accent);
}

.calendar-day.selected {
  background: var(--color-primary) !important;
  color: #FFFFFF !important;
  font-weight: bold;
}

.calendar-day.disabled {
  color: var(--color-text-muted);
  opacity: 0.3;
  cursor: not-allowed;
}

/* Service Pills */
.service-pills {
  display: flex;
  gap: var(--space-sm);
  margin-top: 4px;
}

.btn-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-pill:hover:not(:disabled) {
  border-color: var(--color-primary-light);
  background: var(--color-bg-alt);
}

.btn-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Step 2 Summary Bar */
.step-summary-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-bg-alt);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
  margin-bottom: var(--space-lg);
}

.btn-back-link {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.btn-back-link:hover {
  text-decoration: underline;
}

.step-summary-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Checkbox Labels */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-light);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}
2ۦ8
R