/* Envuelta en `@layer webflow` por la refactorización de componentes
   compartidos.
 *
 * Estas hojas redefinen nombres de utilidad que Tailwind también usa: .hidden,
 * .flex, .grid, .block, .gap-*, .text-*. Al cargarse después de Tailwind le
 * ganaban por orden de cascada, y el header y el footer compartidos entraban en
 * una página Webflow con su menú en `hidden` y el `min-[1000px]:flex` que debía
 * revertirlo perdiendo la discusión: el menú no aparecía nunca.
 *
 * Dentro de una capa se acaba el conflicto. Cualquier regla fuera de capa gana a
 * cualquier regla dentro de capa, sin importar especificidad ni orden de carga,
 * así que Tailwind gana siempre y estas hojas siguen estilando todo lo demás
 * exactamente igual que antes: entre ellas la cascada no cambia, porque todas
 * están en la misma capa.
 *
 * El puesto de la capa lo reserva `@layer webflow;` en globals.css, declarado
 * antes que las capas de Tailwind.
 */
@layer webflow {

  /* Modal Styles */
  body.modal-open .navigation-component {
    visibility: hidden;
  }
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
  }
  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  .modal-container {
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    width: 90%;
    max-width: 480px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 40px 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  }
  .modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }
  .modal-close:hover {
    background: #e5e5e5;
    transform: rotate(90deg);
  }
  .modal-close svg {
    width: 18px;
    height: 18px;
    color: #666;
  }
  .modal-content {
    text-align: center;
  }
  /* Phone input styles */
  .iti {
    width: 100%;
  }
  .iti__flag-container {
    border-right: 1px solid #e5e5e5;
  }
  .form-error {
    display: none;
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
  }
  .form-group.error input {
    border-color: #ef4444;
  }
  .form-group.error .form-error {
    display: block;
  }
  .modal-title {
    font-family: 'Geist', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 24px;
    line-height: 1.2;
  }
  .modal-form {
    text-align: left;
  }
  .form-group {
    margin-bottom: 20px;
  }
  .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
  }
  .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
  }
  .form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26,26,26,0.1);
  }
  .form-group input::placeholder {
    color: #aaa;
  }
  .modal-submit {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
  }
  .modal-disclaimer {
    font-size: 12px;
    color: #999;
    margin: 20px 0 0;
    line-height: 1.5;
  }

  /* Success State */
  .modal-success {
    display: none;
    text-align: center;
    padding: 20px 0;
  }
  .modal-success.active {
    display: block;
    animation: success-appear 0.5s ease forwards;
  }
  @keyframes success-appear {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
  }
  .modal-content.hidden {
    display: none;
  }
  .success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .success-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
  }
  .modal-subtitle {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 12px 0 24px;
  }

  /* reCAPTCHA Styles */
  .recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
  }
}
