/* inventory.css - Styles for the inventory page */

.inventory-container {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.inventory-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.inventory-subtitle {
    text-align: center;
    color: #adb5bd;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Inventory Card Styles */
.inventory-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #2d3748;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.inventory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.inventory-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 48px;
}

.inventory-card-category {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.inventory-card-rarity {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.inventory-card-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.inventory-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.inventory-card-quantity {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid #ffd700;
}

.inventory-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.inventory-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.inventory-card-description {
    font-size: 0.9rem;
    color: #adb5bd;
    margin-bottom: 1rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 4rem;
}

.inventory-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-card-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #ffd700;
}

.inventory-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.currency-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Rarity Colors */
.rarity-common {
    border-color: #6c757d;
}

.rarity-common .inventory-card-rarity {
    color: #6c757d;
}

.rarity-uncommon {
    border-color: #28a745;
}

.rarity-uncommon .inventory-card-rarity {
    color: #28a745;
}

.rarity-rare {
    border-color: #007bff;
}

.rarity-rare .inventory-card-rarity {
    color: #007bff;
}

.rarity-epic {
    border-color: #6f42c1;
}

.rarity-epic .inventory-card-rarity {
    color: #6f42c1;
}

.rarity-legendary {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.rarity-legendary .inventory-card-rarity {
    color: #ffd700;
}

/* Loading and Empty States */
#inventory-loading,
#inventory-empty {
    color: #fff;
}

#inventory-empty a {
    color: #007bff;
    font-weight: 600;
}

#inventory-empty a:hover {
    color: #0056b3;
}

/* Pagination */
#inventory-pagination {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

#inventory-page-info {
    font-size: 1rem;
    color: #adb5bd;
    min-width: 120px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inventory-title {
        font-size: 2rem;
    }

    .inventory-subtitle {
        font-size: 1rem;
    }

    .inventory-card-title {
        font-size: 1rem;
        min-height: 2rem;
    }

    .inventory-card-description {
        font-size: 0.85rem;
    }

    .inventory-container {
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .inventory-title {
        font-size: 1.75rem;
    }

    .inventory-card-date {
        font-size: 0.75rem;
    }

    .inventory-card-price {
        font-size: 0.9rem;
    }
}

/* Progress Panels */
.inventory-panel {
    background: rgba(24, 15, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(5, 2, 12, 0.45);
}

.inventory-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.inventory-panel__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: #f5f3ff;
}

.inventory-panel__badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.inventory-panel__badge.is-success {
    background: rgba(25, 135, 84, 0.9);
}

.inventory-panel__badge.is-warning {
    background: rgba(255, 193, 7, 0.9);
    color: #1a102c;
}

.inventory-panel__badge.is-muted {
    background: rgba(108, 117, 125, 0.6);
}

.inventory-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0 0.75rem;
}

.inventory-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #7a5cff, #ff6f91);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.inventory-progress__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.inventory-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.5rem;
}

.inventory-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.7rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #e9e7f7;
    font-size: 0.9rem;
}

.inventory-list-item__left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.inventory-list-item__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
}

.inventory-list-item__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inventory-list-item__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-list-item__status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.inventory-list-item__status.is-unlocked {
    background: rgba(25, 135, 84, 0.85);
}
