/* ===========================================================
   Inventory page redesign — shared styles for Grid + Showcase
   =========================================================== */

/* Variation switcher */
.inv-variation-nav {
    background: rgba(13, 202, 240, 0.05);
    border: 1px dashed rgba(13, 202, 240, 0.25);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.inv-variation-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    border-radius: 0.4rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .inv-variation-btn:hover {
        background: rgba(13, 202, 240, 0.1);
        border-color: rgba(13, 202, 240, 0.4);
        color: #fff;
    }

    .inv-variation-btn.active {
        background: rgba(13, 202, 240, 0.18);
        border-color: #0dcaf0;
        color: #0dcaf0;
    }

/* ===== Stats row (Grid) ===== */
.inv-stats-row {
}

.inv-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
}

    .inv-stat-chip.inv-stat-chip-active {
        background: rgba(255, 193, 7, 0.08);
        border-color: rgba(255, 193, 7, 0.3);
    }

.inv-stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.inv-stat-value {
    color: #fff;
    font-size: 0.95rem;
}

/* ===== Toolbar (Grid) ===== */
.inv-toolbar {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.6rem;
    padding: 0.65rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(8px);
}

/* Type pills */
.inv-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .inv-pill:hover {
        background: rgba(13, 202, 240, 0.1);
        border-color: rgba(13, 202, 240, 0.35);
        color: #fff;
    }

    .inv-pill.active {
        background: rgba(13, 202, 240, 0.18);
        border-color: #0dcaf0;
        color: #0dcaf0;
    }

.inv-pill-count {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.25rem;
}

/* Search input */
.inv-search {
    position: relative;
    flex: 1 1 220px;
    max-width: 320px;
    min-width: 180px;
}

    .inv-search > i {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.5);
        pointer-events: none;
    }

    .inv-search input.form-control {
        padding-left: 2.25rem;
        background: rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
    }

        .inv-search input.form-control:focus {
            background: rgba(0, 0, 0, 0.45);
            border-color: rgba(13, 202, 240, 0.5);
            box-shadow: 0 0 0 0.15rem rgba(13, 202, 240, 0.15);
            color: #fff;
        }

/* Filter buttons */
.inv-filter-btn {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

    .inv-filter-btn:hover {
        background: rgba(13, 202, 240, 0.1);
        border-color: rgba(13, 202, 240, 0.4);
        color: #fff;
    }

.inv-filter-clear {
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

    .inv-filter-clear:hover {
        background: rgba(255, 193, 7, 0.1);
        border-color: rgba(255, 193, 7, 0.5);
        color: #ffc107;
    }

/* Wear inputs */
.inv-wear-input {
    width: 5rem;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

    .inv-wear-input:focus {
        border-color: rgba(13, 202, 240, 0.5) !important;
        box-shadow: 0 0 0 0.15rem rgba(13, 202, 240, 0.15) !important;
    }

/* Dropdown menus */
.inv-dropdown-menu {
    background: rgba(15, 22, 33, 0.97) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    min-width: 220px;
}

    .inv-dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        border-radius: 0.35rem;
        padding: 0.35rem 0.6rem;
    }

        .inv-dropdown-menu .dropdown-item:hover,
        .inv-dropdown-menu .dropdown-item:focus {
            background: rgba(13, 202, 240, 0.12);
            color: #fff;
        }

        .inv-dropdown-menu .dropdown-item.active {
            background: rgba(13, 202, 240, 0.22);
            color: #0dcaf0;
        }

.inv-dropdown-check {
    cursor: pointer;
}

.inv-rarity-dot {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    flex-shrink: 0;
}

    /* Re-use rarity-* color from skins.css by mapping border-color. The
       rarity-* classes set border-color on .weapon-card; we mirror that
       intent by applying them directly to the dot which inherits the same
       border-color rules. */

/* Rarity filter label — tint text matching rarity color (background/border
   from rarity-* classes are neutralized so only the text picks up color). */
.inv-rarity-label {
    background: none !important;
    border: 0 !important;
    font-weight: 600;
}

.inv-rarity-label.rarity-Default,
.inv-rarity-label.rarity-ConsumerGrade,
.inv-rarity-label.rarity-Consumer {
    color: rgb(176, 195, 217);
}

.inv-rarity-label.rarity-IndustrialGrade,
.inv-rarity-label.rarity-Industrial {
    color: rgb(94, 152, 217);
}

.inv-rarity-label.rarity-MilSpecGrade,
.inv-rarity-label.rarity-MilSpec,
.inv-rarity-label.rarity-Mil-Spec,
.inv-rarity-label.rarity-HighGrade,
.inv-rarity-label.rarity-High,
.inv-rarity-label.rarity-Distinguished {
    color: rgb(75, 105, 255);
}

.inv-rarity-label.rarity-Restricted,
.inv-rarity-label.rarity-Remarkable,
.inv-rarity-label.rarity-Exceptional {
    color: rgb(136, 71, 255);
}

.inv-rarity-label.rarity-Classified,
.inv-rarity-label.rarity-Superior {
    color: rgb(211, 44, 230);
}

.inv-rarity-label.rarity-Covert,
.inv-rarity-label.rarity-Master,
.inv-rarity-label.rarity-Extraordinary {
    color: rgb(235, 75, 75);
}

.inv-rarity-label.rarity-Contraband {
    color: rgb(228, 174, 57);
}

/* Category anchor pills */
.inv-cat-anchors {
}

.inv-cat-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

    .inv-cat-anchor:hover {
        background: rgba(13, 202, 240, 0.12);
        border-color: rgba(13, 202, 240, 0.4);
        color: #fff;
        transform: translateY(-1px);
    }

/* Inline SVG icon wrapper used by SvgInventoryIcon / SvgWeaponCategoryIcon dispatchers */
.inv-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

    .inv-svg-icon > svg {
        height: 1em;
        width: auto;
        max-width: none;
        fill: currentColor;
    }

    .inv-svg-icon.inv-svg-icon--lg > svg {
        height: 1.4em;
    }

    .inv-svg-icon.inv-svg-icon--xxl > svg {
        height: 3em;
    }

/* Category section */
.inv-cat-section {
    scroll-margin-top: 110px; /* Account for sticky toolbar */
}

.inv-cat-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-cat-title {
    color: #fff;
    font-weight: 600;
}

/* ===== Grid card overrides ===== */
.inv-grid-card {
    position: relative;
}

    .inv-grid-card .inv-card-value-badge {
        position: absolute;
        top: 0.4rem;
        right: 0.4rem;
        background: rgba(0, 0, 0, 0.7);
        color: #0dcaf0;
        border: 1px solid rgba(13, 202, 240, 0.35);
        border-radius: 0.35rem;
        padding: 0.1rem 0.4rem;
        font-size: 0.72rem;
        font-weight: 600;
        backdrop-filter: blur(4px);
        z-index: 2;
    }

    .inv-grid-card .inv-card-sell-overlay {
        position: absolute;
        inset: auto 0 0 0;
        background: linear-gradient(0deg, rgba(13, 202, 240, 0.95), rgba(13, 202, 240, 0));
        color: #fff;
        font-weight: 600;
        font-size: 0.8rem;
        text-align: center;
        padding: 1.5rem 0.5rem 0.4rem;
        opacity: 0;
        transition: opacity 0.2s ease;
        pointer-events: none;
    }

    .inv-grid-card:hover .inv-card-sell-overlay {
        opacity: 1;
    }

/* ===== Showcase: hero ===== */
.inv-hero {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
}

.inv-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(13, 202, 240, 0.18), transparent 60%);
    pointer-events: none;
}

.inv-hero-content {
    position: relative;
    z-index: 1;
}

.inv-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: rgba(13, 202, 240, 0.15);
    border: 1px solid rgba(13, 202, 240, 0.4);
    color: #0dcaf0;
    font-size: 1.4rem;
}

.inv-hero-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inv-hero-value {
    color: #0dcaf0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.inv-hero-sub {
    margin-top: 0.15rem;
}

.inv-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.4rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

    .inv-hero-chip > i {
        color: #0dcaf0;
    }

/* ===== Showcase: sidebar ===== */
.inv-sidebar.is-open .inv-sidebar-card {
    display: block;
}

@media (max-width: 991.98px) {
    .inv-sidebar:not(.is-open) .inv-sidebar-card {
        display: none;
    }
}

.inv-sidebar-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.6rem;
    padding: 0.75rem;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
}

.inv-sidebar-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

    .inv-sidebar-section:last-child {
        border-bottom: none;
    }

.inv-sidebar-label {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.inv-side-row {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    text-align: left;
    transition: all 0.15s ease;
    margin-bottom: 0.15rem;
    cursor: pointer;
    font-size: 0.9rem;
}

    .inv-side-row:hover {
        background: rgba(13, 202, 240, 0.08);
        border-color: rgba(13, 202, 240, 0.2);
        color: #fff;
    }

    .inv-side-row.active {
        background: rgba(13, 202, 240, 0.18);
        border-color: rgba(13, 202, 240, 0.4);
        color: #0dcaf0;
    }

.inv-side-check {
    user-select: none;
}

.inv-select {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

    .inv-select:focus {
        border-color: rgba(13, 202, 240, 0.5) !important;
        box-shadow: 0 0 0 0.15rem rgba(13, 202, 240, 0.15) !important;
    }

/* ===== Showcase cards ===== */
.inv-showcase-card {
    position: relative;
    border-radius: 0.6rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
    /* Override default rarity-* :hover scale(1.05) for a subtler feel here */
}

    .inv-showcase-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    }

.inv-showcase-card-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background: radial-gradient(circle at 50% 0%, var(--inv-glow, rgba(13, 202, 240, 0.18)), transparent 65%);
    transition: opacity 0.25s ease;
}

.inv-showcase-card:hover .inv-showcase-card-glow {
    opacity: 1;
}

.inv-showcase-card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1;
}

.inv-showcase-stattrak {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #ffc107;
    padding: 0.1rem 0.45rem;
    border-radius: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.inv-showcase-card-body {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.75rem 0.7rem;
}

.inv-showcase-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-height: 2.6rem;
}

    .inv-showcase-name .weapon-card-name {
        font-weight: 600;
        color: #fff;
        font-size: 0.95rem;
    }

    .inv-showcase-name .weapon-card-paint {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.8rem;
    }

.inv-showcase-card-footer {
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 0.5rem;
}

.inv-showcase-value {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.inv-showcase-value-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.inv-showcase-value-amount {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.inv-showcase-sell-btn {
    background: rgba(13, 202, 240, 0.15);
    border: 1px solid rgba(13, 202, 240, 0.4);
    color: #0dcaf0;
    transition: all 0.2s ease;
    padding: 0.35rem 0.65rem;
    border-radius: 0.4rem;
}

    .inv-showcase-sell-btn:hover:not(:disabled) {
        background: #0dcaf0;
        color: #000;
        border-color: #0dcaf0;
        transform: scale(1.05);
    }

/* Rarity colors driven via rarity-* classes already defined in skins.css —
   we just need the showcase card to react to them through border-color. */
.inv-showcase-card.rarity-Default,
.inv-showcase-card.rarity-ConsumerGrade,
.inv-showcase-card.rarity-Consumer {
    --inv-glow: rgba(176, 195, 217, 0.2);
}

.inv-showcase-card.rarity-IndustrialGrade,
.inv-showcase-card.rarity-Industrial {
    --inv-glow: rgba(94, 152, 217, 0.25);
}

.inv-showcase-card.rarity-MilSpecGrade,
.inv-showcase-card.rarity-MilSpec,
.inv-showcase-card.rarity-Mil-Spec,
.inv-showcase-card.rarity-HighGrade,
.inv-showcase-card.rarity-High,
.inv-showcase-card.rarity-Distinguished {
    --inv-glow: rgba(75, 105, 255, 0.28);
}

.inv-showcase-card.rarity-Restricted,
.inv-showcase-card.rarity-Remarkable,
.inv-showcase-card.rarity-Exceptional {
    --inv-glow: rgba(136, 71, 255, 0.32);
}

.inv-showcase-card.rarity-Classified,
.inv-showcase-card.rarity-Exotic,
.inv-showcase-card.rarity-Superior {
    --inv-glow: rgba(211, 44, 230, 0.32);
}

.inv-showcase-card.rarity-Covert,
.inv-showcase-card.rarity-Extraordinary,
.inv-showcase-card.rarity-Master {
    --inv-glow: rgba(235, 75, 75, 0.35);
}

.inv-showcase-card.rarity-Contraband {
    --inv-glow: rgba(228, 174, 57, 0.4);
}

/* Override default .rarity-* :hover { transform: scale(1.05) } from skins.css
   on showcase cards so we can use a subtler translateY effect. */
.inv-showcase-card:hover {
    transform: translateY(-3px) !important;
}

/* Showcase category header */
.inv-cat-header-showcase {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(13, 202, 240, 0.15);
}

.inv-cat-count {
    background: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.35);
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.inv-cat-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(13, 202, 240, 0.2), transparent);
}

/* Nested weapon-category subsection inside a type section */
.inv-cat-subsection {
    padding-left: 0.5rem;
}

.inv-cat-subheader {
    padding-bottom: 0.25rem;
}

.inv-cat-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* Bulk-sell selection state */
.inv-showcase-card.is-selected {
    border-color: rgba(13, 202, 240, 0.65);
    box-shadow: 0 0 0 2px rgba(13, 202, 240, 0.35), 0 10px 26px rgba(0, 0, 0, 0.45);
}

.inv-showcase-select-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.25rem;
}

    .inv-showcase-select-check input.form-check-input {
        cursor: pointer;
        background-color: rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.35);
    }

        .inv-showcase-select-check input.form-check-input:checked {
            background-color: #0dcaf0;
            border-color: #0dcaf0;
        }

