/**
 * Product Color Swatches — Archive & Single
 *
 * @package velour-pro-addons
 */


/* ─────────────────────────────────────────────
   Archive Product Card — Color Badges
   ───────────────────────────────────────────── */

.vnpa-color-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.vnpa-color-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.vnpa-color-badge:hover {
    transform: scale(1.25);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
    z-index: 2;
}

/* White / light color badges need a visible border */
.vnpa-color-badge--light {
    border-color: rgba(0, 0, 0, 0.22);
}

.vnpa-color-badge:hover::after {
    content: attr(data-color-name);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    line-height: 1.3;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.vnpa-color-badge:hover::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid transparent;
    border-top-color: #1a1a1a;
    z-index: 10;
}


/* ─────────────────────────────────────────────
   Single Product — Color Swatch Buttons
   (replaces text buttons for color attributes)
   ───────────────────────────────────────────── */

.product-page .option-group .color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.product-page .option-group .color-swatch-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    outline: none;
    padding: 0;
    background: none;
    flex-shrink: 0;
}

.product-page .option-group .color-swatch-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.product-page .option-group .color-swatch-btn.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.15);
}

.product-page .option-group .color-swatch-btn.oos {
    opacity: 0.35;
    cursor: not-allowed;
    position: relative;
}

.product-page .option-group .color-swatch-btn.oos::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 1.5px;
    background: #dc2626;
    transform: rotate(-45deg);
}

.product-page .option-group .color-swatch-btn-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

.product-page .option-group .color-swatch-btn--light .color-swatch-btn-inner {
    border-color: rgba(0, 0, 0, 0.18);
}

/* Color swatch tooltip on single product */
.product-page .option-group .color-swatch-btn .vnpa-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.product-page .option-group .color-swatch-btn .vnpa-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.product-page .option-group .color-swatch-btn:hover .vnpa-swatch-tooltip {
    opacity: 1;
}


/* ─────────────────────────────────────────────
   Single Product — Size Swatch Buttons (circles)
   ───────────────────────────────────────────── */

.product-page .option-group .size-swatch-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.product-page .option-group .size-swatch-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    outline: none;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: #555;
    letter-spacing: 0.02em;
}

.product-page .option-group .size-swatch-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-page .option-group .size-swatch-btn.active {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.product-page .option-group .size-swatch-btn.oos {
    opacity: 0.35;
    cursor: not-allowed;
    position: relative;
}

.product-page .option-group .size-swatch-btn.oos::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -1px;
    right: -1px;
    height: 1.5px;
    background: #dc2626;
    transform: rotate(-45deg);
}

/* Size swatch tooltip */
.product-page .option-group .size-swatch-btn .vnpa-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    font-weight: 400;
}

.product-page .option-group .size-swatch-btn .vnpa-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.product-page .option-group .size-swatch-btn:hover .vnpa-swatch-tooltip {
    opacity: 1;
}


/* ─────────────────────────────────────────────
   Product Slider Shortcode Swatches
   ───────────────────────────────────────────── */

.product-attributes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding: 0 12px;
}

.attribute-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.swatches-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.swatch-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.swatch.text-swatch {
    width: auto;
    height: auto;
    min-width: 24px;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1.2;
    color: #666;
    background: #f5f5f5;
    border-color: #ddd;
    text-align: center;
}

.swatch.text-swatch:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}
