﻿/* =========================================
   Inventory Overlay
   ========================================= */

#inventory-overlay.modal-overlay {
    background: linear-gradient( 180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E) ) !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 16px 16px calc(64px + env(safe-area-inset-bottom, 0px) + 12px) !important;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(4px);
}

#inventory-overlay .inventory-sheet {
    width: min(100%, 760px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, #fbfbfb, #f2f2f2) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18) !important;
    display: flex;
    flex-direction: column;
    padding: 18px !important;
    gap: 18px;
    color: #1f2330 !important;
}

#inventory-overlay .settings-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 12px;
}

#inventory-overlay .settings-title {
    margin: 0;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: #1f2330 !important;
}

#inventory-overlay .settings-header-spacer {
    width: 44px;
    height: 44px;
}

#inventory-overlay .settings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inventory-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8d4fff, #6f35f0);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(124, 77, 255, 0.18);
}

.inventory-dye-row {
    min-height: 72px;
}

.inventory-dye-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7f4ef, #ede9e2);
    border: 1px solid #d7d1c6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.inventory-dye-swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

.inventory-dye-swatch--light {
    border: 1px solid #d2d2d2;
}

.inventory-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ece3ff;
    color: #6f35f0;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 640px) {
    #inventory-overlay .inventory-sheet {
        padding: 16px !important;
    }

    #inventory-overlay .settings-title {
        font-size: 24px;
    }
}

.coupon-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.coupon-expiry-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
    text-align: right;
}

.coupon-expiry-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8a857d;
    letter-spacing: 0.04em;
}

.coupon-expiry-countdown {
    font-size: 12px;
    font-weight: 800;
    color: #7C4DFF;
    white-space: nowrap;
}

.coupon-list-item.is-expired .coupon-expiry-countdown {
    color: #b34747;
}

.coupon-list-item.is-expired {
    opacity: 0.7;
}

.inventory-empty-item {
    cursor: default;
    justify-content: flex-start;
    opacity: 0.9;
}

    .inventory-empty-item .pf-list-title {
        color: #1f2330;
    }

    .inventory-empty-item .pf-list-subtitle {
        color: #5f6675;
    }
