/* =============================================================================
   TamilMP Official ox_inventory Stylesheet - Exact Translucent FiveM ox_inventory Layout
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    touch-action: none !important;
}

html, body {
    width: 100vw;
    height: 100vh;
    background: transparent !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    overflow: hidden;
}

/* Fullscreen Overlay Container */
.ox-inventory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: transparent !important;
    z-index: 50000;
}

/* Main Layout Wrapper */
.ox-inventory-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    font-family: 'Outfit', sans-serif;
}

/* 5x5 Grid Pane */
.inventory-pane {
    width: 378px; /* 5 * 74px + 4 * 2px = 378px */
    display: flex;
    flex-direction: column;
}

/* Header Text (Player Name & Weight) */
.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 1px 3px 1px;
}

.header-title {
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.header-weight {
    font-size: 12px;
    font-weight: 400;
    color: #e2e8f0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Weight Progress Bar */
.weight-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1px;
    margin-bottom: 4px;
    overflow: hidden;
}

.weight-bar-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 1px;
    transition: width 0.3s ease, background 0.3s ease;
}

.weight-bar-fill.heavy {
    background: #eab308;
}

.weight-bar-fill.overweight {
    background: #ef4444;
}

/* 5x5 Grid Container - Crisp, Clean 2px Gap */
.grid-5x5 {
    display: grid;
    grid-template-columns: repeat(5, 74px);
    grid-template-rows: repeat(5, 74px);
    gap: 2px;
}

/* Individual Slot Box - High Transparency, Glass Appearance */
.ox-slot {
    position: relative;
    width: 74px;
    height: 74px;
    background: rgba(18, 22, 28, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.12s ease, border-color 0.12s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.ox-slot:hover {
    background: rgba(30, 36, 48, 0.45);
    border-color: rgba(255, 255, 255, 0.28);
}

.ox-slot.selected {
    background: rgba(38, 46, 62, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.ox-slot.drag-over {
    background: rgba(45, 56, 78, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

/* Top Slot Header (Index Badge & Count/Weight Meta) */
.slot-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    pointer-events: none;
    z-index: 2;
}

/* Hotbar White Square Tag with Black Digit */
.slot-index-badge {
    background: #ffffff;
    color: #000000;
    font-size: 9.5px;
    font-weight: 600;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius: 2px;
    line-height: 1;
}

/* Slot Metadata (e.g. "390x" or "190g 1x") */
.slot-meta {
    font-size: 9.5px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-left: auto;
    padding: 2px 4px 0 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
    letter-spacing: 0.2px;
}

/* Item Icon */
.item-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
    margin-top: -2px;
    z-index: 1;
}

/* Bottom Dark Strip for Item Name */
.slot-name-bar {
    width: 100%;
    background: rgba(10, 12, 16, 0.90);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 8.5px;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    padding: 2px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 2;
}

/* Center Controls Column */
.center-actions {
    width: 96px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 56px;
}

/* Quantity Box */
.quantity-box {
    width: 100%;
    height: 32px;
    background: rgba(18, 22, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    cursor: pointer;
    transition: all 0.12s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.quantity-box:hover {
    background: rgba(28, 34, 46, 0.75);
    border-color: rgba(255, 255, 255, 0.3);
}

.qty-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Buttons (USE, GIVE, DROP, CLOSE) */
.ox-action-btn {
    width: 100%;
    height: 32px;
    background: rgba(18, 20, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    color: #f1f5f9;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

.ox-action-btn:hover {
    background: rgba(35, 40, 52, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.ox-action-btn:active {
    transform: translateY(1px);
}

.ox-action-btn.drag-over {
    background: rgba(50, 60, 80, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Quantity Modal Dialog */
.ox-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90000;
    font-family: 'Outfit', sans-serif;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ox-modal-dialog {
    width: 300px;
    background: rgba(15, 17, 24, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    animation: popIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
    font-size: 11.5px;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: 0.6px;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.1s ease;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-item-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 10px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-item-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.modal-item-name {
    font-size: 12px;
    font-weight: 400;
    color: #e2e8f0;
}

.modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-step-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
}

.modal-step-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.modal-qty-input {
    flex: 1;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.modal-qty-input::-webkit-outer-spin-button,
.modal-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-quick-presets {
    display: flex;
    gap: 4px;
}

.preset-btn {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: 'Outfit', sans-serif;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.modal-footer {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-btn {
    flex: 1;
    height: 30px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: 'Outfit', sans-serif;
    border: none;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-confirm {
    background: #334155;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-confirm:hover {
    background: #475569;
}

/* Drag Ghost Floating Preview */
.ox-drag-ghost {
    position: fixed;
    width: 74px;
    height: 74px;
    background: rgba(18, 20, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    pointer-events: none !important;
    z-index: 999999;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.ox-drag-ghost .ghost-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}

.ox-drag-ghost .ghost-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 9.5px;
    font-weight: 500;
    color: #ffffff;
    background: rgba(10, 12, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 4px;
    border-radius: 2px;
}

/* =============================================================================
   Item Notification Popup Card (Exact Mini Box on Use / Get / Remove)
   ============================================================================= */

.item-notify-container {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    pointer-events: none;
    z-index: 60000;
    font-family: 'Outfit', sans-serif;
}

.item-notify-card {
    width: 80px;
    height: 84px;
    background: rgba(18, 22, 28, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: itemNotifySlide 0.22s cubic-bezier(0.16, 1, 0.3, 1), itemNotifyFadeOut 0.3s ease 2.2s forwards;
}

@keyframes itemNotifySlide {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes itemNotifyFadeOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.item-notify-header {
    width: 100%;
    background: rgba(10, 12, 16, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 8.5px;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    padding: 2.5px 2px;
    letter-spacing: 0.4px;
}

.item-notify-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
    margin-top: -1px;
}

.item-notify-footer {
    width: 100%;
    background: rgba(10, 12, 16, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 8.5px;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    padding: 2.5px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.4px;
}
