/* Wimmer Community V6.25.7 - mobil stabilitet + synlig log ud
   Formål: Stop hop/vandret scroll på mobil og gør Log ud synlig i toppen. */

html{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  scroll-behavior:auto;
  -webkit-text-size-adjust:100%;
}
body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  overscroll-behavior-x:none;
  touch-action:pan-y;
}
.app-shell,
.app-stage,
.layout{
  max-width:100%;
  overflow-x:clip;
}
img, video, iframe, canvas, svg{
  max-width:100%;
}
input, select, textarea, button{
  font-size:16px;
}

/* Log ud-knap i toppen */
.top-logout-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 15px;
  border-radius:15px;
  border:1px solid rgba(255,95,122,.30);
  background:rgba(255,95,122,.10);
  color:#ffdce3;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}
.top-logout-btn:hover{
  background:rgba(255,95,122,.18);
  border-color:rgba(255,95,122,.50);
}
.wc-logout-link{
  color:#ffdce3!important;
  border-color:rgba(255,95,122,.22)!important;
}
.wc-logout-link span{
  color:#ff8aa0!important;
}

/* Mobil: stop hop fra fixed baggrund og ustabil topbar */
@media (max-width:980px){
  body.wc-has-brand-bg::before{
    background-attachment:scroll!important;
    transform:none!important;
  }
  body.wc-has-brand-bg::after{
    transform:none!important;
  }

  .app-topbar{
    width:100%!important;
    max-width:100vw!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    overflow:hidden!important;
    contain:layout paint;
  }

  .top-search{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .top-search input{
    min-width:0!important;
    width:100%!important;
    font-size:16px!important;
  }

  .top-actions{
    flex:0 0 auto!important;
    min-width:0!important;
    max-width:calc(100vw - 88px)!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .top-actions::-webkit-scrollbar{
    display:none;
  }

  .top-logout-btn{
    min-width:72px;
    height:40px;
    min-height:40px;
    padding:0 12px;
    border-radius:14px;
    font-size:13px;
  }

  .wc-mobile-menu-btn{
    transform:translateZ(0);
    will-change:transform;
  }
  .app-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    overscroll-behavior:contain;
  }
  .wc-mobile-backdrop{
    height:100dvh!important;
  }

  .card,
  .wc-settings-card,
  .profile-hero,
  .post-card,
  .feed-card,
  .super-hero,
  .super-card{
    min-width:0!important;
  }

  .grid,
  .install-grid,
  .super-two,
  .super-grid,
  .admin-grid,
  .profile-layout,
  .feed-layout{
    min-width:0!important;
  }
}

/* Små telefoner: hold Log ud synlig, men fjern de mindst vigtige top-ikoner */
@media (max-width:520px){
  .app-topbar{
    gap:7px!important;
  }
  .top-search{
    min-width:120px!important;
  }
  .top-pill{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }
  .top-logout-btn{
    min-width:64px;
    padding:0 10px;
    font-size:12px;
  }
}

/* Ekstra små telefoner */
@media (max-width:420px){
  .top-actions .top-pill:nth-of-type(n+3){
    display:none!important;
  }
  .top-logout-btn{
    display:inline-flex!important;
  }
}


/* V6.25.8 ekstra mobil stabilitet */
@media(max-width:980px){
  .layout{max-width:100vw!important;overflow-x:hidden!important}
  .app-stage{min-width:0!important}
  .top-actions{contain:layout paint}
  body.wc-page-profile .app-topbar{position:sticky;top:0;z-index:50}
}
