/* Wimmer Community V6.54.1s – Header kompakt stabil
   Formål: Ingen overlap, ingen store huller, ingen radio/tekstknapper presset ind i toppen.
   Topbar: søgning + sprog + små ikoner + profil. */

@media (min-width: 981px){
  .app-topbar{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    overflow:hidden!important;
    min-width:0!important;
    justify-content:flex-start!important;
  }

  .app-topbar .top-search{
    flex:0 1 520px!important;
    width:520px!important;
    min-width:360px!important;
    max-width:520px!important;
    overflow:hidden!important;
    margin:0!important;
  }

  .app-topbar .top-search input{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .app-topbar .top-search kbd{
    display:none!important;
  }

  .top-nav.top-actions{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    flex:0 0 auto!important;
    min-width:0!important;
    margin-left:0!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }

  .top-nav.top-actions .top-admin-btn,
  .top-nav.top-actions .top-logout-btn,
  .top-nav.top-actions .top-login,
  .top-nav.top-actions .btn.small,
  .top-nav.top-actions a[href="sms_settings.php"],
  .top-nav.top-actions a[href="superadmin.php"],
  .top-nav.top-actions a[href="superadmin_verifications.php"],
  .top-nav.top-actions .wc-radio-pill{
    display:none!important;
  }

  .top-nav.top-actions .top-pill{
    flex:0 0 48px!important;
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:48px!important;
    margin:0!important;
  }

  .top-nav.top-actions .wc-top-lang{
    flex:0 0 190px!important;
    width:190px!important;
    min-width:190px!important;
    max-width:190px!important;
    margin:0!important;
  }

  .app-topbar .user-chip{
    position:relative!important;
    z-index:2!important;
    flex:0 0 230px!important;
    width:230px!important;
    min-width:230px!important;
    max-width:230px!important;
    height:52px!important;
    margin-left:0!important;
    padding:5px 12px 5px 8px!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    transform:none!important;
  }

  .app-topbar .user-chip img{
    position:static!important;
    transform:none!important;
    margin:0!important;
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    object-fit:cover!important;
  }

  .app-topbar .user-chip span:not(.bell){
    min-width:0!important;
    overflow:hidden!important;
  }

  .app-topbar .user-chip strong,
  .app-topbar .user-chip em{
    display:block!important;
    max-width:150px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
}

@media (min-width: 981px) and (max-width: 1500px){
  .app-topbar{
    gap:8px!important;
  }
  .app-topbar .top-search{
    flex-basis:450px!important;
    width:450px!important;
    min-width:300px!important;
    max-width:450px!important;
  }
  .top-nav.top-actions .wc-top-lang{
    flex-basis:170px!important;
    width:170px!important;
    min-width:170px!important;
    max-width:170px!important;
  }
  .app-topbar .user-chip{
    flex-basis:215px!important;
    width:215px!important;
    min-width:215px!important;
    max-width:215px!important;
  }
  .app-topbar .user-chip strong,
  .app-topbar .user-chip em{
    max-width:135px!important;
  }
}

@media (min-width: 981px) and (max-width: 1320px){
  .app-topbar .top-search{
    flex-basis:380px!important;
    width:380px!important;
    min-width:260px!important;
    max-width:380px!important;
  }
  .top-nav.top-actions .wc-top-lang{
    display:none!important;
  }
}

@media (max-width: 980px){
  .top-nav.top-actions .wc-radio-pill,
  .top-nav.top-actions .top-admin-btn,
  .top-nav.top-actions .top-logout-btn,
  .top-nav.top-actions a[href="sms_settings.php"],
  .top-nav.top-actions a[href="superadmin.php"],
  .top-nav.top-actions a[href="superadmin_verifications.php"]{
    display:none!important;
  }

  .app-topbar .user-chip{
    position:relative!important;
    transform:none!important;
    overflow:hidden!important;
    z-index:2!important;
  }

  .app-topbar .user-chip img{
    position:static!important;
    transform:none!important;
    margin:0!important;
  }
}


/* V6.54.1s – Log ud tilbage som lille ikon-knap.
   Den gamle store tekstknap er væk, men Log ud skal stadig være synlig og pæn. */
@media (min-width: 981px){
  .top-nav.top-actions .wc-logout-pill{
    display:inline-grid!important;
    flex:0 0 48px!important;
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:48px!important;
    margin:0!important;
    position:relative!important;
  }
  .top-nav.top-actions .wc-logout-pill .wc-pill-icon{
    color:#ffd6dc!important;
  }
  .top-nav.top-actions .wc-logout-pill:hover{
    border-color:rgba(255,95,122,.45)!important;
    background:rgba(255,95,122,.12)!important;
  }
}

/* Mobil: Log ud må gerne vises som en almindelig lille top-handling,
   men uden at presse profilfeltet. */
@media (max-width: 980px){
  .top-nav.top-actions .wc-logout-pill{
    display:grid!important;
  }
}


/* V6.54.1s – Log ud skal være tydelig tekst, ikke en uklar ikon/firkant-knap. */
@media (min-width: 981px){
  .top-nav.top-actions .wc-logout-pill{
    display:none!important;
  }

  .top-nav.top-actions .wc-logout-textpill{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    height:48px!important;
    min-width:78px!important;
    padding:0 15px!important;
    margin:0!important;
    border-radius:15px!important;
    border:1px solid rgba(255,95,122,.34)!important;
    background:rgba(255,95,122,.10)!important;
    color:#ffd6dc!important;
    font-size:13px!important;
    font-weight:950!important;
    text-decoration:none!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }

  .top-nav.top-actions .wc-logout-textpill:hover{
    background:rgba(255,95,122,.16)!important;
    border-color:rgba(255,95,122,.52)!important;
    color:#fff0f3!important;
  }
}

/* Hvis skærmen er for trang, gemmes Log ud i topbaren.
   Den findes stadig i sidemenuen, så den ikke ødelægger layoutet. */
@media (min-width: 981px) and (max-width: 1320px){
  .top-nav.top-actions .wc-logout-textpill{
    display:none!important;
  }
}

@media (max-width: 980px){
  .top-nav.top-actions .wc-logout-textpill,
  .top-nav.top-actions .wc-logout-pill{
    display:none!important;
  }
}
