/* Armory Revamp v3 - Overlay & Modal Styles */

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.filter-overlay-content {
    background: var(--clr-surface-dark);
    width: 90%;
    max-width: 600px;
    height: 85vh;
    border: 1px solid var(--clr-accent);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.filter-header {
    padding: 1rem;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-footer {
    padding: 1rem;
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    display: flex;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group h3 {
    font-size: 0.9rem;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.filter-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.filter-toggle {
    background: var(--clr-surface-light);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-dim);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.filter-toggle.active {
    background: var(--clr-accent);
    color: var(--clr-bg);
    border-color: var(--clr-accent-bright);
    box-shadow: 0 0 10px rgba(var(--rgb-accent), 0.3);
}

/* iLevel Slider */
.ilevel-slider-container {
    padding: 0 0.5rem;
}

.dual-range-inputs {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

/* Keyword Chips */
.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-chip {
    background: var(--clr-surface-light);
    border: 1px solid var(--clr-accent-dim);
    color: var(--clr-accent-bright);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.keyword-chip .remove {
    cursor: pointer;
    opacity: 0.6;
}

.keyword-chip .remove:hover {
    opacity: 1;
}

/* Affix Modal */
.affix-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 500px;
    height: 70vh;
    background: var(--clr-surface);
    border: 2px solid var(--clr-accent-bright);
    z-index: 1100;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.affix-search-bar {
    padding: 1rem;
    background: var(--clr-surface-dark);
}

.affix-search-bar input {
    width: 100%;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    padding: 0.6rem;
    border-radius: 4px;
}

.affix-tabs {
    display: flex;
    border-bottom: 1px solid var(--clr-border);
}

.affix-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
}

.affix-tab.active {
    opacity: 1;
    background: var(--clr-surface-light);
    border-bottom: 2px solid var(--clr-accent);
}

.affix-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.affix-item {
    padding: 0.6rem;
    border-bottom: 1px solid var(--clr-white-faint);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.affix-item:hover {
    background: var(--clr-surface-light);
}

/* Lock Icons */
.lock-toggle {
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s;
    margin-top: 0.2rem;
}

.lock-toggle:hover {
    opacity: 1;
}

.lock-toggle.active {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--clr-accent));
}

.equip-slot.locked {
    border-color: var(--clr-accent-dim);
    background: rgba(var(--rgb-accent), 0.05);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .filter-overlay-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
