/* IDEALAB Native: capa de navegacion tipo app. El corte de 920px coincide con el del menu del tema.
   Las reglas sobre elementos del tema usan "html body" a proposito: el sitio tiene estilos en linea
   con !important que cargan despues de este archivo, y asi ganan sin depender del orden de carga. */

/* ---- Transiciones entre paginas (todas las pantallas) ---- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: ixn-out .14s ease both; }
  ::view-transition-new(root) { animation: ixn-in .22s ease both; }
  .ix-nav { view-transition-name: ixn-header; }
  .ixn-tabs { view-transition-name: ixn-tabs; }
  ::view-transition-group(ixn-header),
  ::view-transition-group(ixn-tabs) { animation: none; }
}
@keyframes ixn-out { to { opacity: 0; } }
@keyframes ixn-in { from { opacity: 0; transform: translateY(6px); } }

html { background: #0a0a0a; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.ixn-tabs { display: none; }

@media (max-width: 920px) {
  :root {
    --ixn-tab-h: 58px;
    --ixn-safe-b: env(safe-area-inset-bottom, 0px);
    --ixn-bottom: calc(var(--ixn-tab-h) + var(--ixn-safe-b));
  }
  html { scroll-padding-top: 76px; scroll-padding-bottom: calc(var(--ixn-bottom) + 12px); }
  html body { padding-bottom: var(--ixn-bottom) !important; }

  /* Cabecera compacta: la navegacion pasa a la barra inferior */
  html body .ix-nav .ix-nav__toggle, html body .ix-nav .ix-nav__menu { display: none !important; }
  html body .ix-nav { padding-top: max(10px, env(safe-area-inset-top, 0px)) !important; padding-bottom: 10px !important; }
  /* Boton de cotizar: el diseno vive en design.css seccion 26 */
  .ixn-quote { margin-left: auto; }

  /* Barra inferior */
  .ixn-tabs {
    position: fixed; inset: auto 0 0 0; z-index: 1200; display: grid; grid-template-columns: repeat(5, 1fr);
    height: var(--ixn-bottom); padding: 0 max(4px, env(safe-area-inset-right, 0px)) var(--ixn-safe-b) max(4px, env(safe-area-inset-left, 0px));
    background: rgba(10, 10, 10, .88); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, .09);
  }
  .ixn-tab {
    appearance: none; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; min-width: 0; color: #a3a9a3; text-decoration: none;
    font: 600 11px/1.1 var(--ix-font-display, Inter, sans-serif); transition: color .15s, transform .12s;
  }
  .ixn-tab svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .ixn-tab:active { transform: scale(.93); }
  .ixn-tab[aria-current="page"], .ixn-tab[aria-expanded="true"] { color: #2cff05; }
  .ixn-tab:focus-visible { outline: 2px solid #2cff05; outline-offset: -4px; border-radius: 10px; }

  /* Robot de WhatsApp: mas pequeno, sobre la barra y siempre visible */
  html body .ix-whatsapp {
    right: 8px !important; bottom: calc(var(--ixn-bottom) + 8px) !important; z-index: 1100 !important;
    transform: scale(.68) !important; transform-origin: bottom right !important; transition: transform .25s ease, opacity .2s ease !important;
  }

  /* Aviso de cookies: compacto y por encima de la barra */
  html body .ix-cookie { bottom: calc(var(--ixn-bottom) + 8px) !important; padding: 14px !important; }
  html body .ix-cookie__ic { display: none !important; }
  html body .ix-cookie__row { margin-bottom: 10px !important; }
  html body .ix-cookie p { font-size: 12.5px !important; line-height: 1.4 !important; }
  html body .ix-cookie__btns .ix-btn { min-height: 44px !important; padding-inline: 10px !important; font-size: 13.5px !important; }

  /* Tacto y lectura */
  .ix-btn:active { transform: scale(.97); }
  html body input:not([type=checkbox]):not([type=radio]), html body select, html body textarea { font-size: 16px !important; min-height: 46px; }
  html body textarea { min-height: 110px; }
  html body .ix-svc__more { min-height: 44px !important; display: inline-flex !important; align-items: center !important; }
}

/* Hero: en pantallas apiladas el robot se pintaba detras de una capa opaca */
@media (max-width: 980px) {
  html body .ix-hero--robot .ix-hero__robot { z-index: 2 !important; background: none !important; }
  html body .ix-hero__robot > :not(.ix-hero__robot-img), html body .ix-hero__robot::before { display: none !important; }
}

/* Planes: carrusel legible en vez de tarjetas diminutas */
@media (max-width: 640px) {
  html body .ix-plans3 {
    display: flex !important; gap: 12px !important; overflow-x: auto !important; scroll-snap-type: x mandatory !important; overscroll-behavior-x: contain;
    margin-inline: 0 !important; padding: 4px 16px 14px !important; scroll-padding-inline: 16px !important; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  html body .ix-plans3::-webkit-scrollbar { display: none; }
  html body .ix-plan3 { flex: 0 0 min(84vw, 340px) !important; scroll-snap-align: start !important; padding: 22px 18px 18px !important; }
  html body .ix-plan3 li { font-size: .9rem !important; gap: 8px !important; }
  html body .ix-plan3__name { font-size: .8rem !important; }
  html body .ix-plan3__sec { font-size: .78rem !important; }
  html body .ix-plan3__nets i { font-size: .75rem !important; padding: 3px 7px !important; }
  html body .ix-plan3__ribbon { font-size: .68rem !important; }
  html body .ix-plan3__price b { font-size: 2rem !important; }
  html body .ix-plan3 .ix-btn { min-height: 46px !important; font-size: .9rem !important; }

  /* Texto minimo legible */
  html body .ix-pcard__t span, html body .ix-svc__cat, html body .ix-mcard__tag, html body .ix-badge, html body .ix-chart__tag { font-size: 12px !important; }
  html body .ix-feature__out, html body .ix-formsplit__brand { font-size: 12.5px !important; }
  html body .fx label { font-size: 12.5px !important; }
}

/* Hoja de soluciones */
.ixn-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: min(84dvh, 720px); padding: 0;
  border: 0; border-top: 1px solid rgba(44, 255, 5, .28); border-radius: 22px 22px 0 0; background: #101310; color: #fff;
  overscroll-behavior: contain;
}
.ixn-sheet[open] { display: flex; flex-direction: column; animation: ixn-sheet-in .28s cubic-bezier(.2, .9, .3, 1); }
.ixn-sheet::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: ixn-fade .2s ease; }
@keyframes ixn-sheet-in { from { transform: translateY(100%); } }
@keyframes ixn-fade { from { opacity: 0; } }
.ixn-sheet__grab { display: flex; justify-content: center; padding: 10px 0 4px; touch-action: none; cursor: grab; }
.ixn-sheet__grab i { width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .28); }
.ixn-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 8px 20px; touch-action: none; }
.ixn-sheet__head h2 { margin: 0; font: 800 20px/1.2 var(--ix-font-display, Inter, sans-serif); color: #fff; }
.ixn-sheet__close { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: #c7ccc7; cursor: pointer; }
.ixn-sheet__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ixn-sheet__body { overflow-y: auto; padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ixn-row {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 12px; color: #eef1ee; text-decoration: none;
  font: 500 15.5px/1.25 var(--ix-font-body, Inter, sans-serif);
}
.ixn-row:active, .ixn-row:hover { background: rgba(44, 255, 5, .1); color: #fff; }
.ixn-row--all { color: #2cff05; font-weight: 700; }
.ixn-sheet__label { margin: 12px 12px 2px; color: #8d938d; font: 500 11.5px/1.3 var(--ix-font-mono, monospace); letter-spacing: .12em; text-transform: uppercase; }
html.ixn-locked { overflow: hidden; }

@media (min-width: 921px) { .ixn-sheet { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .ixn-sheet[open], .ixn-sheet::backdrop { animation: none; }
  html body .ix-whatsapp, .ixn-tab { transition: none !important; }
}
