/* v114 — Correção direta do topo mobile e remoção do logo grande no final */

/* Nunca deixar o splash virar conteúdo de página */
body > .btv108-splash,
body > .btv109-splash,
body > .btv111-splash,
body > .btv112-splash,
body > .btv113-splash,
body > .btv114-splash{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
}

body > .btv108-splash.is-hidden,
body > .btv109-splash.is-hidden,
body > .btv111-splash.is-hidden,
body > .btv112-splash.is-hidden,
body > .btv113-splash.is-hidden,
body > .btv114-splash.is-hidden{
  display:none!important;
}

/* Se o splash antigo aparecer depois do conteúdo, remove visualmente */
body > .btv108-splash:not(:first-child),
body > .btv109-splash:not(:first-child),
body > .btv111-splash:not(:first-child),
body > .btv112-splash:not(:first-child),
body > .btv113-splash:not(:first-child){
  display:none!important;
}

/* Se algum bloco solto renderizar exatamente o logo grande no final */
.v73-main > .btv108-splash,
.v73-main > .btv109-splash,
.v73-main > .btv111-splash,
.v73-main > .btv112-splash,
.v73-main > .btv113-splash,
.main > .btv108-splash,
.main > .btv109-splash,
.main > .btv111-splash,
.main > .btv112-splash,
.main > .btv113-splash{
  display:none!important;
}

@media (max-width: 760px){
  /* Header app — força o primeiro link/marca a virar apenas ícone */
  body .app-layout > aside + main,
  body .main,
  body .v73-main{
    max-width:100vw!important;
    overflow-x:hidden!important;
  }

  header,
  .topbar,
  .app-topbar,
  .v73-topbar,
  .btv-app-topbar,
  .mobile-topbar,
  .app-header{
    overflow:hidden!important;
  }

  .topbar-in,
  .app-topbar-in,
  .v73-topbar-in,
  .btv-topbar-in,
  .mobile-topbar-in,
  .app-header-in,
  header .wrap,
  header > div{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
  }

  /* Classe nova injetada no HTML */
  .btv114-mobile-icon-only{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:50px!important;
    min-width:50px!important;
    max-width:50px!important;
    height:50px!important;
    flex:0 0 50px!important;
    overflow:hidden!important;
    text-decoration:none!important;
  }

  .btv114-mobile-icon-only img{
    display:block!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    object-fit:contain!important;
    border-radius:13px!important;
    margin:0!important;
  }

  .btv114-mobile-icon-only *:not(img){
    display:none!important;
  }

  /* Caso o HTML antigo ainda esteja em cache, força esconder qualquer texto da marca */
  a.brand,
  .brand,
  .app-brand,
  .v73-brand,
  .btv-brand{
    max-width:52px!important;
    min-width:50px!important;
    flex:0 0 50px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }

  a.brand img,
  .brand img,
  .app-brand img,
  .v73-brand img,
  .btv-brand img,
  .brand-mark{
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    object-fit:contain!important;
    border-radius:13px!important;
  }

  a.brand > div,
  .brand > div,
  .app-brand > div,
  .v73-brand > div,
  .btv-brand > div,
  .brand-name,
  .brand-sub,
  [class*="brand-name"],
  [class*="brand-sub"],
  [class*="brand-text"]{
    display:none!important;
    width:0!important;
    max-width:0!important;
    opacity:0!important;
    visibility:hidden!important;
    overflow:hidden!important;
  }

  /* O selo 64 novas não pode empurrar o resto */
  .v73-new-badge,
  .btv-new-badge,
  .new-badge,
  [class*="new-badge"],
  [class*="badge"]{
    flex:0 1 auto!important;
    max-width:104px!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .btv-lang-selector{
    flex:0 0 auto!important;
    min-width:132px!important;
    max-width:154px!important;
  }

  .menu-btn,
  button.menu-btn,
  .mobile-menu-btn{
    flex:0 0 auto!important;
    white-space:nowrap!important;
  }

  /* Remove qualquer logo/assinatura solta no final da tela inicial */
  .v73-main > img[src*="logo"],
  .v73-main > img[src*="icon-"],
  .v73-main > img[src*="app-icon"],
  .v73-main > img[src*="brand"],
  .v73-main > picture,
  .v73-main > .btv-brand-preview,
  .v73-main > .brand-preview,
  .v73-main > .pwa-preview,
  .v73-main > .logo-preview{
    display:none!important;
  }

  /* Se aparece o texto solto "Biblioteca Técnica" após o logo grande */
  .v73-main > p:last-child,
  .v73-main > h1:last-child,
  .v73-main > h2:last-child,
  .v73-main > div:last-child:has(img[src*="icon"]),
  .v73-main > div:last-child:has(img[src*="logo"]){
    display:none!important;
  }
}
