/* CodeLinSoft Nova 4.9.24 — final bbPress mobile/account corrections */

/* -------------------------------------------------------------------------
 * Account control: neutral everywhere, including the forum root/index.
 * ---------------------------------------------------------------------- */
html body.cls-bbpress .bbp-tabs-bar .bbp-account-toggle,
html body.cls-bbp-unified .bbp-tabs-bar .bbp-account-toggle,
html body.cls-bbp-forum-home .bbp-tabs-bar .bbp-account-toggle,
html body .cls-forum-index .bbp-tabs-bar .bbp-account-toggle {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-width:0!important;
  min-height:34px!important;
  height:auto!important;
  padding:3px 8px!important;
  border:1px solid #d7e5ee!important;
  border-radius:10px!important;
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
  color:#173d5b!important;
  box-shadow:none!important;
  filter:none!important;
}
html body.cls-bbpress .bbp-tabs-bar .bbp-account-toggle:hover,
html body.cls-bbpress .bbp-tabs-bar .bbp-account-toggle:focus-visible,
html body.cls-bbpress .bbp-tabs-bar .bbp-account-toggle[aria-expanded="true"],
html body.cls-bbp-unified .bbp-tabs-bar .bbp-account-toggle:hover,
html body.cls-bbp-unified .bbp-tabs-bar .bbp-account-toggle:focus-visible,
html body.cls-bbp-unified .bbp-tabs-bar .bbp-account-toggle[aria-expanded="true"],
html body.cls-bbp-forum-home .bbp-tabs-bar .bbp-account-toggle:hover,
html body.cls-bbp-forum-home .bbp-tabs-bar .bbp-account-toggle:focus-visible,
html body.cls-bbp-forum-home .bbp-tabs-bar .bbp-account-toggle[aria-expanded="true"],
html body .cls-forum-index .bbp-tabs-bar .bbp-account-toggle:hover,
html body .cls-forum-index .bbp-tabs-bar .bbp-account-toggle:focus-visible,
html body .cls-forum-index .bbp-tabs-bar .bbp-account-toggle[aria-expanded="true"] {
  border-color:#bdd7e7!important;
  background:#f7fbfd!important;
  background-color:#f7fbfd!important;
  background-image:none!important;
  color:#173d5b!important;
  box-shadow:0 0 0 3px rgba(7,135,249,.06)!important;
}

/* Keep real avatars square and never let inherited img rules squeeze them. */
html body .bbp-tabs-bar img.bbp-account-avatar,
html body .bbp-account-menu img.bbp-account-avatar {
  display:block!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  flex:0 0 30px!important;
  aspect-ratio:1 / 1!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
}
.bbp-account-avatar--guest {
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  flex:0 0 30px!important;
  aspect-ratio:1 / 1!important;
}
.bbp-account-menu-user {
  display:none;
  align-items:center;
  gap:10px;
  margin:0 0 9px;
  padding:0 0 10px;
  border-bottom:1px solid #e4edf3;
  color:#173d5b;
  font-weight:800;
}
.bbp-account-menu-user__name {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:767px) {
  /* Avatar-only trigger on mobile; user name stays inside the dropdown. */
  html body.cls-bbpress .bbp-tabs-bar .bbp-account-toggle,
  html body.cls-bbp-unified .bbp-tabs-bar .bbp-account-toggle,
  html body.cls-bbp-forum-home .bbp-tabs-bar .bbp-account-toggle,
  html body .cls-forum-index .bbp-tabs-bar .bbp-account-toggle {
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding:5px!important;
    border-radius:11px!important;
    background:#fff!important;
    background-image:none!important;
    color:#173d5b!important;
  }
  html body .bbp-tabs-bar .bbp-account-toggle .bbp-account-name,
  html body .bbp-tabs-bar .bbp-account-toggle .bbp-account-caret {
    display:none!important;
  }
  html body .bbp-tabs-bar .bbp-account-toggle img.bbp-account-avatar,
  html body .bbp-tabs-bar .bbp-account-toggle .bbp-account-avatar--guest {
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    flex:0 0 30px!important;
  }
  .bbp-account-menu-user { display:flex!important; }

  /* -----------------------------------------------------------------------
   * Topic recenti: no horizontal overflow, no clipped Search button and no
   * half-visible filter chips.  The content follows the same mobile rhythm
   * as the forum index.
   * -------------------------------------------------------------------- */
  body.cls-bbp-unified .cls-page-intro,
  body.cls-bbp-unified .cls-page-intro > div,
  body.cls-bbp-unified .cls-page-intro__search,
  body.cls-bbp-unified .cls-forum-content-section,
  body.cls-bbp-unified .bbp-topic-list-wrap,
  body.cls-bbp-unified .bbp-topic-stream {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  body.cls-bbp-unified .cls-page-intro {
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    padding:16px!important;
    overflow:hidden!important;
  }
  body.cls-bbp-unified .cls-page-intro h1 {
    font-size:clamp(31px,10vw,42px)!important;
    overflow-wrap:anywhere!important;
  }
  body.cls-bbp-unified .cls-page-intro__search .bbp-search-form,
  body.cls-bbp-unified .cls-page-intro__search form {
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body.cls-bbp-unified .cls-page-intro__search .bbp-search-form__inner {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:stretch!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    padding:5px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.cls-bbp-unified .cls-page-intro__search .bbp-search-form__field {
    min-width:0!important;
    width:100%!important;
  }
  body.cls-bbp-unified .cls-page-intro__search input[type="search"] {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 10px!important;
    box-sizing:border-box!important;
    font-size:14px!important;
  }
  body.cls-bbp-unified .cls-page-intro__search .bbp-search-form__action {
    display:flex!important;
    min-width:0!important;
  }
  body.cls-bbp-unified .cls-page-intro__search #bbp_search_submit {
    min-width:72px!important;
    width:auto!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 13px!important;
    margin:0!important;
    font-size:13px!important;
    white-space:nowrap!important;
  }

  body.cls-bbp-unified .cls-forum-content-section {
    padding:12px!important;
    overflow:hidden!important;
  }
  body.cls-bbp-unified .cls-section-title {
    margin-bottom:12px!important;
  }
  body.cls-bbp-unified .cls-section-title > div {
    align-items:flex-start!important;
  }
  body.cls-bbp-unified .cls-section-title h2 {
    font-size:19px!important;
  }

  /* Two-row mobile filter grid instead of a clipped horizontal strip. */
  body.cls-bbp-unified .cls-topic-filterbar {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 12px!important;
    padding:7px!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body.cls-bbp-unified .cls-topic-filter {
    display:flex!important;
    justify-content:center!important;
    min-width:0!important;
    width:100%!important;
    min-height:36px!important;
    padding:0 7px!important;
    font-size:11px!important;
    white-space:nowrap!important;
  }
  body.cls-bbp-unified .cls-topic-filter:last-child:nth-child(odd) {
    grid-column:1 / -1!important;
  }

  body.cls-bbp-unified .bbp-topic-stream {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    overflow:visible!important;
  }
  body.cls-bbp-unified .cls-topic-card {
    position:relative!important;
    display:grid!important;
    grid-template-columns:50px minmax(0,1fr)!important;
    align-items:start!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    padding:12px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.cls-bbp-unified .cls-topic-card__icon {
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    border-radius:12px!important;
    font-size:18px!important;
  }
  body.cls-bbp-unified .cls-topic-card__body {
    width:100%!important;
    min-width:0!important;
  }
  body.cls-bbp-unified .cls-topic-card__topline {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:5px!important;
    margin:0 0 5px!important;
    padding-right:0!important;
  }
  body.cls-bbp-unified .cls-topic-kind {
    min-height:21px!important;
    padding:0 7px!important;
    font-size:8.5px!important;
  }
  body.cls-bbp-unified .cls-topic-card__title {
    margin:0!important;
    font-size:16px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  body.cls-bbp-unified .cls-topic-card__excerpt {
    margin:5px 0 8px!important;
    font-size:11.5px!important;
    line-height:1.45!important;
    -webkit-line-clamp:3!important;
  }
  body.cls-bbp-unified .cls-topic-card__meta {
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:5px!important;
    min-width:0!important;
    font-size:10px!important;
    line-height:1.35!important;
  }
  body.cls-bbp-unified .cls-topic-card__avatar {
    width:24px!important;
    min-width:24px!important;
    max-width:24px!important;
    height:24px!important;
    min-height:24px!important;
    max-height:24px!important;
    flex:0 0 24px!important;
    aspect-ratio:1 / 1!important;
    object-fit:cover!important;
    border-radius:50%!important;
  }
  body.cls-bbp-unified .cls-topic-card__numbers,
  body.cls-bbp-unified .cls-topic-card__latest,
  body.cls-bbp-unified .cls-topic-card__open {
    display:none!important;
  }
}

@media (min-width:768px) {
  .bbp-account-menu-user { display:none!important; }
}


/* Nova 4.9.36 — mobile forum account dropdown is anchored to its trigger. */
@media (max-width:767px) {
  html body .bbp-tabs-bar .bbp-account {
    position:relative!important;
    z-index:13020!important;
    overflow:visible!important;
  }

  html body .bbp-tabs-bar .bbp-account-menu {
    position:absolute!important;
    top:calc(100% + 8px)!important;
    right:0!important;
    bottom:auto!important;
    left:auto!important;
    margin:0!important;
    transform:none!important;
    width:min(330px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    max-height:min(68vh,430px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    z-index:13050!important;
  }
}
