/**
 * CarHubList Companion - Elementor Widgets Styles
 * Styles for custom Elementor widgets
 */

/* CHL Make Loop Widget - Grid Layout */
.chl-make-loop-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Layout Columns - Grid verticale */
.chl-make-loop-grid.layout-columns {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
}

/* Layout Rows - Grid orizzontale */
.chl-make-loop-grid.layout-rows {
    grid-template-rows: repeat(2, 1fr);
    grid-auto-columns: auto;
    grid-auto-flow: column;
    overflow-x: auto;
}

/* CHL Make Loop Widget - Flexbox Layout */
.chl-make-loop-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.chl-make-loop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    transition: all 0.3s ease;
}

.chl-make-loop-item a {
    text-decoration: none;
    display: inline-block;
}

.chl-make-loop-item img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* SVG Color Support - Mask Method (like Elementor icons) */
.chl-make-loop-item.svg-colored {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Keep image for sizing but make transparent */
.chl-make-loop-item.svg-colored img {
    visibility: hidden;
    max-width: 100%;
    height: auto;
}

/* Create colored overlay using mask */
.chl-make-loop-item.svg-colored::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    -webkit-mask: var(--svg-mask-url) center / contain no-repeat;
    mask: var(--svg-mask-url) center / contain no-repeat;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

/* SVG Hover color - will be overridden by Elementor selectors */
.chl-make-loop-item.svg-colored:hover::after {
    background-color: #000000;
}

.chl-make-name {
    margin-top: 10px;
    font-weight: 500;
    width: 100%;
}

.chl-make-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.chl-make-name a:hover {
    text-decoration: underline;
}

.chl-make-loop-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chl-make-loop-grid.layout-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .chl-make-loop-grid.layout-rows {
        grid-template-rows: repeat(2, 1fr);
        gap: 15px;
    }
    
    .chl-make-loop-flex {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .chl-make-loop-grid.layout-columns,
    .chl-make-loop-grid.layout-rows,
    .chl-make-loop-flex {
        gap: 10px;
    }
}
