/*======================================
  INVENTORY VIEW SPECIFIC STYLES
======================================*/

/* --- Main Layout: Deck Builder + Collection --- */
.inventory-layout {
    display: flex;
    gap: 2rem;
    /* Height is calculated based on viewport height minus the navbar height */
    height: calc(100vh - 4rem);
}

.deck-builder-section {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.inventory-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* This is key for the child collection view to scroll properly */
}

/* --- Favorites Section --- */
.favorites-section {
    flex-shrink: 0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #374151;
    /* border-gray-700 */
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.favorite-slot {
    aspect-ratio: 2.5 / 3.5;
    background-color: rgba(55, 65, 81, 0.5);
    /* bg-gray-700 with opacity */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    /* text-gray-500 */
    border: 2px dashed #4b5563;
    /* border-gray-600 */
    overflow: hidden;
    position: relative;
}

.favorites-grid .card-component {
    /* Cards in the favorite grid are slightly smaller */
    transform: scale(0.9);
    transition: transform 0.2s ease-in-out;
    margin: -12px -8px;
    /* Negative margin to compensate for scale */
}

.favorites-grid .card-component:hover {
    transform: scale(0.95);
}


/* --- Deck Builder Controls & Hotbar --- */
.deck-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.deck-controls .form-input {
    flex-grow: 1;
}

.deck-controls .btn {
    flex-shrink: 0;
    width: auto;
    padding: 0.5rem 1rem;
}

.deck-hotbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.5rem;
    min-height: 150px;
    /* Give it a minimum height */
}

.deck-slot {
    aspect-ratio: 2.5 / 3.5;
    background-color: #374151;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #6b7280;
    overflow: hidden;
    transition: all 0.2s;
}

.deck-hotbar.editing .deck-slot {
    border: 2px dashed #4f46e5;
    cursor: copy;
}

.deck-hotbar.editing .deck-slot:hover {
    background-color: #4338ca;
    border-color: #818cf8;
}

.deck-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Make sure the slot receives the drop event */
}


/* --- Context Menu for Deck Building --- */
.card-context-menu {
    position: fixed;
    z-index: 1000;
    width: 200px;
    background-color: #1f2937;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.card-context-menu .menu-item {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #d1d5db;
}

.card-context-menu .menu-item:hover {
    background-color: #4f46e5;
    color: white;
}