/* Prontox Variation Selector Swatches Styles */
/* Design aligned with WordPress Block Editor / Global Styles (theme.json) */

.hidden {
    display: none !important;
    visibility: hidden !important;
}

.prontox-wcs-swatches {
    overflow: hidden;
    padding: var(--wp--preset--spacing--20, 0.5rem) 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--30, 0.75rem);
}

.prontox-wcs-swatches .swatch {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--wp--preset--spacing--20, 0.5rem);
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--wp--style--block-custom-border-radius, 8px);
    position: relative;
    opacity: 0.85;
    background: var(--wp--preset--color--surface, #1a1a1a);
    color: var(--wp--preset--color--contrast, #e5e5e5);
    font-family: var(--wp--preset--font-family--outfit, sans-serif);
    font-size: var(--wp--preset--font-size--small, 0.875rem);
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.prontox-wcs-swatches .swatch:hover {
    border-color: rgba(255, 49, 49, 0.5);
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prontox-wcs-swatches .swatch.selected {
    border-color: var(--wp--preset--color--primary, #ff3131);
    color: var(--wp--preset--color--primary, #ff3131);
    opacity: 1;
    box-shadow: 0 4px 10px rgba(255, 49, 49, 0.15);
    background: rgba(255, 49, 49, 0.1);
}

.prontox-wcs-swatches .swatch.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--wp--preset--color--base, #0a0a0a);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Color Swatches Specific Styles */
.prontox-wcs-swatches .swatch-color {
    text-indent: -9999px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%; /* Perfect circles for color circles */
    padding: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.02);
}

.prontox-wcs-swatches .swatch-color:hover {
    transform: scale(1.08);
}

.prontox-wcs-swatches .swatch-color.selected {
    border-color: var(--wp--preset--color--primary, #ff3131);
    box-shadow: 0 0 0 2px var(--wp--preset--color--surface, #1a1a1a), 0 0 0 4px var(--wp--preset--color--primary, #ff3131);
}

.prontox-wcs-swatches .swatch-color.selected::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid var(--wp--preset--color--contrast, #e5e5e5);
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    z-index: 2;
}

/* Label/Size Swatches Specific Styles (Rectangular Pills) */
.prontox-wcs-swatches .swatch-label {
    min-width: unset;
    height: unset;
    padding: 8px 16px;
    border-radius: var(--wp--style--block-custom-border-radius, 4px);
    background-color: var(--wp--preset--color--surface, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--wp--preset--font-family--outfit, sans-serif);
    font-size: var(--wp--preset--font-size--small, 0.875rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--preset--color--contrast, #e5e5e5);
    transition: all 0.2s ease;
}

.prontox-wcs-swatches .swatch-label:hover {
    background-color: var(--wp--preset--color--surface, #1a1a1a);
    border-color: rgba(255, 49, 49, 0.5);
    color: var(--wp--preset--color--primary, #ff3131);
}

.prontox-wcs-swatches .swatch-label.selected {
	background-color: rgba(255, 49, 49, 0.1) !important;
	border-color: var(--wp--preset--color--primary, #ff3131) !important;
	border-width: 1px !important;
	color: var(--wp--preset--color--primary, #ff3131) !important;
	box-shadow: 0 2px 8px rgba(255, 49, 49, 0.12) !important;
}

/* Variations table layout — card container and label typography
   are handled in prontox-plugin-site.css (variations_form .variations).
   Only per-cell baseline adjustments remain here. */
table.variations {
	width: 100%;
	border: none;
	background: transparent;
}

table.variations td,
table.variations th {
	border: none !important;
	background: transparent !important;
	padding: 6px 0 !important;
	vertical-align: middle;
}

/* Image Swatches Specific Styles */
.prontox-wcs-swatches .swatch-image {
    overflow: hidden;
    width: 50px;
    height: 50px;
    min-width: 50px;
    padding: 0;
}

.prontox-wcs-swatches .swatch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prontox-wcs-swatches .swatch-image.selected {
    border-color: var(--wp--preset--color--primary, #f68363);
}

/* Combos / Bundles custom styles */
.combined_product_summary .prontox-wcs-swatches .swatch-image {
    border-radius: var(--wp--style--block-custom-border-radius, 4px);
}

.combined_product_summary .prontox-wcs-swatches .swatch-image.selected,
.combined_product_summary .prontox-wcs-swatches .swatch-image:hover {
    border-color: var(--wp--preset--color--primary, #f68363) !important;
}