/* ========================================
   MU Online - Item Slots & Inventory System
   Dashboard Pro - Optimized for theme support
   ======================================== */

/* ========================================
   Item Tooltip Render Container
   ======================================== */
#itemTooltipRender {
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 9999;
}

#itemTooltipRender.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ========================================
   Equipment Item Slots
   ======================================== */
.item-slot {
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    background: var(--card);
    transition: all 0.2s ease;
    min-height: 60px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.item-slot:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}

.item-view {
    cursor: pointer;
    border-width: 2px;
    border-color: var(--primary);
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.item-empty {
    color: var(--muted-foreground);
    font-size: 0.65rem;
    text-align: center;
    user-select: none;
    opacity: 0.5;
}

.item-bonus {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: #10B981;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.item-bonus-positive {
    background-color: #10B981;
}

/* ========================================
   Inventory Grid - MU Online Style (8x8)
   Fine lines and optimized spacing
   ======================================== */
.inventory-grid-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-height: 300px;
    overflow: hidden;
}

.inventory-grid-base {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 1px;
    background: var(--border);
    padding: 2px;
}

.inventory-cell {
    background: var(--card);
    opacity: 0.7;
}

.inventory-items {
    position: absolute;
    inset: 2px;
    pointer-events: none;
}

.inventory-item {
    position: absolute;
    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.inventory-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    z-index: 100 !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent);
}

.inventory-item-inner {
    position: absolute;
    inset: 0;
    display: grid;
    pointer-events: none;
    opacity: 0.1;
}

.inventory-item-cell {
    border: 1px solid var(--primary);
}

/* ========================================
   Expansion Grid - 4x8
   ======================================== */
.expansion-grid-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/1;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-height: 150px;
    overflow: hidden;
}

.expansion-grid-base {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    padding: 2px;
}

/* ========================================
   Equipment Section
   ======================================== */
.equipment-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-title {
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.equipment-title-icon {
    margin-right: 0.5rem;
    color: #3F83F8;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
}

.accessory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* ========================================
   Inventory Section
   ======================================== */
.inventory-section {
    margin-top: 0.75rem;
}

.inventory-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
