/* NightVenture — UI marchand
   Ce fichier ne contient que les spécificités marchand.
   Les styles partagés inventaire/marchand sont dans Inventory_UI.css et Inventory_Visual_Repair.css. */

.nvm-mode-hint {
    display: none !important;
}

/* Onglets acheter / vendre */
.nvm-tabs {
    order: 4 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 8px !important;
    width: 100%;
}

.nvm-tab {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.22);
    text-align: center;
}

.nvm-tab.is-active {
    outline: 2px solid var(--gold, #f5d37a);
    outline-offset: -2px;
}

/* Grille / sélection marchand */
.nvm-panel-active {
    min-width: 0;
}

.nvi-layout--merchant .nvi-grid--merchant {
    width: 100%;
}

.nvi-layout--merchant .nvimp-item--popup-open {
    outline: 2px solid var(--gold, #f5d37a);
    outline-offset: -2px;
}

.nvi-layout--merchant .nvi-slot--locked {
    box-shadow: inset 0 0 0 1px rgba(245, 211, 122, 0.28);
}

/* Popup achat / vente */
.nvi-layout--merchant > .nvi-details.nvimp-details-popup.nvipr-popup {
    position: absolute !important;
    z-index: 1200 !important;
    top: 0 !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: min(430px, calc(100% - 24px)) !important;
    max-height: min(72vh, calc(100vh - 170px)) !important;
    overflow: auto !important;
}

.nvm-trade-popup {
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.nvm-trade-popup .nvi-trade-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
}

.nvm-trade-popup .nvi-trade-box strong,
.nvm-trade-popup .nvi-trade-box p {
    width: 100%;
}

.nvm-trade-popup .nvi-trade-box p {
    margin: 4px 0;
}

.nvm-trade-popup .nvi-quantity {
    display: grid !important;
    grid-template-columns: 28px 68px 28px auto;
    gap: 6px;
    align-items: center;
    width: 100%;
}

.nvm-trade-popup .nvi-quantity input {
    width: 68px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    text-align: center;
    box-sizing: border-box;
}

.nvm-trade-popup .nvi-quantity button {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 0.86rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.nvm-trade-popup .nvi-quantity button:last-child {
    width: auto !important;
    min-width: 48px !important;
    max-width: none !important;
    padding: 0 8px !important;
    font-size: 0.66rem !important;
}

.nvm-trade-popup .nvi-lock-toggle {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nvm-trade-popup button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .nvi-layout--merchant > .nvi-details.nvimp-details-popup.nvipr-popup {
        top: 0 !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        width: min(430px, calc(100% - 20px)) !important;
        max-height: min(72vh, calc(100vh - 150px)) !important;
    }

    .nvm-trade-popup .nvi-quantity {
        grid-template-columns: 28px 64px 28px auto;
    }

    .nvm-trade-popup .nvi-quantity input {
        width: 64px !important;
    }
}
