/**
 * TheZ Auto-Linked Variations - Public Styles
 *
 * @package TheZ_ALV
 * @since 1.0.0
 */

/* Variations Container */
.thez-alv-variations {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Single Attribute Block */
.thez-alv-attribute {
    margin-bottom: 15px;
}

.thez-alv-attribute:last-child {
    margin-bottom: 0;
}

/* Attribute Label */
.thez-alv-attribute-label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Terms Container */
.thez-alv-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Single Term */
.thez-alv-term {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Button Style Terms */
.thez-alv-term:not(.thez-alv-term-image) {
    min-width: 40px;
    min-height: 40px;
}

.thez-alv-term:not(.thez-alv-term-image) a,
.thez-alv-term:not(.thez-alv-term-image) span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 40px;
    box-sizing: border-box;
}

.thez-alv-term:not(.thez-alv-term-image) a:hover {
    border-color: #333;
    background: #f8f8f8;
    color: #000;
}

.thez-alv-term:not(.thez-alv-term-image).active span {
    border-color: #333;
    background: #333;
    color: #fff;
    cursor: default;
}

/* Image Style Terms */
.thez-alv-term-image {
    width: 60px;
    height: 60px;
}

.thez-alv-term-image a,
.thez-alv-term-image span {
    display: block;
    width: 100%;
    height: 100%;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.thez-alv-term-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thez-alv-term-image a:hover {
    border-color: #333;
    transform: scale(1.05);
}

.thez-alv-term-image.active span {
    border-color: #333;
    box-shadow: 0 0 0 2px #333;
}

/* Disabled/Empty Terms */
.thez-alv-term.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.thez-alv-term.disabled span {
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 768px) {
    .thez-alv-terms {
        gap: 6px;
    }
    
    .thez-alv-term:not(.thez-alv-term-image) a,
    .thez-alv-term:not(.thez-alv-term-image) span {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 36px;
    }
    
    .thez-alv-term-image {
        width: 50px;
        height: 50px;
    }
}
