/*
Plugin Name: Grafiart WooCommerce Catalog Mode
Description: Styles for catalog mode and custom product variation swatches.
*/

/* Custom Swatch Styles */
.custom-swatches-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 15px;
}
.custom-swatch-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 84px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.custom-swatch-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.custom-swatch-item.active {
    border-color: #0f172a;
    border-width: 2px;
    padding: 5px; /* Offset the 2px border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.custom-swatch-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
    background-color: #f8fafc;
}
.custom-swatch-img-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    background-color: #e2e8f0;
    margin-bottom: 6px;
}
.custom-swatch-label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Text-only variation styling when all images are identical or missing */
.custom-swatches-container.text-only .custom-swatch-item {
    width: auto;
    min-width: 72px;
    height: 38px;
    padding: 0 16px;
    border-radius: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.custom-swatches-container.text-only .custom-swatch-item.active {
    padding: 0 15px; /* Offset the 2px border */
    border-width: 2px;
}
.custom-swatches-container.text-only .custom-swatch-label {
    font-size: 12px;
    margin: 0;
    line-height: 1;
}
