/* AP5 · Sistema visual premium unificado Leveling */
:root {
  --lvl-ink: #12110e;
  --lvl-ink-soft: #272219;
  --lvl-paper: #fbfaf6;
  --lvl-paper-soft: #f3eee4;
  --lvl-gold: #c99537;
  --lvl-gold-bright: #efca78;
  --lvl-gold-pale: #f7e5b9;
  --lvl-text: #211d17;
  --lvl-text-secondary: #5f594f;
  --lvl-text-muted: #716a60;
  --lvl-line: rgba(105,76,29,.17);
  --lvl-line-strong: rgba(168,119,39,.38);
  --lvl-danger: #8f372e;
  --lvl-danger-bg: #f9e9e6;
  --lvl-success: #2e6f45;
  --lvl-success-bg: #e7f2e9;
  --lvl-warning: #7c581a;
  --lvl-warning-bg: #f7edda;
  --lvl-info: #385c75;
  --lvl-info-bg: #e8f0f4;
  --lvl-radius-control: 12px;
  --lvl-radius-card: 19px;
  --lvl-radius-dialog: 24px;
  --lvl-shadow-card: 0 18px 45px rgba(45,32,12,.09), inset 0 1px rgba(255,255,255,.82);
  --lvl-shadow-dialog: 0 34px 100px rgba(8,7,5,.4);
  --lvl-focus: rgba(203,148,54,.62);
  --lvl-ease: cubic-bezier(.16,1,.3,1);
}

:where(.booking-app,.staff-login-page) {
  color: var(--lvl-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:where(
  .wizard-next,.wizard-back,.booking-retry-button) {
  min-height: 44px !important;
  font-size: 14px !important;
  line-height: 1.2;
}

:where(
  .booking-form,.waitlist-invite form) :where(input,select,textarea)::placeholder { color: #797268 !important; opacity: 1; }

:where(
  .booking-calendar-card,.booking-times-card,.booking-available-barbers,
  .product-grid > article,.shop-cart,.shop-assurances > span,
  .admin-stats article,
  .barber-portal-stats article,.barber-bookings article,.schedule-days article
) {
  border-radius: var(--lvl-radius-card);
  box-shadow: var(--lvl-shadow-card);
}

/* Mensajes compartidos */
.lvl-feedback {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--lvl-line);
  border-left-width: 3px;
  border-radius: 15px;
  background: var(--lvl-paper-soft);
  box-shadow: 0 10px 26px rgba(42,30,12,.06), inset 0 1px rgba(255,255,255,.82);
}
.lvl-feedback.is-compact { grid-template-columns: 36px minmax(0,1fr) auto; padding: 11px 13px; }
.lvl-feedback-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lvl-ink); color: var(--lvl-gold-bright); font: 700 17px/1 Georgia,serif; }
.lvl-feedback.is-compact .lvl-feedback-icon { width: 34px; height: 34px; }
.lvl-feedback-copy { display: grid; gap: 4px; min-width: 0; }
.lvl-feedback-copy > strong { color: var(--lvl-text); font-family: Georgia,"Times New Roman",serif; font-size: 18px; font-weight: 400; }
.lvl-feedback-copy > div { color: var(--lvl-text-secondary); font-size: 12px; line-height: 1.55; }
.lvl-feedback-copy p { margin: 0; color: inherit; font-size: inherit; }
.lvl-feedback-action { display: flex; align-items: center; gap: 8px; }
.lvl-feedback-action :where(button,a) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 15px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.lvl-feedback[data-tone="error"] { border-color: rgba(143,55,46,.25); border-left-color: var(--lvl-danger); background: var(--lvl-danger-bg); color: var(--lvl-danger); }
.lvl-feedback[data-tone="error"] .lvl-feedback-icon { background: var(--lvl-danger); color: #fff; }
.lvl-feedback[data-tone="warning"] { border-color: rgba(124,88,26,.25); border-left-color: var(--lvl-warning); background: var(--lvl-warning-bg); color: var(--lvl-warning); }
.lvl-feedback[data-tone="success"] { border-color: rgba(46,111,69,.23); border-left-color: var(--lvl-success); background: var(--lvl-success-bg); color: var(--lvl-success); }
.lvl-feedback[data-tone="success"] .lvl-feedback-icon { background: var(--lvl-success); color: #fff; }
.lvl-feedback[data-tone="info"] { border-color: rgba(56,92,117,.22); border-left-color: var(--lvl-info); background: var(--lvl-info-bg); color: var(--lvl-info); }

.lvl-empty-state {
  display: grid;
  justify-items: center;
  place-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 34px 22px;
  border: 1px dashed var(--lvl-line-strong);
  border-radius: var(--lvl-radius-card);
  background: linear-gradient(145deg,rgba(255,255,255,.84),rgba(244,238,226,.72));
  text-align: center;
}
.lvl-empty-state.is-compact { min-height: 150px; padding: 22px 18px; }
.lvl-empty-state > span { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--lvl-line-strong); border-radius: 50%; background: var(--lvl-ink); color: var(--lvl-gold-bright); font: 400 19px/1 Georgia,serif; }
.lvl-empty-state > strong { color: var(--lvl-text); font-family: Georgia,"Times New Roman",serif; font-size: 20px; font-weight: 400; }
.lvl-empty-state > div:not(.lvl-empty-action) { max-width: 440px; color: var(--lvl-text-secondary); font-size: 12px; line-height: 1.55; }
.lvl-empty-state p { margin: 0; font-size: inherit; }
.lvl-empty-action { margin-top: 3px; }
.lvl-empty-action :where(button,a) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--lvl-ink); border-radius: 999px; background: var(--lvl-ink); color: var(--lvl-gold-bright); cursor: pointer; font-size: 14px; font-weight: 800; text-decoration: none; }

:where(.wizard-error) {
  min-height: 44px;
  padding: 12px 14px !important;
  border: 1px solid rgba(143,55,46,.24) !important;
  border-left: 3px solid var(--lvl-danger) !important;
  border-radius: 12px !important;
  background: var(--lvl-danger-bg) !important;
  color: #762b24 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
:where(.booking-email-confirmed) {
  min-height: 44px;
  padding: 12px 14px !important;
  border: 1px solid rgba(46,111,69,.22) !important;
  border-left: 3px solid var(--lvl-success) !important;
  border-radius: 12px !important;
  background: var(--lvl-success-bg) !important;
  color: #245c39 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* Club alterna superficies oscuras y claras: evita que la regla histórica
   de texto blanco reduzca el contraste en las secciones color marfil. */

/* Filtros compartidos */

/* Diálogos compartidos */

/* Esqueletos y niveles de movimiento */
:where(.booking-choice-skeletons,.booking-slots-skeleton) { border-radius: var(--lvl-radius-card); }
@keyframes lvlSurfaceIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .lvl-feedback { grid-template-columns: 38px minmax(0,1fr); padding: 13px; }
  .lvl-feedback-icon { width: 36px; height: 36px; }
  .lvl-feedback-action { grid-column: 1 / -1; width: 100%; }
  .lvl-feedback-action :where(button,a) { width: 100%; }
  .lvl-empty-state { min-height: 180px; padding: 27px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; }
}
