/**
 * JujuyConectado Pro 2026 · 9.5.55.513
 * MOBILE WEB FIXED FOOTER MASTER V1
 *
 * Alcance exclusivo: navegador móvil normal <=760 px.
 * APP/PWA standalone, app nativa, Comunidad y Mini App CJRD quedan fuera.
 *
 * Autoridad visual: TabBar APP aprobada (V232), replicada sólo para web móvil.
 */

@media (max-width:760px) and (display-mode:browser){
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app){
    --jc-mobile-web-footer-v513-base-height:60px;
    --jc-mobile-web-footer-v513-height:calc(var(--jc-mobile-web-footer-v513-base-height) + env(safe-area-inset-bottom,0px));
    padding-bottom:var(--jc-mobile-web-footer-v513-height)!important;
    margin-bottom:0!important;
  }

  /* El footer institucional deja de ocupar cientos de px y pasa a ser una TabBar fija. */
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-web-footer-v2{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:10030!important;
    width:100%!important;
    height:var(--jc-mobile-web-footer-v513-height)!important;
    min-height:var(--jc-mobile-web-footer-v513-height)!important;
    margin:0!important;
    padding:0 0 env(safe-area-inset-bottom,0px)!important;
    overflow:visible!important;
    border:0!important;
    border-top:1px solid rgba(23,105,224,.12)!important;
    background:rgba(255,255,255,.985)!important;
    color:#8e8e93!important;
    box-shadow:0 -6px 22px rgba(18,48,82,.09)!important;
    backdrop-filter:saturate(1.2) blur(12px);
    -webkit-backdrop-filter:saturate(1.2) blur(12px);
  }

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-web-footer-v2__main{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    height:60px!important;
    min-height:60px!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
  }

  /* Elementos del footer web grande: fuera del navegador móvil compacto. */
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-web-footer-v2__brand,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-footer-nav-webwin,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-footer-webwin-install,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-web-footer-v2__mobile-meta,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-web-footer-v2__bottom{
    display:none!important;
  }

  /* Se reutiliza el HTML de la TabBar APP, sin modificar su contrato ni sus reglas. */
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-mobile-tabbar-v2{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    width:100%!important;
    height:60px!important;
    min-height:60px!important;
    gap:0!important;
    margin:0!important;
    padding:0 4px!important;
    overflow:visible!important;
    background:transparent!important;
  }

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-mobile-tabbar-v2>.jc-tabbar-item{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:60px!important;
    min-height:60px!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#8e8e93!important;
    box-shadow:none!important;
    font-size:0!important;
    line-height:1!important;
    text-decoration:none!important;
    transform:none!important;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-mobile-tabbar-v2>.jc-tabbar-item.is-current{color:#1769e0!important}

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-icon{
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    height:44px!important;
    flex:0 0 44px!important;
    margin:0!important;
    color:inherit!important;
  }

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-icon svg{
    display:block!important;
    width:24px!important;
    height:24px!important;
    overflow:visible!important;
  }

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-outline{
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-filled{display:none;fill:currentColor;stroke:none}
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-item.is-current .jc-tabbar-outline{display:none}
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-item.is-current .jc-tabbar-filled{display:block}

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-badge{
    position:absolute!important;
    top:3px!important;
    right:2px!important;
    display:grid!important;
    place-items:center!important;
    min-width:16px!important;
    height:16px!important;
    padding:0 4px!important;
    border:2px solid #fff!important;
    border-radius:999px!important;
    background:#ef3f37!important;
    color:#fff!important;
    font-size:8px!important;
    font-weight:900!important;
    line-height:1!important;
    letter-spacing:-.15px!important;
    box-shadow:0 2px 5px rgba(90,20,20,.16)!important;
  }
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-badge[hidden],
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-channel-probe{display:none!important}

  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-publish{overflow:visible!important;z-index:2!important}
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-fab{
    position:relative!important;
    top:-8px!important;
    display:grid!important;
    place-items:center!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    border:3px solid #fff!important;
    border-radius:50%!important;
    background:#ff8500!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(255,133,0,.30),0 2px 7px rgba(13,43,75,.12)!important;
  }
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-fab svg{
    width:25px!important;
    height:25px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2.8!important;
    stroke-linecap:round!important;
  }
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-publish:active .jc-tabbar-fab{transform:scale(.96)!important}

  /* Cierre físico: ningún margen del footer puede volver a crear una banda después de él. */
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app)>.jc-web-footer-v2{
    margin-bottom:0!important;
  }
}

@media (max-width:360px) and (display-mode:browser){
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-mobile-tabbar-v2{padding-inline:1px!important}
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app) .jc-tabbar-fab{
    width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  html:not(.jc-pwa-standalone) body:not(.jc-native-app) .jc-mobile-tabbar-v2 *,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app) .jc-mobile-tabbar-v2 *::before,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app) .jc-mobile-tabbar-v2 *::after{transition:none!important;animation:none!important}
}
