/* Compact Akedi category/subcategory controls for Reels + Explore.
   Scope is deliberately narrow: no feed cards, search, hashtags, or reel logic. */

.akedi-filter-form{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:0;
}

.akedi-filter-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
  opacity:0!important;
  pointer-events:none!important;
}

.akedi-filter-menu{
  position:relative;
  flex:0 0 auto;
}

.akedi-filter-trigger{
  width:172px;
  max-width:172px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 12px 0 14px;
  border:1px solid #b7d9c1;
  border-radius:999px;
  background:#fff;
  color:#075f46;
  cursor:pointer;
  font:inherit;
  font-size:.9rem;
  font-weight:700;
  line-height:1;
  text-align:left;
  box-shadow:none;
}

.akedi-filter-trigger > span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.akedi-filter-trigger svg{
  width:17px;
  height:17px;
  flex:0 0 17px;
  fill:none;
  stroke:#075f46;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .15s ease;
}

.akedi-filter-trigger[aria-expanded="true"]{
  border-color:#12c25b;
  background:#f5fcf8;
}

.akedi-filter-trigger[aria-expanded="true"] svg{
  transform:rotate(180deg);
}

.akedi-filter-menu.is-disabled .akedi-filter-trigger,
.akedi-filter-trigger:disabled{
  opacity:.52;
  cursor:not-allowed;
}

.akedi-filter-panel{
  position:fixed;
  z-index:12000;
  width:min(310px,calc(100vw - 24px));
  max-height:min(390px,calc(100vh - 24px));
  overflow:auto;
  padding:8px;
  border:1px solid #d7e9df;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 44px rgba(5,60,46,.16),0 3px 10px rgba(5,60,46,.06);
  overscroll-behavior:contain;
}

.akedi-filter-panel[hidden]{
  display:none!important;
}

.akedi-filter-panel-title{
  padding:7px 10px 8px;
  color:#6f7f79;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.akedi-filter-option{
  width:100%;
  min-height:40px;
  display:flex;
  align-items:center;
  padding:8px 10px;
  border:0;
  border-radius:9px;
  background:#fff;
  color:#14231e;
  cursor:pointer;
  font:inherit;
  font-size:.9rem;
  font-weight:600;
  line-height:1.25;
  text-align:left;
}

.akedi-filter-option:hover,
.akedi-filter-option:focus-visible{
  outline:none;
  background:#e9f7f1;
  color:#075f46;
}

.akedi-filter-option.is-selected{
  background:#e9f7f1;
  color:#075f46;
  font-weight:700;
}

.feed-nav .btn-upload{
  border-color:#f28b25!important;
  background:#f28b25!important;
  color:#fff!important;
}

.feed-nav .btn-upload:hover,
.feed-nav .btn-upload:focus-visible{
  border-color:#df7615!important;
  background:#df7615!important;
  color:#fff!important;
}

@media(max-width:767.98px){
  /* Give Search and Post breathing room without changing their behaviour. */
  .feed-nav .nav-inner{
    column-gap:10px!important;
  }

  .feed-nav .search-pill{
    min-width:0!important;
    width:auto!important;
    flex:1 1 auto!important;
  }

  .feed-nav .btn-upload{
    flex:0 0 auto!important;
    margin-left:0!important;
  }
}

@media(max-width:576px){
  /* Keep filters in the same horizontal rail, but let their real labels breathe. */
  #trendChips .akedi-filter-form{
    width:auto;
    flex:0 0 auto;
    flex-wrap:nowrap;
  }

  #trendChips .akedi-filter-menu{
    flex:0 0 auto;
    min-width:0;
  }

  #trendChips .akedi-filter-trigger{
    width:auto;
    max-width:220px;
    min-width:142px;
    height:38px;
    padding-right:10px;
    padding-left:12px;
    font-size:.86rem;
  }

  #trendChips [data-select="subSel"] .akedi-filter-trigger{
    min-width:164px;
  }

  #trendChips .akedi-filter-trigger > span{
    max-width:184px;
  }

  .akedi-filter-panel{
    width:min(320px,calc(100vw - 20px));
  }
}
