/* Item picker — standalone (não depende do rebuild do Tailwind) */

.item-picker__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background-color: rgba(6, 8, 12, 0.82);
    backdrop-filter: blur(2px);
}

.item-picker__backdrop.is-open {
    display: block !important;
}

.item-picker__panel {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    border-radius: 0.125rem;
    border: 2px solid #8b5e3c;
    padding: 0.5rem;
    background-color: #1c1f26;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(212, 165, 116, 0.18);
}

.item-picker__panel.is-open {
    display: flex !important;
    flex-direction: column !important;
}

.item-picker__search {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
    background-color: #1c1f26;
    border: 1px solid #8b5e3c;
    border-radius: 0.125rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #e8eaed;
}

.item-picker__search::placeholder {
    color: #9ca3af;
}

.item-picker__search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.45);
}

.item-picker__catalog {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background-color: #111318;
    border: 1px solid rgba(139, 94, 60, 0.45);
    border-radius: 0.125rem;
    padding: 0.25rem;
}

.item-picker__catalog-message {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: #9ca3af;
    text-align: left;
}

.item-picker__option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 0;
    border-radius: 0.125rem;
    background: transparent;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    outline: none;
    appearance: none;
}

.item-picker__option--zebra {
    background-color: rgba(255, 255, 255, 0.025);
}

.item-picker__option:hover {
    background-color: #262b36;
}

.item-picker__option--hidden {
    display: none !important;
}

.item-picker__option-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    cursor: help;
}

.item-picker__option-icon-wrap {
    position: relative;
    display: block;
    width: 2.25rem;
    height: 2.25rem;
}

.item-picker__option-icon .item-slot {
    width: 2.25rem !important;
    height: 2.25rem !important;
}

.item-picker__option-icon-wrap .tbh-level-badge,
.tbh-level-badge--compact {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 10;
    font-size: 7px;
    line-height: 1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background-color: rgba(6, 8, 12, 0.9);
    color: #d4a574;
    padding: 0 2px;
    border-top: 1px solid rgba(139, 94, 60, 0.35);
    border-left: 1px solid rgba(139, 94, 60, 0.35);
    border-top-left-radius: 2px;
    letter-spacing: -0.02em;
    pointer-events: none;
}

.item-picker__option-icon img {
    object-fit: contain;
    image-rendering: pixelated;
}

.item-picker__option--selected {
    background-color: #262b36;
    box-shadow: inset 0 0 0 1px rgba(212, 165, 116, 0.6);
}

.item-picker__option-label {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    text-align: left;
}

.item-picker__option-name {
    font-size: 0.75rem;
    line-height: 1.125rem;
    color: #e8eaed;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-picker__option-grade {
    font-size: 0.625rem;
    line-height: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-picker__floating-popover {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
}

.item-picker__floating-popover .tbh-popover {
    pointer-events: auto;
}

.slot-composer.item-picker--open {
    position: relative;
    z-index: 20;
}
