/* Estilos para el formulario de registro de síntomas */

.symptom-section {
  margin-bottom: 2rem;
}

.symptom-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.symptom-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

/* Tarjeta de datos del paciente anclada */
.patient-info-card {
  position: sticky;
  top: 90px; /* Altura aproximada del header + título */
  z-index: 15;
}

.symptom-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.symptom-header h2 {
  color: var(--heading-color, #2c3e50);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.symptom-header h2 i {
  color: var(--accent-color, #e91e63);
  font-size: 1.75rem;
}

.symptom-header p {
  margin: 0;
  font-size: 0.95rem;
}

/* Aviso de privacidad en datos del paciente */
.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-left: 4px solid var(--accent-color, #e91e63);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #495057;
}

.privacy-notice i {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--accent-color, #e91e63);
  margin-top: 0.1rem;
}

.privacy-notice p {
  margin: 0;
  line-height: 1.5;
}

.privacy-notice strong {
  color: #2c3e50;
  font-weight: 600;
}

.symptom-body {
  padding-top: 0.5rem;
}

/* Estilos para opciones tipo chip/píldora */
.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.option-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  color: #495057;
  user-select: none;
  flex: 0 1 auto;
  min-width: 150px;
  justify-content: center;
  position: relative;
}

.option-chip:hover {
  background: #e9ecef;
  border-color: var(--accent-color, #e91e63);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}

.option-emoji {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
}

.option-text {
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Estado seleccionado para radio buttons */
.option-input:checked + .option-chip {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(233, 30, 99, 0.05) 100%);
  border-color: var(--accent-color, #e91e63);
  border-width: 2.5px;
  color: var(--accent-color, #e91e63);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
  transform: translateY(-2px);
}

.option-input:checked + .option-chip .option-emoji {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}

/* Estado seleccionado para checkboxes (signos adicionales) */
.option-input[type="checkbox"]:checked + .option-chip {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.15) 0%, rgba(233, 30, 99, 0.08) 100%);
  border-color: var(--accent-color, #e91e63);
  border-width: 2.5px;
  color: var(--accent-color, #e91e63);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.option-input[type="checkbox"]:checked + .option-chip::before {
  content: "✓";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-color, #e91e63);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: bold;
}

/* Estilos para campos de formulario */
.form-label {
  font-weight: 600;
  color: var(--heading-color, #2c3e50);
  margin-bottom: 0.5rem;
}

.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-color, #e91e63);
  box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.15);
}

/* Botón de envío */
#btn-enviar {
  background: linear-gradient(135deg, #0066A8 0%, #01A0D7 50%, #02CCE4 100%);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem 3rem;
  box-shadow: 0 4px 15px rgba(2, 204, 228, 0.3);
  transition: all 0.3s ease;
}

#btn-enviar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 204, 228, 0.5);
  background: linear-gradient(135deg, #024683 0%, #0066A8 50%, #01A0D7 100%);
}

#btn-enviar:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .symptom-card {
    padding: 1.5rem;
  }

  .symptom-header h2 {
    font-size: 1.25rem;
  }

  .option-chip {
    flex: 1 1 100%;
    min-width: 100%;
    padding: 0.875rem 1.25rem;
  }

  .option-chips {
    flex-direction: column;
    gap: 0.75rem;
  }

  #btn-enviar {
    width: 100%;
    padding: 1rem 2rem;
  }

  /* En móviles evitamos el sticky para que no tape la pantalla */
  .patient-info-card {
    position: static;
  }
}

@media (min-width: 769px) and (max-width: 991px) {
  .option-chip {
    flex: 0 1 calc(50% - 0.5rem);
    min-width: calc(50% - 0.5rem);
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.symptom-section[data-aos] {
  animation: fadeInUp 0.6s ease-out;
}

/* Indicador de progreso del formulario (opcional) */
.form-progress {
  position: sticky;
  top: 80px;
  z-index: 10;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

/* Mensajes de validación */
.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  width: 100%;
}

.invalid-feedback[style*="display: block"] {
  display: block !important;
}

/* Mostrar mensaje de error cuando el campo tiene la clase is-invalid */
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Mensaje de error para el campo de nacionalidad (estructura especial con wrapper) */
.pais-select-wrapper ~ .invalid-feedback {
  display: none;
  margin-top: 0.25rem;
}

.pais-select-wrapper ~ .invalid-feedback[style*="display: block"] {
  display: block !important;
}

.is-invalid {
  border-color: #dc3545;
}

.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Estilos para selector de países con buscador */
.pais-select-wrapper {
  position: relative;
}

.pais-select-wrapper .input-group-text {
  background-color: #f8f9fa;
  border-right: none;
  border-color: #e9ecef;
}

.pais-select-wrapper .input-group .form-control {
  border-left: none;
}

.pais-select-wrapper .input-group:focus-within .input-group-text,
.pais-select-wrapper .input-group:focus-within .form-control {
  border-color: var(--accent-color, #e91e63);
}

.pais-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -2px;
}

.pais-dropdown.show {
  display: block;
}

.pais-dropdown-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.pais-dropdown-item:last-child {
  border-bottom: none;
}

.pais-dropdown-item:hover,
.pais-dropdown-item.active {
  background-color: rgba(233, 30, 99, 0.1);
  color: var(--accent-color, #e91e63);
}

.pais-dropdown-item:first-child {
  border-radius: 0;
}

.pais-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.pais-dropdown-empty {
  padding: 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

/* Scrollbar personalizado para el dropdown */
.pais-dropdown::-webkit-scrollbar {
  width: 8px;
}

.pais-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.pais-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.pais-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Botón de acceso rápido para Colombia */
.btn-acceso-rapido {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #8a7402; /* Amarillo bandera Colombia (texto: oscuro/dorado) */
  background: rgba(255, 235, 59, 0.23); /* Amarillo suave translúcido */
  border: 1px solid rgba(255, 235, 59, 0.4); /* Amarillo claro bandera Colombia */
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  text-decoration: none;
}

.btn-acceso-rapido:hover {
  background: rgba(255, 235, 59, 0.35);
  border-color: #ffe81a; /* Amarillo bandera Colombia más intenso al hover */
  color: #6a5902;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 235, 59, 0.23);
}

.btn-acceso-rapido:active {
  transform: translateY(0);
}

.btn-acceso-rapido i {
  font-size: 0.85rem;
}

/* Estilos personalizados para el Toast de saludo */
#toast-saludo {
  min-width: 300px;
  max-width: 400px;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
  animation: slideInRight 0.4s ease-out;
}

#toast-saludo .toast-header {
  border-bottom: none;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

#toast-saludo .toast-header i {
  font-size: 1.2rem;
}

/* Animación de la mano saludando */
.toast-wave {
  font-size: 1.4rem;
  display: inline-block;
  animation: wave 1.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

#toast-saludo .toast-body {
  padding: 1rem;
  color: #495057;
  line-height: 1.5;
}

/* Animación de entrada */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive: en móviles hacer el toast más pequeño y ajustar posición */
@media (max-width: 768px) {
  .toast-container {
    padding: 1rem !important;
    top: 80px !important; /* Evitar que tape el header */
  }
  
  #toast-saludo {
    min-width: 280px;
    max-width: calc(100vw - 2rem);
    font-size: 0.9rem;
  }
  
  #toast-saludo .toast-header {
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
  }
  
  #toast-saludo .toast-body {
    padding: 0.875rem;
  }
}
