/* --- LAYOUT DEL PASO 2 --- */
.wizard-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.assigned-prof-card .prof-avatar {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* --- ESTILOS DE FORMULARIO --- */
.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.input-group label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

/* Input estilo Píldora (Nombre, Email, Tema) */
.pill-input {
  background-color: transparent;
  border: 2px solid var(--text-color);
  border-radius: 30px; /* Bordes totalmente redondeados */
  padding: 1rem 1.5rem;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

[data-theme="light"] .pill-input {
  border-color: rgba(13, 27, 42, 0.6); /* Borde más suave en modo claro */
}

.pill-input:focus {
  border-color: var(--secundario);
}

/* Estilo para las opciones del desplegable */
.country-select option,
.custom-select option {
  /* Forzamos un color de fondo sólido según el tema */
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 10px;
}

/* Opcional: Si el fondo sigue viéndose blanco en algunos navegadores */
[data-theme="light"] .country-select option,
[data-theme="light"] .custom-select option {
  background-color: #ffffff; /* Fondo sólido para modo claro */
  color: #0d1b2a; /* Texto oscuro */
}

[data-theme="dark"] .country-select option,
[data-theme="dark"] .custom-select option {
  background-color: #0d1b2a; /* Fondo oscuro para modo noche */
  color: #ffffff;
}

/* Textarea (Bordes ligeramente redondeados) */
.rounded-textarea {
  background-color: transparent;
  border: 2px solid var(--text-color);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  resize: vertical;
}

[data-theme="light"] .rounded-textarea {
  border-color: rgba(13, 27, 42, 0.6);
}

.rounded-textarea:focus {
  border-color: var(--secundario);
}

/* Select de Tema (Flecha personalizada) */
.custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 1.5em;
  cursor: pointer;
}

[data-theme="light"] .custom-select {
  /* Flecha oscura para el tema claro */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1b2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* --- TARJETA DEL PROFESIONAL DINÁMICA --- */
.assigned-prof-container {
  display: none; /* Oculto por defecto, se muestra con JS */
  animation: fadeIn 0.5s ease forwards;
}

.assigned-prof-container.show {
  display: block;
}

.assigned-prof-card {
  background-color: #e2e6ea; /* Gris fijo como en la imagen para contraste */
  color: #0d1b2a; /* Texto oscuro forzado */
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .assigned-prof-card {
  background-color: #f8f9fa; /* Gris más claro en tema de día */
}

.prof-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--bg-color); /* Círculo oscuro */
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prof-avatar .titulo {
  font-size: 2rem;
  margin: 0;
}

.prof-details {
  flex-grow: 1;
}

.prof-badge {
  display: inline-block;
  background-color: #b6d0e2;
  color: var(--primario);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

[data-theme="light"] .prof-badge {
  background-color: #eedcba;
  color: #a67c00;
}

.prof-details h4 {
  margin: 0 0 0.2rem 0;
  font-size: 1.2rem;
}
.prof-details p {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

.prof-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.8;
}
.prof-bullets li::before {
  content: "□ ";
  color: #a67c00;
  font-weight: bold;
}

.prof-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.price-label,
.price-currency {
  font-size: 0.7rem;
  opacity: 0.7;
}
.prof-price h3 {
  font-size: 2rem;
  margin: 0;
  color: #a67c00;
}

.mt-2 {
  margin-top: 1.5rem;
}
.right-align {
  display: flex;
  justify-content: flex-end;
}

/* --- ESTADO DESHABILITADO PARA EL BOTÓN --- */
.btn-primary:disabled {
  background-color: #4a5568; /* Gris azulado oscuro */
  color: #a0aec0; /* Texto atenuado */
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
  transform: none; /* Evita que haga la animación de clic/hover */
}

/* Estado deshabilitado para el modo claro */
[data-theme="light"] .btn-primary:disabled {
  background-color: #cbd5e0;
  color: #718096;
}

.btn-primary:disabled:hover {
  box-shadow: none;
  background-color: #4a5568; /* Mantiene el color apagado */
}

[data-theme="light"] .btn-primary:disabled:hover {
  background-color: #cbd5e0;
}

/* --- RESPONSIVE PASO 2 --- */
@media (max-width: 992px) {
  .wizard-form-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .assigned-prof-card {
    flex-direction: column;
    text-align: center;
  }
  .prof-price {
    align-items: center;
    text-align: center;
    margin-top: 1rem;
  }
  .prof-bullets {
    text-align: left;
    display: inline-block;
  }
}

/* =========================================================================
   RESCATE Y ESTILIZACIÓN DE INTL-TEL-INPUT (BANDERAS)
   ========================================================================= */

/* 1. Contenedor principal al 100% */
.iti {
  width: 100%;
  display: block;
}

/* 2. Recuperar el estilo "Píldora" para el input de teléfono */
.iti input[type="tel"] {
  width: 100%;
  background-color: transparent;
  border: 2px solid var(--text-color);
  border-radius: 30px;

  /* IMPORTANTE: Usamos padding específico para no romper el cálculo automático 
     que hace la librería para el espacio de la bandera a la izquierda */
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 1.5rem;

  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

/* Borde del input en Modo Claro */
[data-theme="light"] .iti input[type="tel"] {
  border-color: rgba(13, 27, 42, 0.6);
}

/* Efecto Focus */
.iti input[type="tel"]:focus {
  border-color: var(--secundario);
}

/* Color del código de país (+593) */
.iti__selected-dial-code {
  color: var(--text-color);
  margin-left: 4px;
}

/* Despegar un poco la bandera del borde izquierdo de la píldora */
.iti__flag-container {
  margin-left: 10px;
}

/* ---------------------------------------------------
   TEMA OSCURO / CLARO PARA EL MENÚ DESPLEGABLE DE PAÍSES
   --------------------------------------------------- */

/* ESTILOS POR DEFECTO (Tema Noche / Oscuro) */
.iti__country-list {
  background-color: #0d1b2a; /* Fondo azul oscuro de Invex */
  color: #ffffff; /* Texto blanco */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin-top: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  font-family: inherit;
}

/* Hover y selección en Modo Oscuro */
.iti__country-list .iti__country.iti__highlight,
.iti__country-list .iti__country:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Línea separadora superior en Modo Oscuro */
.iti__country-list .iti__divider {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ESTILOS MODO DÍA (Tema Claro) */
[data-theme="light"] .iti__country-list {
  background-color: #ffffff;
  color: #0d1b2a;
  border: 1px solid rgba(13, 27, 42, 0.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Hover y selección en Modo Claro */
[data-theme="light"] .iti__country-list .iti__country.iti__highlight,
[data-theme="light"] .iti__country-list .iti__country:hover {
  background-color: #f8f9fa;
  color: #0d1b2a;
}

/* Línea separadora superior en Modo Claro */
[data-theme="light"] .iti__country-list .iti__divider {
  border-bottom: 1px solid rgba(13, 27, 42, 0.1);
}
