/* =====================================================================
   Outfitter Panel - Premium cosmetics (portraits + nameplates)
   Uses shared `.overlay-panel` shell from profile-core.css.
   ===================================================================== */

#outfitter-panel.outfitter-panel--open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

/* ── Toolbar: tabs + sovereign balance ─────────────────────────────── */
.of-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-md) 0 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    margin-bottom: var(--space-lg);
}

.of-toolbar .panel-tabs {
    flex: 1 1 auto;
    min-width: 0;
    border-bottom: none;
}

.of-sov-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding-bottom: 10px;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.06em;
    color: var(--gold);
    margin-left: auto;
}

.of-sov-balance img {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

/* ── Item card grid ────────────────────────────────────────────────── */
.of-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
    padding-bottom: var(--space-xl);
}

.of-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(200, 168, 75, 0.12);
    background: rgba(200, 168, 75, 0.03);
    position: relative;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.of-card:hover:not(.of-card--locked) {
    border-color: rgba(200, 168, 75, 0.3);
    background: rgba(200, 168, 75, 0.06);
}

.of-card--equipped {
    border-color: var(--gold);
    background: rgba(200, 168, 75, 0.1);
}

.of-card--locked {
    border-color: rgba(200, 168, 75, 0.08);
    background: rgba(200, 168, 75, 0.015);
}

.of-card--locked .of-card-name {
    color: var(--text-secondary);
}

.of-card--locked .of-card-preview {
    border-color: rgba(200, 168, 75, 0.08);
}

.of-card--locked .of-nameplate-preview {
    background: rgba(0, 0, 0, 0.2);
}

.of-card-preview {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 2px solid rgba(200, 168, 75, 0.15);
    overflow: hidden;
}

.of-card-preview.of-nameplate-preview {
    overflow: visible;
}

.of-card--equipped .of-card-preview {
    border-color: var(--gold);
}

.of-card--locked .of-card-preview img {
    filter: grayscale(0.5) brightness(0.6);
}

.of-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.of-nameplate-preview {
    width: 100%;
    min-width: 0;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    font-weight: bold;
    line-height: 1;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    overflow: visible;
}

.of-nameplate-preview .of-nameplate-text:not([class*='namestyle-']) {
    color: var(--gold);
}

.of-nameplate-text {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 1em;
    max-width: 100%;
    line-height: 1;
    overflow: visible;
}

.of-nameplate-text > * {
    flex-shrink: 0;
    max-width: 100%;
    overflow: visible;
}

/* Wave preview: stack offset handled globally in name-styles-effects.css */
.of-nameplate-preview .nameplate-stack:has(.nameeffect-wave) {
    margin-top: 0;
}

.of-nameplate-text:has(.nameeffect-flicker, .nameeffect-glow, .nameeffect-lights, .nameeffect-wave, .nameeffect-gummy) {
    overflow: visible;
}

.of-card-name {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
}

.of-card-action {
    width: 100%;
    display: flex;
    justify-content: center;
}

.of-equipped-label {
    cursor: default;
    pointer-events: none;
}

.of-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.of-buy-btn img {
    width: 14px;
    height: 14px;
}

@media (max-width: 40rem) {
    .of-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
