/**
 * Eldorado Game Browser Styles - Using Site Colors
 */

/* Container */
#eldorado-game-browser {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Filters Section */
.eldorado-filters {
    background: rgba(29, 12, 11, 0.8);
    border: 2px solid rgba(222, 166, 77, 0.3);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.eldorado-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: background 0.3s;
    user-select: none;
    gap: 2rem;
}

.eldorado-filters-header:hover {
    background: rgba(42, 24, 22, 0.5);
}

.eldorado-filters-title-wrapper {
    flex: 0 0 auto;
}

.eldorado-filters-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #DEA64D;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Lovato', sans-serif;
}

.eldorado-filters-spacer {
    flex: 1;
}

.eldorado-filters-toggle {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #DEA64D;
}

.eldorado-toggle-arrow {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.eldorado-filters.collapsed .eldorado-toggle-arrow {
    transform: rotate(-90deg);
}

#eldorado-result-count {
    font-size: 0.95rem;
    color: #FFD78F;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.eldorado-filters-content {
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 2rem 2rem 2rem;
}

.eldorado-filters.collapsed .eldorado-filters-content {
    max-height: 0;
    opacity: 0;
    padding: 0 2rem;
    overflow: hidden;
}

/* Search Bar - Full Width */
.eldorado-filter-search {
    margin-bottom: 1.5rem;
}

/* Filter Grid */
.eldorado-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.eldorado-filter-group {
    display: flex;
    flex-direction: column;
}

.eldorado-filter-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #DEA64D;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Lovato', sans-serif;
}

.eldorado-filter-input,
.eldorado-filter-select {
    padding: 0.75rem;
    background: rgba(42, 24, 22, 0.6);
    border: 1px solid rgba(222, 166, 77, 0.3);
    border-radius: 6px;
    color: #FFFAF6;
    font-size: 1rem;
    font-family: 'Lovato', sans-serif;
    transition: all 0.3s;
}

.eldorado-filter-input:focus,
.eldorado-filter-select:focus {
    outline: none;
    border-color: #DEA64D;
    background: rgba(42, 24, 22, 0.9);
    box-shadow: 0 0 0 3px rgba(222, 166, 77, 0.2);
}

.eldorado-filter-input::placeholder {
    color: rgba(255, 250, 246, 0.4);
}

/* Category Filters */
.eldorado-categories-container {
    grid-column: 1 / -1;
}

#eldorado-target-audience,
#eldorado-theme-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.eldorado-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(42, 24, 22, 0.4);
    border: 1px solid rgba(222, 166, 77, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #FFD78F;
    transition: all 0.3s;
    font-weight: 500;
    font-family: 'Lovato', sans-serif;
}

.eldorado-filter-checkbox:hover {
    background: rgba(42, 24, 22, 0.7);
    border-color: #DEA64D;
}

/* Custom styled checkbox */
.eldorado-filter-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(222, 166, 77, 0.5);
    border-radius: 4px;
    background: rgba(42, 24, 22, 0.6);
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: all 0.3s;
}

.eldorado-filter-checkbox input[type="checkbox"]:hover {
    border-color: #DEA64D;
    background: rgba(42, 24, 22, 0.8);
}

.eldorado-filter-checkbox input[type="checkbox"]:checked {
    background: #DEA64D;
    border-color: #DEA64D;
}

.eldorado-filter-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #1D0C0B;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.eldorado-filter-checkbox input[type="checkbox"]:checked + span {
    font-weight: 700;
}

.eldorado-filter-checkbox:has(input:checked) {
    background: rgba(222, 166, 77, 0.2);
    border-color: #DEA64D;
    box-shadow: 0 2px 8px rgba(222, 166, 77, 0.3);
}

/* Filter Actions */
.eldorado-filters-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(222, 166, 77, 0.2);
}

#eldorado-clear-filters {
    padding: 0.75rem 2rem;
    background: rgba(42, 24, 22, 0.6);
    border: 1px solid rgba(222, 166, 77, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #FFD78F;
    font-family: 'Lovato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

#eldorado-clear-filters:hover {
    background: rgba(42, 24, 22, 0.9);
    border-color: #DEA64D;
    color: #DEA64D;
}

/* Games List - Single Column */
#eldorado-games-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Game Card - Horizontal Layout (Image Right) */
.eldorado-game-card {
    background: rgba(29, 12, 11, 0.8);
    border: 2px solid rgba(222, 166, 77, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
}

.eldorado-game-card:hover {
    box-shadow: 0 8px 24px rgba(222, 166, 77, 0.3);
    transform: translateY(-2px);
    border-color: #DEA64D;
}

.eldorado-game-thumbnail {
    width: 200px;
    height: 200px;
    overflow: hidden;
    background: rgba(42, 24, 22, 0.6);
    position: relative;
    flex-shrink: 0;
}

.eldorado-game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eldorado-game-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(222, 166, 77, 0.3);
    gap: 0.75rem;
}

.eldorado-game-placeholder svg {
    width: 60px;
    height: 60px;
}

.eldorado-game-placeholder span {
    font-size: 0.85rem;
    font-style: italic;
}

.eldorado-game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eldorado-game-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #DEA64D;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    font-family: 'Lovato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eldorado-game-subtitle {
    font-size: 1rem;
    color: #FFD78F;
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 300;
}

.eldorado-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    color: #FFFAF6;
}

.eldorado-game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.eldorado-game-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.eldorado-game-meta-rating {
    color: #DEA64D;
    font-weight: 700;
}

.eldorado-game-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.eldorado-category-tag {
    padding: 0.3rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    white-space: nowrap;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    /* Default style (when no custom color is set) */
    background: rgba(42, 24, 22, 0.6);
    color: #FFD78F;
    border: 1px solid rgba(222, 166, 77, 0.3);
}

/* Custom colored categories will override via inline styles */
.eldorado-category-tag[style] {
    font-weight: 600;
    font-family: 'Lovato', sans-serif;
    letter-spacing: 0.3px;
    border-width: 1px;
}

.eldorado-category-tag:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.eldorado-game-description {
    font-size: 0.95rem;
    color: #FFFAF6;
    line-height: 1.6;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(222, 166, 77, 0.2);
    font-weight: 300;
}

/* Pagination */
#eldorado-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(222, 166, 77, 0.2);
}

.eldorado-pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.eldorado-page-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(42, 24, 22, 0.6);
    border: 1px solid rgba(222, 166, 77, 0.3);
    border-radius: 6px;
    color: #FFD78F;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Lovato', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 48px;
}

.eldorado-page-btn:hover:not(.eldorado-page-active) {
    background: rgba(42, 24, 22, 0.9);
    border-color: #DEA64D;
    color: #DEA64D;
}

.eldorado-page-active {
    background: rgba(222, 166, 77, 0.3);
    border-color: #DEA64D;
    color: #DEA64D;
    box-shadow: 0 2px 8px rgba(222, 166, 77, 0.3);
}

.eldorado-page-prev,
.eldorado-page-next {
    padding: 0.75rem 1.5rem;
    font-weight: 700;
}

.eldorado-page-dots {
    color: rgba(222, 166, 77, 0.4);
    padding: 0 0.5rem;
    font-weight: bold;
}

/* Loading & Error States */
.eldorado-loading,
.eldorado-error,
.eldorado-no-results {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.2rem;
    color: #FFD78F;
    background: rgba(29, 12, 11, 0.5);
    border: 2px dashed rgba(222, 166, 77, 0.3);
    border-radius: 12px;
}

.eldorado-error {
    color: #DEA64D;
    border-color: rgba(222, 166, 77, 0.5);
}

.eldorado-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(42, 24, 22, 0.3);
    border-top-color: #DEA64D;
    border-radius: 50%;
    animation: eldorado-spin 0.8s linear infinite;
    margin-left: 1rem;
    vertical-align: middle;
}

@keyframes eldorado-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .eldorado-game-card {
        grid-template-columns: 1fr 180px;
    }
    
    .eldorado-game-thumbnail {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    #eldorado-game-browser {
        padding: 1rem 0.5rem;
    }
    
    .eldorado-filters-header {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }
    
    .eldorado-filters-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .eldorado-filters.collapsed .eldorado-filters-content {
        padding: 0 1.5rem;
    }
    
    .eldorado-filters-title {
        font-size: 1.2rem;
    }
    
    .eldorado-filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .eldorado-game-card {
        grid-template-columns: 1fr 140px;
        gap: 1rem;
    }
    
    .eldorado-game-thumbnail {
        width: 140px;
        height: 140px;
    }
    
    .eldorado-game-card {
        padding: 1rem;
    }
    
    .eldorado-game-title {
        font-size: 1.1rem;
    }
    
    .eldorado-rental-badge {
        padding: 0.15rem 0.7rem 0.05rem;
        font-size: 0.7rem;
    }
    
    #eldorado-target-audience,
    #eldorado-theme-categories {
        gap: 0.5rem;
    }
    
    .eldorado-filter-checkbox {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .eldorado-pagination-controls {
        gap: 0.35rem;
    }
    
    .eldorado-page-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 42px;
    }
}

@media (max-width: 480px) {
    .eldorado-filters-header {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .eldorado-filters-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .eldorado-filters.collapsed .eldorado-filters-content {
        padding: 0 1rem;
    }
    
    #eldorado-result-count {
        font-size: 0.85rem;
        order: 3;
        flex-basis: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .eldorado-filters-spacer {
        display: none;
    }
    
    .eldorado-game-card {
        grid-template-columns: 1fr;
    }
    
    .eldorado-game-thumbnail {
        width: 100%;
        height: 200px;
        order: -1;
    }
    
    .eldorado-game-card {
        padding: 1.25rem;
    }
    
    .eldorado-game-title {
        font-size: 1rem;
    }
    
    .eldorado-rental-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .eldorado-page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 38px;
    }
    
    .eldorado-page-prev,
    .eldorado-page-next {
        padding: 0.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .eldorado-filters,
    #eldorado-pagination {
        display: none;
    }
    
    .eldorado-game-card {
        break-inside: avoid;
    }
}
