/**
 * =============================================================================
 * ESTILOS DEL CALENDARIO DE RESERVAS (WORDPRESS FRONTEND CSS)
 * =============================================================================
 * Diseño Moderno, Minimalista y 100% Responsive
 */

.sr-widget-wrapper {
  max-width: 680px;
  margin: 30px auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  overflow: hidden;
  box-sizing: border-box;
}

.sr-widget-wrapper * {
  box-sizing: border-box;
}

/* HEADER Y PASOS */
.sr-header {
  background: linear-gradient(135deg, #4f46e5 0%, #0a223c 100%);
  color: #d7a66b;
  padding: 30px 24px 25px;
  text-align: center;
}

.sr-title {
  margin: 0 0 6px !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #d7a66b !important;
  letter-spacing: -0.5px;
}

.sr-subtitle {
  margin: 0 0 20px !important;
  font-size: 14px !important;
  color: #e0e7ff !important;
  opacity: 0.9;
}

.sr-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}

.sr-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.sr-step-item.active {
  opacity: 1;
}

.sr-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.sr-step-item.active .sr-step-num {
  background: #ffffff;
  color: #4f46e5;
  border-color: #ffffff;
}

.sr-step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sr-step-divider {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 8px 15px;
}

/* CONTENEDOR DE PASOS */
.sr-step-content {
  display: none;
  padding: 30px 24px;
  animation: srFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sr-step-content.active {
  display: block;
}

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

/* ALERTAS */
.sr-alert {
  margin: 15px 24px 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.sr-alert.error {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.sr-alert.success {
  background-color: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

/* CALENDARIO (PASO 1) */
.sr-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sr-month-title {
  font-size: 18px;
  font-weight: 700;
  color: #d7a66b;
}

.sr-nav-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sr-nav-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.sr-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #d7a66b;
  margin-bottom: 10px;
  text-transform: uppercase;
}

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

.sr-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sr-day:hover:not(.disabled) {
  border-color: #4f46e5;
  background-color: #eef2ff;
  transform: translateY(-2px);
}

.sr-day.available {
  border-color: #cbd5e1;
  color: #0f172a;
}

.sr-day.available::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #10b981;
}

.sr-day.selected {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.sr-day.selected::after {
  background-color: #ffffff;
}

.sr-day.disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
  border-color: #f1f5f9;
}

.sr-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 12px;
  color: #64748b;
}

.sr-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sr-dot-avail { background-color: #10b981; }
.sr-dot-unavail { background-color: #cbd5e1; }

/* RESUMEN Y NAVEGACIÓN EN PASOS */
.sr-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.sr-btn-back {
  background: none !important;
  border: none !important;
  color: #4f46e5 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.sr-btn-back:hover {
  text-decoration: underline !important;
}

.sr-selected-date-badge {
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.sr-step-heading {
  margin: 0 0 18px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* SLOTS DE HORA (PASO 2) */
.sr-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.sr-slot-btn {
  padding: 14px 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sr-slot-btn:hover:not(.disabled) {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4338ca;
  transform: translateY(-2px);
}

.sr-slot-btn.disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* FORMULARIO (PASO 3) */
.sr-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sr-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.sr-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.sr-input, .sr-textarea {
  padding: 11px 14px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  outline: none !important;
  font-family: inherit !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  color: #0f172a !important;
  transition: all 0.2s ease !important;
}

.sr-input:focus, .sr-textarea:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

.sr-terms {
  margin-top: 4px;
}

.sr-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.sr-checkbox-label input {
  margin-top: 3px;
}

.sr-submit-btn {
  background: #d7a66b !important;
  color: #0a223c !important;
  border: none !important;
  padding: 14px 24px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

.sr-submit-btn:hover {
  background: #d7a66b !important;
  transform: translateY(-1px) !important;
}

/* PANTALLA DE ÉXITO (PASO 4) */
.sr-success-card {
  text-align: center;
  padding: 20px 10px;
}

.sr-success-icon {
  font-size: 54px;
  margin-bottom: 12px;
}

.sr-success-title {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 8px !important;
}

.sr-success-desc {
  font-size: 14px !important;
  color: #475569 !important;
  margin: 0 0 25px !important;
  line-height: 1.6 !important;
}

.sr-ticket {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  margin: 0 auto 20px;
  text-align: left;
}

.sr-ticket-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.sr-ticket-row:last-child {
  border-bottom: none;
}

.sr-ticket-label {
  color: #64748b;
  font-weight: 500;
}

.sr-ticket-val {
  color: #0f172a;
  font-weight: 700;
}

.sr-badge-pending {
  background: #fef3c7;
  color: #92400e;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .sr-form-row {
    grid-template-columns: 1fr;
  }
  .sr-step-label {
    display: none;
  }
  .sr-header {
    padding: 24px 16px 20px;
  }
  .sr-step-content {
    padding: 20px 16px;
  }
}
