/* Estilos para validación de formulario - Añadir a styles.css */

/* Estilo para campos no válidos */
.invalid-field {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2) !important;
    background-color: rgba(255, 107, 107, 0.05) !important;
  }
  
  /* Para inputs normales */
  input.invalid-field, 
  select.invalid-field {
    border-color: #ff6b6b !important;
  }
  
  /* Para elementos personalizados como el contenedor de fecha/hora */
  .selected-appointment-item.invalid-field {
    border: 1px solid #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.05) !important;
  }
  
  /* Añadir un icono de advertencia para campos inválidos */
  .selected-appointment-item.invalid-field::after {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ff6b6b;
    position: absolute;
    right: 15px;
    font-size: 1rem;
  }
  
  /* Posición relativa para poder posicionar el icono */
  .selected-appointment-item {
    position: relative;
  }
  
  /* Animación de shake para campos inválidos */
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
  }
  
  .shake-effect {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ff6b6b !important;
  }
  
  /* Mejorar la respuesta visual en hover para los campos requeridos */
  input:required:hover,
  select:required:hover {
    border-color: var(--color-primary);
  }
  
  /* Estilo para label de campos requeridos */
  .floating-label input:required + label::after,
  .floating-label select:required + label::after {
    content: " *";
    color: #ff6b6b;
    font-size: 1rem;
  }
  
  /* Mejorar la visibilidad de los mensajes de validación nativos */
  input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
  }
  
  /* Mejorar el contraste en los mensajes de error */
  input:invalid:not(:placeholder-shown) + label {
    color: #ff6b6b !important;
  }
  
  /* Estilo específico para el mensaje de error al seleccionar fecha/hora */
  .date-time-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
  }
  
  .selected-appointment-item.invalid-field + .date-time-error {
    display: block;
  }

  /* Estilos para validación de formulario - Agregar a validacion formulario.css */

/* Estilo para campos no válidos */
.invalid-field {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2) !important;
  background-color: rgba(255, 107, 107, 0.05) !important;
}

/* Para inputs normales */
input.invalid-field, 
select.invalid-field {
  border-color: #ff6b6b !important;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="%23ff6b6b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px 16px;
  padding-right: 40px !important;
}

/* Para elementos personalizados como el contenedor de fecha/hora */
.selected-appointment-item.invalid-field {
  border: 1px solid #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.05) !important;
  position: relative;
}

/* Añadir un icono de advertencia para campos inválidos */
.selected-appointment-item.invalid-field::after {
  content: "⚠️";
  position: absolute;
  right: 15px;
  color: #ff6b6b;
}

/* Animación de shake para campos inválidos */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-effect {
  animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Estilo para los mensajes de error */
.error-message {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: rgba(255, 107, 107, 0.1);
  animation: fadeIn 0.3s ease-in;
  display: flex;
  align-items: center;
}

.error-message::before {
  content: "⚠️";
  margin-right: 5px;
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mejorar la visualización de los campos requeridos */
.floating-label input:required + label::after,
.floating-label select:required + label::after {
  content: "*";
  color: #ff6b6b;
  margin-left: 4px;
}

/* Estilos para campos válidos */
input:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
  border-color: var(--color-success);
  background-color: rgba(151, 236, 179, 0.05);
}

/* Estilos para el botón de WhatsApp cuando está listo para redireccionar */
#whatsappBtn.ready {
  background-color: #25D366;
  animation: pulse 1.5s infinite;
}

/* Efecto de pulsación más suave */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Transición suave para marcado visual de campos */
.selected-appointment-item {
  transition: all 0.3s ease;
}

/* Mejora visual para mostrar mejor la fecha y hora */
.selected-appointment-item span.filled {
  font-weight: 500;
  color: var(--color-primary);
}

/* Asegurar que los campos de fecha y hora se vean interactuables */
.selected-appointment-item {
  cursor: pointer;
}

/* Estilo para campos completados */
.field-complete {
  border-left: 3px solid var(--color-success) !important;
}

/* Layout para sección de terapia con tarjeta bancaria lateral */
.therapy-info-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 10px;
}

.therapy-info-text {
  flex: 1;
  min-width: 280px;
}

.therapy-payment-wrapper {
  width: 320px;
  flex-shrink: 0;
}

.therapy-payment-card {
  height: 130px;
  width: 100%;
  border-left: 4px solid var(--color-primary, #9683ec);
  transform-origin: center right;
}

/* Estilos responsivos para la sección de terapia */
@media (max-width: 768px) {
  .therapy-info-container {
      flex-direction: column;
      align-items: stretch;
  }
  
  .therapy-payment-wrapper {
      width: 100%;
      margin-top: 15px;
      order: 1; /* Reordenar en móvil para que aparezca después del texto */
  }
  
  .therapy-info-text {
      order: 0; /* Asegurar que el texto aparezca primero en móvil */
  }
}/* Estilos completos para el componente de tarjeta bancaria */
.payment-card {
  position: relative;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: 
      0 15px 35px rgba(0, 0, 0, 0.1),
      0 3px 10px rgba(0, 0, 0, 0.07);
  transform-style: preserve-3d;
  background-color: #fff;
  will-change: transform;
}

.payment-card-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
      rgba(150, 131, 236, 0.12) 0%, 
      rgba(131, 177, 236, 0.05) 100%);
  opacity: 0.9;
  z-index: 1;
}

.payment-card-background::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 70%
  );
  opacity: 0.4;
}

.payment-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 25px;
  height: 100%;
  box-sizing: border-box;
}

.therapy-payment-card .payment-card-content {
  padding: 25px 20px 25px 25px; /* Ajuste asimétrico para optimizar espacio */
}

.card-bank-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, 
      rgba(150, 131, 236, 0.9), 
      rgba(131, 177, 236, 0.8)
  );
  box-shadow: 0 8px 16px rgba(150, 131, 236, 0.3);
  margin-right: 20px;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}

.card-details {
  flex: 1;
  min-width: 0; /* Previene overflow en contenedores flex */
  padding-right: 10px; /* Buffer espacial para prevenir colisión con elementos decorativos */
  max-width: calc(100% - 70px); /* Restricción dinámica basada en espacio disponible */
}

.card-label {
  font-size: 14px;
  font-weight: 500;
  color: #83b1ec; /* Color actualizado al valor de referencia exacto */
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  white-space: normal; /* Permite múltiples líneas para evitar truncamiento */
  line-height: 1.2; /* Optimiza altura de línea para wrapping adecuado */
  max-width: 100%; /* Asegura contención dentro del contenedor padre */
}

.card-number {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #83b1ec; /* Color actualizado al valor de referencia exacto */
  letter-spacing: 1.2px;
  position: relative;
  display: inline-block;
}

.card-number::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #83b1ec; /* Subrayado actualizado al valor de referencia exacto */
  border-radius: 2px;
}

/* Ajuste de posicionamiento para círculos decorativos */
.card-decoration {
  position: absolute;
  right: 10px; /* Ajustado para posicionamiento correcto */
  bottom: 20px;
  display: flex;
}

/* Refinamiento del tamaño y superposición de círculos */
.card-decoration-circle {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-left: -14px; /* Mantiene la superposición actual */
}

.card-decoration-circle:first-child {
  background-color: rgba(150, 131, 236, 0.7);
  opacity: 0.8;
}

.card-decoration-circle:last-child {
  background-color: rgba(131, 177, 236, 0.6);
  opacity: 0.85;
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0) 25%,
      rgba(255, 255, 255, 0.2) 45%,
      rgba(255, 255, 255, 0) 65%
  );
  z-index: 3;
  transform: translateX(-100%);
  transition: transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

.payment-card:hover .card-shine {
  transform: translateX(100%);
}

/* Comportamiento interactivo */
.payment-card:hover {
  transform: translateY(-5px) rotateX(5deg);
  box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.12),
      0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Especificidad para tarjeta en contexto terapéutico */
.therapy-payment-card {
  height: 130px;
  width: 100%;
  border-left: 4px solid var(--color-primary, #9683ec);
  max-width: 100%;
}