/* 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 {

    pre.line-numbers {
      margin-top: 0;
      margin-bottom: 0;
    }

    /* copy button */
    div.code-toolbar>.toolbar a,
    div.code-toolbar>.toolbar button,
    div.code-toolbar>.toolbar span {
      color: #000;
      font-size: 1em;
      text-transform: uppercase;
      padding: 0.5em 1em;
      letter-spacing: 1px;
      font-weight: bold;
      background: #f5f2f0;
      background: rgb(224, 224, 224);
      box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2);
      border-radius: .5em;
    }

    div.code-toolbar>.toolbar button:hover {
      color: #000000;
    }

    /* Fix hero background image */
    .hero-api-image-wrapper {
      position: relative;
      overflow: hidden;
    }

    .hero-api-bg-image {
      width: 100%;
      height: auto;
      min-height: 650px;
      object-fit: cover;
      display: block;
    }

    @media (max-width: 991px) {
      .hero-api-bg-image {
        min-height: 550px;
      }
    }

    @media (max-width: 768px) {
      .hero-api-bg-image {
        min-height: 500px;
      }

      .hero-api-image-wrapper .hero-api-code-window {
        width: 90%;
      }
    }

    @media (max-width: 479px) {
      .hero-api-bg-image {
        min-height: 600px;
      }

      .hero-api-image-wrapper .hero-api-code-window {
        width: 95%;
      }
    }
  


    /* Country Selector */
    .country-selector {
      position: relative;
      display: inline-flex;
      align-items: center;
      margin-left: 12px;
    }

    .country-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 2px solid #e5e5e5;
      background: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: all 0.2s ease;
    }

    .country-btn:hover {
      border-color: #141414;
    }

    .country-dropdown {
      position: absolute;
      top: 100%;
      right: 0;
      padding-top: 8px;
      background: transparent;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: all 0.2s ease;
      z-index: 1000;
    }

    .country-dropdown-inner {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      min-width: 180px;
      overflow: hidden;
    }

    .country-selector:hover .country-dropdown {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .country-option {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      text-decoration: none;
      color: #333;
      font-size: 14px;
      font-weight: 500;
      transition: background 0.2s ease;
    }

    .country-option:hover {
      background: #f5f5f5;
    }

    .country-option.active {
      background: #f0f0f0;
    }

    .country-option span.flag {
      font-size: 20px;
    }
  


    /* 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;
    }
}
