/* ===== DeltaByte Asesorías Legales — Estilos públicos ===== */

.dbal-reserva-contenedor {
  max-width: 720px;
  margin: 2rem auto;
  font-family: inherit;
  color: inherit;
}

.dbal-reserva-contenedor * {
  font-family: inherit;
}

/* Pasos */
.dbal-paso {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: dbal-fade-in 0.3s ease;
}

.dbal-paso.dbal-paso-activo {
  display: block;
}

@keyframes dbal-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dbal-paso-titulo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  color: #111827;
}

.dbal-paso-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #56070c;
  color: #fff;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Calendario */
.dbal-calendario-publico {
  width: 100%;
}

.dbal-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.dbal-cal-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  text-transform: capitalize;
}

.dbal-cal-prev,
.dbal-cal-next {
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  color: #374151;
  transition: background 0.2s;
  font-family: inherit;
  line-height: 36px;
}

.dbal-cal-next {
  margin-bottom: 20px !important;
}

.dbal-cal-prev:hover,
.dbal-cal-next:hover {
  background: #e5e7eb;
}

.dbal-cal-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dbal-cal-dias-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.dbal-cal-dias-semana span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0.5rem 0;
  text-transform: uppercase;
}

.dbal-cal-dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.dbal-cal-dia {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  user-select: none;
}

.dbal-cal-dia:hover:not(.dbal-dia-deshabilitado):not(
    .dbal-dia-seleccionado
  ):not(.dbal-dia-vacio) {
  background: #dbeafe;
  border-color: #93c5fd;
}

.dbal-cal-dia.dbal-dia-vacio {
  background: transparent;
  cursor: default;
}

.dbal-cal-dia.dbal-dia-deshabilitado {
  color: #d1d5db;
  cursor: not-allowed;
  background: transparent;
}

.dbal-cal-dia.dbal-dia-hoy {
  font-weight: 700;
  color: #56070c;
  border-color: #93c5fd;
}

.dbal-cal-dia.dbal-dia-seleccionado {
  background: #56070c;
  color: #fff;
  border-color: #56070c;
  font-weight: 600;
}

/* Horas */
.dbal-fecha-seleccionada {
  background: #eff6ff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #56070c;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-transform: capitalize;
}

.dbal-slots-horas {
  min-height: 80px;
}

.dbal-mensaje-info {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
  margin: 0;
}

.dbal-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.625rem;
}

.dbal-slot {
  padding: 0.75rem 0.5rem;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #374151;
  transition: all 0.2s;
  text-align: center;
  font-weight: 500;
  font-family: inherit;
  margin-bottom: 20px !important;
}

.dbal-slot:hover:not(.dbal-slot-ocupado) {
  border-color: #56070c;
  color: #56070c;
  transform: translateY(-1px);
}

.dbal-slot.dbal-slot-ocupado {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: line-through;
}

.dbal-slot.dbal-slot-seleccionado {
  background: #56070c;
  border-color: #56070c;
  color: #fff;
}

/* Formulario */
.dbal-resumen {
  background: #f0f9ff;
  border-left: 4px solid #56070c;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.dbal-resumen-valor {
  display: block;
  margin-top: 0.25rem;
  color: #5f0d12;
  font-weight: 600;
}

.dbal-campo {
  margin-bottom: 1.25rem;
}

.dbal-campo-grupo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dbal-campo label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.dbal-req {
  color: #dc2626;
}

.dbal-campo input,
.dbal-campo select,
.dbal-campo textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1f2937;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
}

.dbal-campo select {
  padding: 0 0.85rem !important;
}

.dbal-campo input:focus,
.dbal-campo select:focus,
.dbal-campo textarea:focus {
  outline: none;
  border-color: #56070c;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.dbal-form-acciones {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.dbal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dbal-btn-principal {
  background: #56070c;
  color: #fff;
  margin-bottom: 20px !important;
}

.dbal-btn-principal:hover:not(:disabled) {
  background: #5f0d12;
}

.dbal-btn-principal:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dbal-btn-secundario {
  background: #f3f4f6;
  color: #374151;
}

.dbal-btn-secundario:hover {
  background: #e5e7eb;
}

.dbal-mensaje-resultado {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-weight: 500;
}

.dbal-mensaje-resultado.dbal-exito {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.dbal-mensaje-resultado.dbal-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsivo */
@media (max-width: 600px) {
  .dbal-paso {
    padding: 1.25rem;
  }

  .dbal-campo-grupo {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dbal-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  }

  .dbal-cal-dia {
    font-size: 0.85rem;
  }
}
