/* ========================================================================== 
   NightVenture — Equipment Popup UI
   Popup équipement en item cards icônes only + détail type inventaire.
   ========================================================================== */

body.nveq-modal-open {
    overflow: hidden;
}

.nveq-modal {
    position: fixed;
    inset: 0;
    z-index: 1180;
    display: grid;
    place-items: center;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nveq-dialog {
    width: min(760px, 100%);
    max-height: min(88dvh, 760px);
    overflow: auto;
    padding: clamp(14px, 3vw, 22px);
    border: 1px solid rgba(245, 211, 122, 0.26);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(245, 211, 122, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(25, 20, 34, 0.98), rgba(10, 11, 16, 0.98));
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.56);
}

.nveq-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.nveq-header h2 {
    margin: 0;
    line-height: 1.1;
}

.nveq-kicker {
    margin: 0 0 4px;
    color: var(--gold-bright, #ffd66b);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.nveq-close {
    flex: 0 0 34px;
}

.nveq-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(76px, 1fr));
    gap: 12px;
}

.nveq-slot {
    min-width: 0;
    display: grid;
    gap: 6px;
    justify-items: center;
}

.nveq-slot .nveq-item,
.nveq-empty-card {
    width: 100%;
    max-width: 96px;
    aspect-ratio: 1 / 1;
    min-height: 74px;
    border-radius: 15px !important;
}

.nveq-slot .nveq-item {
    touch-action: manipulation !important;
}

.nveq-item--selected {
    outline: 2px solid rgba(245, 211, 122, 0.82) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 18px rgba(245, 211, 122, 0.16) !important;
}

.nveq-empty-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.13);
    background: rgba(0, 0, 0, 0.23);
    color: rgba(245, 211, 122, 0.42);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: center;
}

.nveq-slot-label {
    width: 100%;
    max-width: 104px;
    color: var(--text-muted, #c7bdad);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nveq-details-popup {
    z-index: 1220 !important;
}

.nveq-details-popup .nvi-details__actions button {
    border-color: rgba(245, 211, 122, 0.52) !important;
    background: rgba(128, 91, 39, 0.68) !important;
    color: #fff3cf !important;
}

@media (max-width: 700px) {
    .nveq-modal {
        align-items: start;
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .nveq-dialog {
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
    }

    .nveq-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .nveq-slot .nveq-item,
    .nveq-empty-card {
        min-height: 58px;
        border-radius: 12px !important;
    }

    .nveq-slot-label {
        font-size: 0.64rem;
    }
}

@media (max-width: 430px) {
    .nveq-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
