/**
 * Jewel Finder - Estilos Exclusivos y Forzados para el Modal de Filtros
 *
 * Estas reglas utilizan alta especificidad (ID) y !important para
 * anular cualquier estilo conflictivo del tema o de otros archivos CSS.
 */

/* --- Contenedor de la Cuadrícula del Modal --- */
#jewel-finder-modal .jewel-finder-categories {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
}

/* --- Diseño de la Tarjeta DENTRO del Modal --- */
#jewel-finder-modal .category-button {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    height: auto !important;
    min-height: 120px !important;
    background-color: #fff !important;
    border: 1px solid var(--card-border-color, #e0e0e0) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
    overflow: hidden !important;
    text-align: center !important;
}

#jewel-finder-modal .category-button:hover,
#jewel-finder-modal .category-button.active {
    border-color: var(--card-active-border-color, #007bff) !important;
    box-shadow: 0 4px 12px var(--card-active-border-color-shadow, rgba(0, 123, 255, 0.2)) !important;
}

#jewel-finder-modal .category-button-image {
    width: 100% !important;
    height: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background-color: #f5f5f5 !important;
}

#jewel-finder-modal .category-button-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

#jewel-finder-modal .category-button-title {
    width: 100% !important;
    padding: 8px 5px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    color: #333 !important;
    font-weight: 500 !important;
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-top: 1px solid #e0e0e0 !important;
}

#jewel-finder-modal .category-button.has-no-image .category-button-image {
    display: none !important;
}
#jewel-finder-modal .category-button.has-no-image .category-button-title {
    border-top: none !important;
}
#jewel-finder-modal .category-button.has-no-image {
    justify-content: center !important;
}

/* --- Columnas Responsivas DENTRO del Modal --- */

@media (min-width: 769px) and (max-width: 1024px) {
    #jewel-finder-modal .jewel-finder-categories {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #jewel-finder-modal .jewel-finder-categories {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 480px) {
    #jewel-finder-modal .jewel-finder-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}