/**
 * Aula Verde CVS · Mobile Gate (temporal desktop-only)
 * Activo solo con viewport < 1024px. No usa user-agent.
 */

#mobile-gate {
  display: none;
}

.av-desktop-shell {
  /* desktop shell; hidden only under the mobile media query */
}

@media (max-width: 1023px) {
  html,
  body {
    margin: 0 !important;
    min-height: 100% !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #000 !important;
    touch-action: manipulation;
  }

  .av-desktop-shell,
  #app.av-desktop-shell,
  .app.av-desktop-shell {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Widget Cordobéz si llegó a montarse fuera del shell */
  .cordobez-widget {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #mobile-gate {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding:
      calc(24px + env(safe-area-inset-top, 0px))
      calc(20px + env(safe-area-inset-right, 0px))
      calc(24px + env(safe-area-inset-bottom, 0px))
      calc(20px + env(safe-area-inset-left, 0px));
    background:
      radial-gradient(ellipse 80% 50% at 50% 0%, rgba(28, 210, 116, 0.12), transparent 55%),
      radial-gradient(ellipse 60% 40% at 80% 100%, rgba(81, 211, 239, 0.08), transparent 50%),
      #000;
    color: #f4fbf7;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    text-align: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #mobile-gate .mobile-gate-inner {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
  }

  #mobile-gate .mobile-gate-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin-bottom: 0.35rem;
  }

  #mobile-gate .mobile-gate-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #1cd274, #8ef0ba);
    color: #08301f;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.04em;
  }

  #mobile-gate .mobile-gate-brand strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
  }

  #mobile-gate .mobile-gate-brand span {
    display: block;
    margin-top: 3px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #88afa0;
  }

  #mobile-gate .mobile-gate-icon {
    width: 64px;
    height: 64px;
    margin: 0.25rem 0 0.15rem;
    opacity: 0.92;
  }

  #mobile-gate .mobile-gate-icon svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  #mobile-gate h1 {
    margin: 0;
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    line-height: 1.25;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #f6fbf8;
  }

  #mobile-gate p {
    margin: 0;
    font-size: clamp(0.95rem, 3.6vw, 1.05rem);
    line-height: 1.55;
    color: #b7d1c5;
    max-width: 36ch;
  }

  #mobile-gate .mobile-gate-soon {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    color: #8ef0ba;
    font-weight: 600;
  }
}

@media (min-width: 1024px) {
  #mobile-gate {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
