/* Local BJJ custom select. Dark theme, square, keyboard-friendly.
   Ported from Middle Mann's mm-admin-select with brand color swap.

   Markup:
     <div class="lbjj-select" data-lbjj-select data-name="belt_rank" data-value="white">
       <button type="button" class="lbjj-select__trigger">
         <span class="lbjj-select__label">White</span>
         <span class="lbjj-select__chevron" aria-hidden="true"></span>
       </button>
       <ul class="lbjj-select__menu" role="listbox">
         <li class="lbjj-select__opt" data-value="white">White</li>
         <li class="lbjj-select__opt" data-value="blue">Blue</li>
       </ul>
       <input type="hidden" name="belt_rank" value="white">
     </div>
*/

.lbjj-select {
    position: relative;
    display: block;
    width: 100%;
    font-family: inherit;
}

.lbjj-select__trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: #161616;
    border: 1px solid #2a2a2a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    justify-content: space-between;
}

.lbjj-select__trigger:hover,
.lbjj-select.is-open .lbjj-select__trigger {
    border-color: #0059B3;
}

.lbjj-select__label {
    flex: 1;
}

.lbjj-select__chevron {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #9ca3af;
    transition: transform 160ms ease;
}

.lbjj-select.is-open .lbjj-select__chevron {
    transform: rotate(180deg);
}

.lbjj-select__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 100%;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: #161616;
    border: 1px solid #2a2a2a;
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: none;
    display: none;
}

.lbjj-select__menu::-webkit-scrollbar { display: none; }

.lbjj-select.is-open .lbjj-select__menu {
    display: block;
}

.lbjj-select__opt {
    padding: 10px 16px;
    font-size: 14px;
    color: #e5e7eb;
    cursor: pointer;
    white-space: nowrap;
}

.lbjj-select__opt:hover,
.lbjj-select__opt.is-focused {
    background: #1a1a1a;
    color: #fff;
}

.lbjj-select__opt.is-selected {
    color: #0059B3;
    font-weight: 700;
}
