/* ═══════════════════════════════════════════════════════════════
   Modo Reservas — Booking page styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Layout ─────────────────────────────────────────────────── */
.booking-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ─── Header compacto ────────────────────────────────────────── */
.booking-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px var(--page-pad);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: heroIn 0.4s var(--ease) both;
}

.booking-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  flex-shrink: 0;
}

.booking-back:hover { color: var(--text); }

.booking-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.booking-header-avatar,
.booking-header-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.booking-header-avatar { object-fit: cover; border: 2px solid var(--border); }

.booking-header-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.booking-header-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-header-role {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ─── Contenido principal ────────────────────────────────────── */
.booking-body {
  flex: 1;
  padding: clamp(24px, 4vw, 48px) var(--page-pad);
  max-width: 900px;
  margin-inline: auto;
  width: 100%;
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 640px) {
  .booking-grid { grid-template-columns: 1fr; }
}

/* ─── Panel / tarjeta ────────────────────────────────────────── */
.booking-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: cardIn 0.45s var(--ease) both;
  animation-delay: 0.08s;
}

.booking-grid > #gb-right { animation-delay: 0.16s; }

.booking-panel-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

/* ─── Calendario ─────────────────────────────────────────────── */
.calendar {
  padding: 16px;
  user-select: none;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-month {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: capitalize;
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}

.calendar-nav-btn:hover:not(:disabled) {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
}

.calendar-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  padding: 4px 0;
}

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

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  color: var(--text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

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

.calendar-day--empty    { cursor: default; }
.calendar-day--today    { font-weight: 800; border-color: var(--accent); color: var(--accent); }
.calendar-day--selected { background: var(--accent); color: #fff; font-weight: 700; }
.calendar-day--disabled { opacity: 0.3; cursor: not-allowed; }
.calendar-day--no-schedule { opacity: 0.25; cursor: not-allowed; }

/* ─── Slots de hora ──────────────────────────────────────────── */
.slots-container {
  padding: 12px 16px 16px;
  max-height: 320px;
  overflow-y: auto;
}

.slots-date-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: capitalize;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 400px) {
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
}

.slot {
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  background: transparent;
}

.slot:hover:not(.slot--taken) {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.slot--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.04);
}

.slot--taken {
  opacity: 0.3;
  cursor: not-allowed;
  text-decoration: line-through;
}

.slots-empty {
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 24px 0;
}

/* ─── Formulario ─────────────────────────────────────────────── */
.booking-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-label span { color: var(--accent); }

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* Resumen de cita seleccionada */
.booking-summary {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.5;
  display: none;
}

.booking-summary.visible { display: block; }

.booking-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: opacity var(--transition), transform var(--transition);
  font-family: var(--font);
}

.booking-submit:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.booking-submit:active:not(:disabled) { transform: scale(0.97); }
.booking-submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ─── Estado de éxito ────────────────────────────────────────── */
@keyframes successIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.booking-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) var(--page-pad);
  animation: successIn 0.45s var(--ease) both;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-btn);
}

.success-icon svg { width: 36px; height: 36px; color: #fff; }

.success-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  color: var(--text);
}

.success-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 32px;
}

.success-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  text-align: left;
  width: 100%;
  max-width: 380px;
  margin-bottom: 32px;
}

.success-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.success-detail-row:last-child { border-bottom: none; }

.success-detail-label {
  font-weight: 700;
  color: var(--text-tertiary);
  min-width: 80px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.success-detail-value {
  color: var(--text);
  font-weight: 500;
}

.success-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.success-back:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Loading inline ─────────────────────────────────────────── */
.inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.inline-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
