/**
 * JujuyConectado Pro 2026 · 9.5.55.531
 * APP-FIRST FOOTER STRUCTURAL REPAIR V1
 * Authority: APP/PWA. Browser mobile derives from it. Windows mirrors it at 768px.
 */

/* Shared physical contract. One fixed bar only. */
html.jc-pwa-standalone,
html.jc-pwa-standalone body,
body.jc-native-app,
body.jc-windows-tablet-v469{
  --jc-tabbar-v2-base-height:60px!important;
  --jc-app-fixed-footer-height:60px!important;
  --jc-footer-real-height:calc(60px + env(safe-area-inset-bottom,0px))!important;
}

/* APP/PWA + native + browser mobile: body owns the one-and-only reserve. */
@media(max-width:760px){
  html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame),
  html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame),
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app):not(.jc-ccj-floating-frame){
    padding-bottom:calc(60px + env(safe-area-inset-bottom,0px))!important;
    margin-bottom:0!important;
  }

  /* V512 principle: never reserve the footer a second time inside content shells. */
  html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) #jc-content-shell,
  html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-main,
  html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) #jc-content-shell,
  html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-main,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) #jc-content-shell,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-main{
    padding-bottom:0!important;
    margin-bottom:0!important;
  }

  html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2,
  html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2,
  html:not(.jc-pwa-standalone) body:not(.jc-native-app):not(.jc-ccj-route):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2{
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;
    z-index:10030!important;
    width:100%!important;max-width:none!important;
    height:calc(60px + env(safe-area-inset-bottom,0px))!important;
    min-height:calc(60px + env(safe-area-inset-bottom,0px))!important;
    margin:0!important;
    padding:0 0 env(safe-area-inset-bottom,0px)!important;
    transform:none!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)!important;
    -webkit-backdrop-filter:saturate(1.2) blur(12px)!important;
  }
}

/* Windows: same APP TabBar, centered in the approved 768px frame. */
@media(min-width:901px){
  html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame){
    padding-bottom:60px!important;
    margin-bottom:0!important;
  }
  html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) #jc-content-shell,
  html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-main{
    padding-bottom:0!important;
    margin-bottom:0!important;
  }
  html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2{
    display:block!important;
    position:fixed!important;
    left:50%!important;right:auto!important;bottom:0!important;
    z-index:10030!important;
    width:768px!important;max-width:768px!important;
    height:60px!important;min-height:60px!important;
    margin:0!important;padding:0!important;
    transform:translateX(-50%)!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;
  }
}

/* Tablet browser: derive from APP, centered and capped at 768px. */
@media(min-width:761px) and (max-width:900px){
  html body:not(.jc-native-app):not(.cjrd-mini-app):not(.jc-ccj-floating-frame){padding-bottom:60px!important;margin-bottom:0!important}
  html body:not(.jc-native-app):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) #jc-content-shell,
  html body:not(.jc-native-app):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-main{padding-bottom:0!important;margin-bottom:0!important}
  html body:not(.jc-native-app):not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2{
    display:block!important;position:fixed!important;left:50%!important;right:auto!important;bottom:0!important;
    z-index:10030!important;width:min(100%,768px)!important;max-width:768px!important;height:60px!important;min-height:60px!important;
    margin:0!important;padding:0!important;transform:translateX(-50%)!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;
  }
}

/* Strip all historical web/footer rows everywhere this contract is active. */
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .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}
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2__brand,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2__menu,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2__bottom,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2__mobile-meta,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-webwin,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-webwin-install{display:none!important}

/* Beat the historical Windows/native selectors that hid or reshaped the APP TabBar. */
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-mobile-app,
html body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2,
html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-mobile-app,
html body.jc-windows-tablet-v469:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2,
html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-mobile-app,
html body.jc-native-app:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2,
html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-mobile-app,
html.jc-pwa-standalone body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .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 body .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!important;touch-action:manipulation!important}
html body .jc-mobile-tabbar-v2>.jc-tabbar-item.is-current{color:#1769e0!important}
html body .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 body .jc-tabbar-icon svg{display:block!important;width:24px!important;height:24px!important;overflow:visible!important}
html body .jc-tabbar-outline{display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
html body .jc-tabbar-filled{display:none!important;fill:currentColor!important;stroke:none!important}
html body .jc-tabbar-item.is-current .jc-tabbar-outline{display:none!important}
html body .jc-tabbar-item.is-current .jc-tabbar-filled{display:block!important}
html body .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 body .jc-tabbar-badge[hidden],html body .jc-tabbar-channel-probe{display:none!important}
html body .jc-tabbar-publish{overflow:visible!important;z-index:2!important}
html body .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 body .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}

@media(max-width:360px){html body .jc-mobile-tabbar-v2{padding-inline:1px!important}html body .jc-tabbar-fab{width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important}}

/* Specialized shells keep their own navigation. */
body.cjrd-mini-app .jc-web-footer-v2,body.jc-ccj-floating-frame .jc-web-footer-v2,
body.cjrd-mini-app .jc-footer-nav-mobile-app,body.jc-ccj-floating-frame .jc-footer-nav-mobile-app{display:none!important}
body.cjrd-mini-app,body.jc-ccj-floating-frame{padding-bottom:0!important}

@media(prefers-reduced-motion:reduce){.jc-mobile-tabbar-v2 *,.jc-mobile-tabbar-v2 *::before,.jc-mobile-tabbar-v2 *::after{transition:none!important;animation:none!important}}


/* ======================================================================
 * JC FOOTER APP MOVIL · COMPACTO HF02 · 15/10/2026
 * Fisica: 48px de barra + safe area real del dispositivo.
 * La clase se habilita en mobile-tabbar-v232.js SOLO en APP/PWA movil.
 * NO modificar Windows 768, navegadores, mini APP ni marcos flotantes.
 * Corrige hueco anterior y obliga una sola reserva de contenido.
 * ====================================================================== */
@media (max-width: 760px) {
  html.jc-footer-app-compact-hf02 {
    --jc-tabbar-v2-base-height: 48px !important;
    --jc-app-fixed-footer-height: 48px !important;
    --jc-footer-real-height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) {
    --jc-tabbar-v2-base-height: 48px !important;
    --jc-app-fixed-footer-height: 48px !important;
    --jc-footer-real-height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    margin-bottom: 0 !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2 {
    height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    box-shadow: 0 -3px 12px rgba(18, 48, 82, .075) !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-web-footer-v2__main,
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-footer-nav-mobile-app,
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2 {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    align-items: center !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2 > .jc-tabbar-item {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* El contenido visual sube 2px; el area tactil permanece en 48px. */
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-mobile-tabbar-v2 > .jc-tabbar-item .jc-tabbar-icon {
    transform: translateY(-2px) !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-tabbar-icon svg {
    width: 22px !important;
    height: 22px !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-tabbar-fab {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    top: -5px !important;
  }
  html.jc-footer-app-compact-hf02 body:not(.cjrd-mini-app):not(.jc-ccj-floating-frame) .jc-tabbar-fab svg {
    width: 24px !important;
    height: 24px !important;
  }
}
