/**
 * Nikolantos Product Swatches - Frontend Styles
 */

.nikolantos-product-swatches {
    margin: 20px 0 15px 0;
    padding: 0;
}

.swatches-title {
    font-size: 14px;
    font-weight: 500;
    color: #646464;
    margin: 0 0 12px 0;
    text-transform: none;
    letter-spacing: normal;
}

.swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.swatch-item {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #dcdcdc;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #f8f8f8;
}

.swatch-item:hover {
    transform: scale(1.08);
    border-color: #999999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.swatch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swatch-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #333333;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.swatch-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #333333;
}

.swatch-item:hover .swatch-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -36px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .nikolantos-product-swatches {
        margin: 15px 0 12px 0;
    }
    
    .swatches-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .swatch-item {
        width: 36px;
        height: 36px;
    }
    
    .swatches-container {
        gap: 10px;
    }
}
