@import url('Kingdoms.css');

/* Custom styles for GemsCalculator */
.info-section {
    text-align: center;
    display: block;
    margin-bottom: 20px;
}


.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    padding: 8px 15px;
    color: #555;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    background-color: #2d71a1;
    color: white;
    border-color: #2d71a1;
}

.tab-content {
    padding: 20px;
    background: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.item-card {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.item-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.item-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    object-fit: contain;
    background-size: cover;
    background-position: center;
}

.item-image.loading {
    background: #eee;
    animation: pulse 1.5s infinite;
}

.item-image.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.item-image.lazy.loaded {
    opacity: 1;
}

/* Placeholder style while loading */
.item-image.lazy:not(.loaded) {
    background: #f0f0f0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
    }
    
    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}