/* Frontend Variation Image Styles */

/* CSS Variables for customizable colors */
:root {
    /* Use relative colors that work with any theme */
    --wcvip-active-border-color: rgba(0, 0, 0, 0.6);
    --wcvip-active-border-width: 3px;
    
    /* Subtle hover - darker shade */
    --wcvip-hover-border-color: rgba(0, 0, 0, 0.4);
    
    /* Very subtle backgrounds */
    --wcvip-hover-background: rgba(0, 0, 0, 0.05);
    --wcvip-active-background: rgba(0, 0, 0, 0.1);
    --wcvip-active-text-color: currentColor;
    
    /* Defaults that blend with theme */
    --wcvip-default-border-color: rgba(0, 0, 0, 0.2);
    --wcvip-default-background: rgba(255, 255, 255, 0.8);
    --wcvip-default-text-color: currentColor;
    --wcvip-unavailable-opacity: 0.5;
    
    /* Tooltip variables */
    --wcvip-tooltip-bg: rgba(0, 0, 0, 0.85);
    --wcvip-tooltip-text: #ffffff;
    --wcvip-tooltip-padding: 8px 12px;
    --wcvip-tooltip-border-radius: 4px;
    --wcvip-tooltip-font-size: 12px;
    --wcvip-tooltip-line-height: 1.4;
    --wcvip-tooltip-max-width: 200px;
    --wcvip-tooltip-arrow-size: 5px;
    --wcvip-tooltip-z-index: 10000;
    --wcvip-tooltip-delay: 0.2s;
    --wcvip-tooltip-distance: 6px;
}

.woocommerce-product-gallery {
    position: relative;
}

.wcvip-gallery {
    margin-bottom: 20px;
}

.wcvip-main-image {
    width: 100%;
    margin-bottom: 15px;
}

    .wcvip-main-image img {
        width: 100%;
        height: auto;
        display: block;
    }

/* Thumbnail navigation */
.wcvip-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wcvip-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid var(--wcvip-default-border-color);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .wcvip-thumbnail:hover,
    .wcvip-thumbnail.active {
        border-color: var(--wcvip-active-border-color);
    }

    .wcvip-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Preview Banner Styles - Modern Design */
.wcvip-preview-banner {
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    border-left: 4px solid #1d2327;
    padding: 18px 24px;
    margin: 0 0 24px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Enhanced floating effect when scrolled */
.wcvip-preview-banner.is-scrolled {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    background: rgba(240, 240, 241, 0.98);
}

/* Account for WordPress admin bar */
.admin-bar .wcvip-preview-banner {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .wcvip-preview-banner {
        top: 46px;
    }
}

.wcvip-preview-banner:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wcvip-preview-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wcvip-preview-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    line-height: 1.6;
}

.wcvip-preview-banner-info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #646970;
}

.wcvip-preview-banner-info-item strong {
    color: #1d2327;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wcvip-preview-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 16px;
    line-height: 1;
    color: #1d2327;
}

.wcvip-preview-banner-separator {
    color: #dcdcde;
    margin: 0 2px;
    font-weight: 300;
}

.wcvip-preview-banner-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f0b849;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    background: #fef3c7;
    border-radius: 12px;
}

.wcvip-preview-banner-note::before {
    content: "⚠";
    font-size: 14px;
}

.wcvip-preview-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.wcvip-preview-banner-actions .button {
    margin: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-weight: 500;
    border-radius: 6px;
    padding: 10px 20px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.wcvip-preview-banner-actions .button-primary {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.wcvip-preview-banner-actions .button-primary:hover {
    background: #1d2327;
    border-color: #1d2327;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.wcvip-preview-banner-actions .button-primary:active {
    transform: translateY(0);
}

.wcvip-preview-banner-actions .button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wcvip-preview-banner-actions .button-primary.saving {
    position: relative;
    color: transparent;
}

.wcvip-preview-banner-actions .button-primary.saving::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wcvip-spin 0.6s linear infinite;
}

.wcvip-preview-banner-actions .button-primary.saved {
    background: #00a32a;
    border-color: #00a32a;
}

.wcvip-preview-banner-actions .button-primary.saved::before {
    content: "✓";
    margin-right: 6px;
}

.wcvip-preview-close {
    background: transparent;
    border: none;
    color: #646970;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.wcvip-preview-close:hover {
    background: #f0f0f1;
    color: #1d2327;
    transform: translateY(-1px);
}

.wcvip-preview-close:active {
    transform: translateY(0);
}

.wcvip-close-icon {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    display: block;
}

@keyframes wcvip-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Success state animation */
.wcvip-preview-banner.saved {
    border-left-color: #00a32a;
    background: #f0fdf4;
}

.wcvip-preview-banner.saved .wcvip-preview-banner-note {
    background: #d1fae5;
    color: #008a20;
}

.wcvip-preview-banner.saved .wcvip-preview-banner-note::before {
    content: "✓";
}

@media (max-width: 782px) {
    .wcvip-preview-banner {
        padding: 16px 20px;
        border-radius: 6px;
    }

    .wcvip-preview-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .wcvip-preview-banner-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wcvip-preview-banner-info-item {
        width: 100%;
    }

    .wcvip-preview-banner-separator {
        display: none;
    }

    .wcvip-preview-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .wcvip-preview-banner-actions .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wcvip-preview-banner {
        padding: 14px 16px;
        margin: 0 0 16px 0;
    }

    .wcvip-preview-banner-info {
        font-size: 13px;
    }

    .wcvip-preview-banner-actions .button {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* Fade transition for image changes */
.wcvip-fade {
    animation: wcvipFadeIn 0.3s ease;
}

@keyframes wcvipFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Circular Thumbnails (Pro) */
.wcvip-circular-thumbnails-wrapper {
    margin: 20px 0;
    position: relative;
    overflow: visible;
}

.wcvip-circular-thumbnails-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-top: 12px;
    margin-bottom: 5px;
    line-height: 1.5;
}

.wcvip-circular-thumbnails-label .wcvip-label-attribute {
    color: var(--wcvip-default-text-color);
    opacity: 0.7;
}

.wcvip-circular-thumbnails-label .wcvip-label-value {
    color: var(--wcvip-active-border-color);
    font-weight: 600;
}

.wcvip-circular-thumbnails {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.wcvip-circular-thumb {
    /* Reset button styles */
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--wcvip-default-border-color);
    padding: 0;
    margin: 0;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.wcvip-circular-thumb:hover:not([data-unavailable="true"]) {
    border-color: var(--wcvip-hover-border-color);
}

.wcvip-circular-thumb.active {
    border-color: var(--wcvip-active-border-color);
    border-width: 4px;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.wcvip-circular-thumb[data-unavailable="true"] {
    opacity: var(--wcvip-unavailable-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

/* Focus State - Accessibility */
.wcvip-circular-thumb:focus-visible {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

.wcvip-circular-thumb:focus:not(:focus-visible) {
    outline: none;
}

.wcvip-circular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image loading placeholder for circular thumbnails */
.wcvip-circular-thumb .wcvip-image-loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wcvip-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 50%;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wcvip-circular-thumb {
    position: relative;
}

.wcvip-circular-thumb .wcvip-variation-image {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wcvip-circular-thumb .wcvip-variation-image.loaded {
    opacity: 1;
}

/* Default group images should be visible immediately */
.wcvip-default-group .wcvip-variation-image {
    opacity: 1;
}

.wcvip-default-group .wcvip-image-loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

.wcvip-circular-thumb .wcvip-variation-image.loaded ~ .wcvip-image-loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

@keyframes wcvip-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Secondary label for multi-attribute variations - Center overlay badge */
.wcvip-circular-thumb .wcvip-secondary-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcvip-circular-thumb:hover .wcvip-secondary-label {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.wcvip-circular-thumb.active .wcvip-secondary-label {
    background: var(--wcvip-active-border-color, #2271b1);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%) scale(1.15);
}

/* Square Thumbnails (Free & Pro) */
.wcvip-square-thumbnails-wrapper {
    margin: 20px 0;
    position: relative;
    overflow: visible;
}

.wcvip-square-thumbnails-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-bottom: 12px;
    line-height: 1.5;
}

.wcvip-square-thumbnails-label .wcvip-label-attribute {
    color: var(--wcvip-default-text-color);
    opacity: 0.7;
}

.wcvip-square-thumbnails-label .wcvip-label-value {
    color: var(--wcvip-active-border-color);
    font-weight: 600;
}

.wcvip-selected-variation-global {
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-bottom: 5px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border-left: 3px solid var(--wcvip-active-border-color);
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Button Style - Make label full width and appear above buttons */
.wcvip-button-style > .wcvip-selected-variation-global {
    width: 100%;
    flex-basis: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border-left: 3px solid var(--wcvip-active-border-color);
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Square Thumbnails - Make label full width and appear above thumbnails */
.wcvip-square-thumbnails-wrapper > .wcvip-selected-variation-global {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border-left: 3px solid var(--wcvip-active-border-color);
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Circular Thumbnails - Make label full width and appear above thumbnails */
.wcvip-circular-thumbnails-wrapper > .wcvip-selected-variation-global {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border-left: 3px solid var(--wcvip-active-border-color);
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wcvip-selected-variation-global .wcvip-selected-label {
    font-weight: 500;
    margin-right: 8px;
    opacity: 0.8;
}

.wcvip-selected-variation-global .wcvip-selected-value {
    font-weight: 600;
    color: var(--wcvip-active-border-color);
}

/* Color Swatches - Make label appear on its own line above swatches */
.wcvip-color-swatches > .wcvip-selected-variation-global {
    width: 100%;
    display: block !important;
    margin-bottom: 16px;
    clear: both;
}

/* Outer container for color swatches - display label and inner container in column */
.wcvip-color-swatches-wrapper + .wcvip-color-swatches,
.wcvip-variation-selector > .wcvip-color-swatches {
    display: flex;
    flex-direction: column;
}

/* Inner color swatches container (with buttons) - keep flex for buttons */
.wcvip-color-swatches .wcvip-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wcvip-cs-gap);
    margin: 0;
}

.wcvip-square-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wcvip-square-thumb {
    /* Reset button styles */
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.wcvip-square-thumb:hover:not([data-unavailable="true"]) {
    opacity: 0.8;
}

.wcvip-square-thumb.active {
    opacity: 1;
}

.wcvip-square-thumb[data-unavailable="true"] {
    opacity: var(--wcvip-unavailable-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

/* Focus State - Accessibility */
.wcvip-square-thumb:focus-visible {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

.wcvip-square-thumb:focus:not(:focus-visible) {
    outline: none;
}

.wcvip-square-thumb-image {
    width: 80px;
    height: 80px;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wcvip-square-thumb:hover .wcvip-square-thumb-image {
    border-color: var(--wcvip-hover-border-color);
}

.wcvip-square-thumb.active .wcvip-square-thumb-image {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
}

.wcvip-square-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image loading placeholder for square thumbnails */
.wcvip-square-thumb-image {
    position: relative;
}

.wcvip-square-thumb-image .wcvip-image-loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wcvip-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wcvip-square-thumb-image .wcvip-variation-image {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wcvip-square-thumb-image .wcvip-variation-image.loaded {
    opacity: 1;
}

.wcvip-square-thumb-image .wcvip-variation-image.loaded ~ .wcvip-image-loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

/* Default group images should be visible immediately */
.wcvip-default-group .wcvip-variation-image {
    opacity: 1;
}

.wcvip-default-group .wcvip-image-loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

/* Secondary label for multi-attribute variations - Badge overlay */
.wcvip-square-thumb .wcvip-secondary-label {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 6px;
    border-radius: 3px;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.wcvip-square-thumb:hover .wcvip-secondary-label {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.wcvip-square-thumb.active .wcvip-secondary-label {
    background: var(--wcvip-active-border-color, #2271b1);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Button Style - Enhanced Styles
   ============================================ */

/* CSS Variables for Button Style */
:root {
    /* Button Style specific variables */
    --wcvip-btn-padding: 12px 18px;
    --wcvip-btn-padding-mobile: 14px 20px;
    --wcvip-btn-gap: 10px;
    --wcvip-btn-gap-mobile: 12px;
    --wcvip-btn-border-radius: 6px;
    --wcvip-btn-min-height: 44px;
    --wcvip-btn-transition-duration: 0.3s;
    --wcvip-btn-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --wcvip-btn-img-size: 40px;
    --wcvip-btn-img-size-mobile: 44px;
    
    /* Disabled state */
    --wcvip-btn-disabled-opacity: 0.5;
    --wcvip-btn-disabled-bg: rgba(0, 0, 0, 0.05);
    
    /* Focus states */
    --wcvip-btn-focus-outline: 3px solid rgba(0, 123, 255, 0.5);
    --wcvip-btn-focus-outline-offset: 2px;
}

/* Container */
.wcvip-button-style {
    display: flex;
    gap: var(--wcvip-btn-gap);
    margin: 20px 0;
    flex-wrap: wrap;
    position: relative;
    padding: 5px 0;
}

/* Button Thumb */
.wcvip-button-thumb {
    /* Reset button styles */
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: var(--wcvip-btn-border-radius);
    background: var(--wcvip-default-background);
    padding: var(--wcvip-btn-padding);
    font-family: inherit;
    font-weight: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    min-height: var(--wcvip-btn-min-height);
    
    /* Performance-optimized transitions */
    transition: 
        border-color var(--wcvip-btn-transition-duration) var(--wcvip-btn-transition-timing),
        background-color var(--wcvip-btn-transition-duration) var(--wcvip-btn-transition-timing),
        box-shadow var(--wcvip-btn-transition-duration) var(--wcvip-btn-transition-timing),
        opacity var(--wcvip-btn-transition-duration) var(--wcvip-btn-transition-timing);
    
    /* GPU acceleration */
    will-change: border-color, background-color;
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.wcvip-button-text {
    font-size: 14px;
    color: var(--wcvip-default-text-color);
    line-height: 1.4;
}

.wcvip-button-thumb:hover:not([data-unavailable="true"]) {
    border-color: var(--wcvip-hover-border-color);
    background: var(--wcvip-hover-background);
}

.wcvip-button-thumb.active {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
    background: var(--wcvip-active-background);
    color: var(--wcvip-active-text-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.wcvip-button-thumb.active .wcvip-button-text {
    color: var(--wcvip-active-text-color);
}

/* Focus State - Accessibility */
.wcvip-button-thumb:focus-visible {
    outline: var(--wcvip-btn-focus-outline);
    outline-offset: var(--wcvip-btn-focus-outline-offset);
    border-color: rgba(0, 123, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.wcvip-button-thumb:focus:not(:focus-visible) {
    outline: none;
}

/* Active Press State */
.wcvip-button-thumb:active:not([data-unavailable="true"]) {
    transform: translateY(1px);
    transition-duration: 0.1s;
}

/* Disabled/Unavailable State */
.wcvip-button-thumb[data-unavailable="true"] {
    opacity: var(--wcvip-btn-disabled-opacity);
    cursor: not-allowed;
    background: var(--wcvip-btn-disabled-bg);
    pointer-events: none;
}

.wcvip-button-thumb[data-unavailable="true"] .wcvip-button-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.wcvip-button-thumb img {
    width: var(--wcvip-btn-img-size);
    height: var(--wcvip-btn-img-size);
    object-fit: cover;
    border: 1px solid #ededed;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Stock Badge */
.wcvip-button-thumb .wcvip-stock-badge {
    font-size: var(--wcvip-badge-font-size);
    padding: var(--wcvip-badge-padding);
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
    border-radius: var(--wcvip-badge-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: auto;
}

/* Responsive: Mobile Styles */
@media (max-width: 768px) {
    .wcvip-button-style {
        gap: var(--wcvip-btn-gap-mobile);
    }
    
    .wcvip-button-thumb {
        padding: var(--wcvip-btn-padding-mobile);
        min-height: 48px;
    }
    
    .wcvip-button-thumb img {
        width: var(--wcvip-btn-img-size-mobile);
        height: var(--wcvip-btn-img-size-mobile);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcvip-button-thumb {
        border-width: 3px;
    }
    
    .wcvip-button-thumb.active {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcvip-button-thumb {
        transition: none;
    }
}

/* Button Style - Attribute Sections Context */
.wcvip-attribute-section-content .wcvip-button-style {
    margin: 0;
}

/* Square Thumbnails - Attribute Sections Context */
.wcvip-attribute-section-content .wcvip-square-thumbnails-wrapper {
    margin: 0;
}

/* Circular Thumbnails - Attribute Sections Context */
.wcvip-attribute-section-content .wcvip-circular-thumbnails-wrapper {
    margin: 0;
}

/* Grid Layout (Pro) */
.wcvip-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.wcvip-grid-thumb {
    aspect-ratio: 1;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcvip-grid-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.wcvip-grid-thumb.active {
    border-color: var(--wcvip-hover-border-color);
    border-width: var(--wcvip-active-border-width);
}

.wcvip-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rectangular Thumbnails */
.wcvip-rectangular-thumbnails {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.wcvip-rectangular-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcvip-rectangular-item:hover {
    transform: translateY(-3px);
}

.wcvip-rectangular-item.active .wcvip-rect-image {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
}

.wcvip-rect-image {
    width: 80px;
    height: 80px;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wcvip-rect-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcvip-rect-label {
    font-size: 12px;
    color: var(--wcvip-default-text-color);
    text-align: center;
}

/* Vertical List */
.wcvip-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.wcvip-vertical-item {
    width: 100px;
    height: 100px;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcvip-vertical-item:hover {
    border-color: var(--wcvip-hover-border-color);
}

.wcvip-vertical-item.active {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
}

.wcvip-vertical-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide default WooCommerce variation table when custom selector is active */
/* Multiple selectors to cover different HTML structures */
.wcvip-variation-selector ~ .variations,
.variations_form:has(.wcvip-variation-selector) .variations,
form.variations_form:has(.wcvip-variation-selector) table.variations {
    display: none !important;
}

/* Fallback for browsers that don't support :has() - hide variations table if it's in the same form as custom selector */
.variations_form .wcvip-variation-selector + .variations {
    display: none !important;
}

/* ============================================
   Max Height & Scroll for Many Variations
   Minimal styling for theme compatibility
   ============================================ */

/* Main variation selector container */
.wcvip-variation-selector {
    position: relative;
}

/* Scrollable containers - minimal styling, let theme handle appearance */
.wcvip-circular-thumbnails-wrapper,
.wcvip-square-thumbnails-wrapper,
.wcvip-rectangular-thumbnails,
.wcvip-grid-layout,
.wcvip-horizontal-strip,
.wcvip-vertical-list,
.wcvip-button-style,
.wcvip-horizontal-text-boxes-wrapper,
.wcvip-vertical-text-list-wrapper,
.wcvip-color-swatches-wrapper,
.wcvip-attribute-section-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* For multi-attribute grouped displays */
.wcvip-multi-attribute {
    max-height: 500px;
}

.wcvip-attribute-group {
    margin-bottom: 0;
}

/* Group Header - non-clickable label for Square/Circular thumbnails */
.wcvip-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0 0 0;
    background: none;
    border: none;
    text-align: left;
    color: inherit;
    font: inherit;
}

/* For Square and Circular thumbnails, header is not clickable */
.wcvip-square-thumbnails-wrapper .wcvip-group-header,
.wcvip-circular-thumbnails-wrapper .wcvip-group-header {
    cursor: default;
    pointer-events: none;
}

/* For other styles, keep clickable behavior */
.wcvip-group-header.wcvip-group-toggle {
    cursor: pointer;
    pointer-events: auto;
}

.wcvip-group-header:hover {
    text-decoration: none;
}

.wcvip-group-header:focus,
.wcvip-group-header:active,
.wcvip-group-header:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

.wcvip-group-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    margin-left: 0.5em;
    opacity: 0.6;
}

.wcvip-attribute-group.wcvip-group-collapsed .wcvip-group-toggle-icon {
    transform: rotate(-90deg);
}

.wcvip-group-content {
    padding-top: 0;
}

/* For Square and Circular thumbnails, always show content */
.wcvip-square-thumbnails-wrapper .wcvip-group-content,
.wcvip-circular-thumbnails-wrapper .wcvip-group-content {
    display: block !important;
}

.wcvip-attribute-group.wcvip-group-collapsed .wcvip-group-content {
    display: none;
}

.wcvip-group-count {
    font-size: 0.85em;
    opacity: 0.6;
    margin-left: 0.25em;
    font-weight: normal;
}

/* ============================================
   Attribute Sections Format (New Format)
   ============================================ */

.wcvip-attribute-sections-container {
    display: flex;
    flex-direction: column;
    gap: .5em;
}

/* Global selection label for attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global {
    width: 100%;
    margin-bottom: 1em;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border-left: 3px solid var(--wcvip-active-border-color, #0073aa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-weight: 500;
    color: var(--wcvip-default-text-color, inherit);
    line-height: 1.5;
}

.wcvip-attribute-section {
    width: 100%;
}

.wcvip-attribute-section-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.25em;
    font-weight: 500;
    font-size: 17px;
}

.wcvip-attribute-label {
    color: inherit;
    font: inherit;
}

.wcvip-attribute-selected-value {
    color: inherit;
    font: inherit;
    opacity: 0.7;
    font-weight: normal;
}

.wcvip-attribute-section-content {
    width: 100%;
}

/* Hide individual global selection displays inside attribute sections when container has one */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for vertical text in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-vertical-text-list-wrapper > .wcvip-selected-variation-global,
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-vertical-text-list ~ .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for color swatches in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-color-swatches > .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for horizontal text boxes in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-horizontal-text-boxes-wrapper > .wcvip-selected-variation-global,
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-horizontal-text-boxes ~ .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for button styles in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-button-style > .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for square thumbnails in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-square-thumbnails-wrapper > .wcvip-selected-variation-global,
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-square-thumbnails ~ .wcvip-selected-variation-global {
    display: none !important;
}

/* Hide individual global selection displays for circular thumbnails in attribute sections */
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-circular-thumbnails-wrapper > .wcvip-selected-variation-global,
.wcvip-attribute-sections-container > .wcvip-selected-variation-global ~ .wcvip-attribute-section .wcvip-attribute-section-content > .wcvip-circular-thumbnails ~ .wcvip-selected-variation-global {
    display: none !important;
}

/* Unavailable items in attribute sections */
.wcvip-attribute-section .wcvip-unavailable {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Load More Button - ultra-compact pill style, theme-friendly */
.wcvip-load-more-btn {
    display: inline-block;
    width: auto;
    padding: 0.35em 0.75em;
    margin: 0.75em auto;
    background: transparent;
    border: 1px solid;
    border-color: currentColor;
    color: inherit;
    font: inherit;
    font-size: 0.75em;
    cursor: pointer;
    text-align: center;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.wcvip-load-more-btn:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ============================================
   Horizontal Text Boxes - Enhanced Styles
   ============================================ */

/* CSS Variables for Horizontal Text Boxes */
:root {
    /* Horizontal Text Boxes specific variables */
    --wcvip-htb-padding: 12px 18px;
    --wcvip-htb-padding-mobile: 14px 20px; /* Touch-friendly */
    --wcvip-htb-gap: 10px;
    --wcvip-htb-gap-mobile: 12px;
    --wcvip-htb-font-size: 14px;
    --wcvip-htb-font-size-mobile: 16px;
    --wcvip-htb-border-radius: 6px;
    --wcvip-htb-min-height: 44px; /* Touch-friendly minimum */
    --wcvip-htb-transition-duration: 0.3s;
    --wcvip-htb-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Animation variables */
    --wcvip-htb-scale-hover: 1.05;
    --wcvip-htb-scale-active: 0.98;
    --wcvip-htb-slide-distance: 4px;
    
    /* Disabled state */
    --wcvip-htb-disabled-opacity: 0.5;
    --wcvip-htb-disabled-bg: rgba(0, 0, 0, 0.05);
    
    /* Focus states */
    --wcvip-htb-focus-outline: 3px solid rgba(0, 123, 255, 0.5);
    --wcvip-htb-focus-outline-offset: 2px;
    
    /* Loading spinner */
    --wcvip-spinner-size: 16px;
    --wcvip-spinner-color: currentColor;
    --wcvip-spinner-speed: 0.8s;
    
    /* Stock badge */
    --wcvip-badge-font-size: 10px;
    --wcvip-badge-padding: 2px 6px;
    --wcvip-badge-radius: 3px;
}

/* Container */
.wcvip-horizontal-text-boxes {
    display: flex;
    gap: var(--wcvip-htb-gap);
    margin: 0;
    flex-wrap: wrap;
    position: relative;
    /* Enable horizontal scroll on mobile when many options */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    padding: 15px 0; /* Space for focus outline */
}

/* Custom scrollbar for webkit browsers */
.wcvip-horizontal-text-boxes::-webkit-scrollbar {
    height: 6px;
}

.wcvip-horizontal-text-boxes::-webkit-scrollbar-track {
    background: transparent;
}

.wcvip-horizontal-text-boxes::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.wcvip-horizontal-text-boxes::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Text Box Button */
.wcvip-horizontal-text-boxes .wcvip-text-box {
    /* Reset button styles */
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: var(--wcvip-htb-border-radius);
    background: var(--wcvip-default-background);
    padding: var(--wcvip-htb-padding);
    font-size: var(--wcvip-htb-font-size);
    color: var(--wcvip-default-text-color);
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    min-height: var(--wcvip-htb-min-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0; /* Prevent shrinking in horizontal scroll */
    
    /* Performance-optimized transitions */
    transition: 
        transform var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing),
        border-color var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing),
        background-color var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing),
        box-shadow var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing),
        opacity var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing);
    
    /* GPU acceleration */
    will-change: transform, border-color, background-color;
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Content wrapper for animation */
.wcvip-horizontal-text-boxes .wcvip-text-box-content {
    position: relative;
    z-index: 1;
    transition: opacity var(--wcvip-htb-transition-duration) var(--wcvip-htb-transition-timing);
}

/* Hover State - Scale animation */
.wcvip-horizontal-text-boxes .wcvip-text-box:hover:not([data-unavailable="true"]) {
    border-color: var(--wcvip-hover-border-color);
    background: var(--wcvip-hover-background);
}

/* Active/Selected State - Enhanced styling */
.wcvip-horizontal-text-boxes .wcvip-text-box.active {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
    background: var(--wcvip-active-background);
    color: var(--wcvip-active-text-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0) scale(1);
    font-weight: 600;
}

/* Focus State - Accessibility */
.wcvip-horizontal-text-boxes .wcvip-text-box:focus-visible {
    outline: var(--wcvip-htb-focus-outline);
    outline-offset: var(--wcvip-htb-focus-outline-offset);
    border-color: rgba(0, 123, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Focus state for older browsers */
.wcvip-horizontal-text-boxes .wcvip-text-box:focus:not(:focus-visible) {
    outline: none;
}

/* Active Press State */
.wcvip-horizontal-text-boxes .wcvip-text-box:active:not([data-unavailable="true"]) {
    transform: translateY(0) scale(var(--wcvip-htb-scale-active));
    transition-duration: 0.1s;
}

/* Disabled/Unavailable State - Enhanced */
.wcvip-horizontal-text-boxes .wcvip-text-box[data-unavailable="true"] {
    opacity: var(--wcvip-htb-disabled-opacity);
    cursor: not-allowed;
    background: var(--wcvip-htb-disabled-bg);
    position: relative;
    pointer-events: none;
}

.wcvip-horizontal-text-boxes .wcvip-text-box[data-unavailable="true"] .wcvip-text-box-content {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Stock Badge */
.wcvip-horizontal-text-boxes .wcvip-stock-badge {
    font-size: var(--wcvip-badge-font-size);
    padding: var(--wcvip-badge-padding);
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
    border-radius: var(--wcvip-badge-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}



/* Responsive: Mobile Styles */
@media (max-width: 768px) {
    .wcvip-horizontal-text-boxes {
        gap: var(--wcvip-htb-gap-mobile);
        /* Enable horizontal scroll on mobile */
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 10px; /* Space for scrollbar */
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .wcvip-horizontal-text-boxes .wcvip-text-box {
        padding: var(--wcvip-htb-padding-mobile);
        font-size: var(--wcvip-htb-font-size-mobile);
        min-height: 48px; /* Larger touch target on mobile */
        min-width: auto;
    }
    
}

/* Responsive: Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .wcvip-horizontal-text-boxes {
        gap: 12px;
    }
    
    .wcvip-horizontal-text-boxes .wcvip-text-box {
        padding: 11px 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcvip-horizontal-text-boxes .wcvip-text-box {
        border-width: 3px;
    }
    
    .wcvip-horizontal-text-boxes .wcvip-text-box.active {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcvip-horizontal-text-boxes .wcvip-text-box,
    .wcvip-horizontal-text-boxes .wcvip-text-box-content {
        transition: none;
        animation: none;
    }
}

/* Horizontal Text Boxes - Attribute Sections Context */
.wcvip-attribute-section-content .wcvip-horizontal-text-boxes {
    margin: 0;
}

/* ============================================
   Vertical Text List - Enhanced Styles
   ============================================ */

/* CSS Variables for Vertical Text List */
:root {
    /* Vertical Text List specific variables */
    --wcvip-vtl-padding: 12px 18px;
    --wcvip-vtl-padding-mobile: 14px 20px; /* Touch-friendly */
    --wcvip-vtl-gap: 10px;
    --wcvip-vtl-gap-mobile: 12px;
    --wcvip-vtl-font-size: 14px;
    --wcvip-vtl-font-size-mobile: 16px;
    --wcvip-vtl-border-radius: 6px;
    --wcvip-vtl-min-height: 44px; /* Touch-friendly minimum */
    --wcvip-vtl-transition-duration: 0.3s;
    --wcvip-vtl-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Disabled state */
    --wcvip-vtl-disabled-opacity: 0.5;
    --wcvip-vtl-disabled-bg: rgba(0, 0, 0, 0.05);
    
    /* Focus states */
    --wcvip-vtl-focus-outline: 3px solid rgba(0, 123, 255, 0.5);
    --wcvip-vtl-focus-outline-offset: 2px;
}

/* Container */
.wcvip-vertical-text-list {
    display: flex;
    flex-direction: column;
    gap: var(--wcvip-vtl-gap);
    margin: 0;
    position: relative;
    padding: 15px 0; /* Space for focus outline */
}

/* Text Box Button */
.wcvip-vertical-text-list .wcvip-text-box {
    /* Reset button styles */
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: var(--wcvip-vtl-border-radius);
    background: var(--wcvip-default-background);
    padding: var(--wcvip-vtl-padding);
    font-size: var(--wcvip-vtl-font-size);
    color: var(--wcvip-default-text-color);
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.4;
    cursor: pointer;
    position: relative;
    min-height: var(--wcvip-vtl-min-height);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
    
    /* Performance-optimized transitions */
    transition: 
        border-color var(--wcvip-vtl-transition-duration) var(--wcvip-vtl-transition-timing),
        background-color var(--wcvip-vtl-transition-duration) var(--wcvip-vtl-transition-timing),
        box-shadow var(--wcvip-vtl-transition-duration) var(--wcvip-vtl-transition-timing),
        opacity var(--wcvip-vtl-transition-duration) var(--wcvip-vtl-transition-timing);
    
    /* GPU acceleration */
    will-change: border-color, background-color;
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Content wrapper */
.wcvip-vertical-text-list .wcvip-text-box-content {
    position: relative;
    z-index: 1;
    transition: opacity var(--wcvip-vtl-transition-duration) var(--wcvip-vtl-transition-timing);
}

/* Hover State */
.wcvip-vertical-text-list .wcvip-text-box:hover:not([data-unavailable="true"]) {
    border-color: var(--wcvip-hover-border-color);
    background: var(--wcvip-hover-background);
}

/* Active/Selected State - Enhanced styling */
.wcvip-vertical-text-list .wcvip-text-box.active {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
    background: var(--wcvip-active-background);
    color: var(--wcvip-active-text-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Focus State - Accessibility */
.wcvip-vertical-text-list .wcvip-text-box:focus-visible {
    outline: var(--wcvip-vtl-focus-outline);
    outline-offset: var(--wcvip-vtl-focus-outline-offset);
    border-color: rgba(0, 123, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Focus state for older browsers */
.wcvip-vertical-text-list .wcvip-text-box:focus:not(:focus-visible) {
    outline: none;
}

/* Active Press State */
.wcvip-vertical-text-list .wcvip-text-box:active:not([data-unavailable="true"]) {
    transform: translateY(1px);
    transition-duration: 0.1s;
}

/* Disabled/Unavailable State - Enhanced */
.wcvip-vertical-text-list .wcvip-text-box[data-unavailable="true"] {
    opacity: var(--wcvip-vtl-disabled-opacity);
    cursor: not-allowed;
    background: var(--wcvip-vtl-disabled-bg);
    position: relative;
    pointer-events: none;
}

.wcvip-vertical-text-list .wcvip-text-box[data-unavailable="true"] .wcvip-text-box-content {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Stock Badge */
.wcvip-vertical-text-list .wcvip-stock-badge {
    font-size: var(--wcvip-badge-font-size);
    padding: var(--wcvip-badge-padding);
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
    border-radius: var(--wcvip-badge-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: auto;
}

/* Responsive: Mobile Styles */
@media (max-width: 768px) {
    .wcvip-vertical-text-list {
        gap: var(--wcvip-vtl-gap-mobile);
    }
    
    .wcvip-vertical-text-list .wcvip-text-box {
        padding: var(--wcvip-vtl-padding-mobile);
        font-size: var(--wcvip-vtl-font-size-mobile);
        min-height: 48px; /* Larger touch target on mobile */
    }
}

/* Responsive: Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .wcvip-vertical-text-list {
        gap: 12px;
    }
    
    .wcvip-vertical-text-list .wcvip-text-box {
        padding: 11px 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcvip-vertical-text-list .wcvip-text-box {
        border-width: 3px;
    }
    
    .wcvip-vertical-text-list .wcvip-text-box.active {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcvip-vertical-text-list .wcvip-text-box,
    .wcvip-vertical-text-list .wcvip-text-box-content {
        transition: none;
    }
}

/* ============================================
   Color Swatches - Enhanced Styles
   ============================================ */

/* CSS Variables for Color Swatches */
:root {
    /* Color Swatches specific variables */
    --wcvip-cs-size: 40px;
    --wcvip-cs-size-mobile: 44px; /* Touch-friendly */
    --wcvip-cs-gap: 10px;
    --wcvip-cs-gap-mobile: 12px;
    --wcvip-cs-border-width: 2px;
    --wcvip-cs-border-radius: 50%;
    --wcvip-cs-transition-duration: 0.3s;
    --wcvip-cs-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Disabled state */
    --wcvip-cs-disabled-opacity: 0.5;
    
    /* Focus states */
    --wcvip-cs-focus-outline: 3px solid rgba(0, 123, 255, 0.5);
    --wcvip-cs-focus-outline-offset: 2px;
}

/* Container */
.wcvip-color-swatches {
    display: flex;
    gap: var(--wcvip-cs-gap);
    margin: 20px 0;
    flex-wrap: wrap;
    position: relative;
    padding: 5px 0; /* Space for focus outline */
}

/* Outer container with label - display in column when it contains label */
.wcvip-variation-selector > .wcvip-color-swatches,
.wcvip-color-swatches-wrapper > .wcvip-color-swatches {
    flex-direction: column;
    align-items: flex-start;
}

/* Reset inner swatches container to horizontal flex */
.wcvip-color-swatches .wcvip-color-swatches {
    flex-direction: row;
    margin: 0;
}

/* Color Swatch Button */
.wcvip-color-swatch {
    /* Reset button styles */
    width: var(--wcvip-cs-size);
    height: var(--wcvip-cs-size);
    border: var(--wcvip-cs-border-width) solid var(--wcvip-default-border-color);
    border-radius: var(--wcvip-cs-border-radius);
    padding: 0;
    margin: 0;
    cursor: pointer;
    position: relative;
    display: inline-block;
    
    /* Performance-optimized transitions */
    transition: 
        border-color var(--wcvip-cs-transition-duration) var(--wcvip-cs-transition-timing),
        border-width var(--wcvip-cs-transition-duration) var(--wcvip-cs-transition-timing),
        box-shadow var(--wcvip-cs-transition-duration) var(--wcvip-cs-transition-timing),
        transform var(--wcvip-cs-transition-duration) var(--wcvip-cs-transition-timing),
        opacity var(--wcvip-cs-transition-duration) var(--wcvip-cs-transition-timing);
    
    /* GPU acceleration */
    will-change: border-color, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Image-based swatches */
.wcvip-color-swatch.wcvip-swatch-with-image {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Hover State */
.wcvip-color-swatch:hover:not([data-unavailable="true"]) {
    border-color: var(--wcvip-hover-border-color);
}

/* Active/Selected State */
.wcvip-color-swatch.active {
    border-color: var(--wcvip-active-border-color) !important;
    border-width: var(--wcvip-active-border-width);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Focus State - Accessibility */
.wcvip-color-swatch:focus-visible {
    outline: var(--wcvip-cs-focus-outline);
    outline-offset: var(--wcvip-cs-focus-outline-offset);
    border-color: rgba(0, 123, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Focus state for older browsers */
.wcvip-color-swatch:focus:not(:focus-visible) {
    outline: none;
}

/* Active Press State */
.wcvip-color-swatch:active:not([data-unavailable="true"]) {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

/* Disabled/Unavailable State */
.wcvip-color-swatch[data-unavailable="true"] {
    opacity: var(--wcvip-cs-disabled-opacity);
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

/* Unavailable Overlay */
.wcvip-swatch-unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    border-radius: var(--wcvip-cs-border-radius);
    pointer-events: none;
}

/* Responsive: Mobile Styles */
@media (max-width: 768px) {
    .wcvip-color-swatches {
        gap: var(--wcvip-cs-gap-mobile);
    }
    
    .wcvip-color-swatch {
        width: var(--wcvip-cs-size-mobile);
        height: var(--wcvip-cs-size-mobile);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcvip-color-swatch {
        border-width: 3px;
    }
    
    .wcvip-color-swatch.active {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcvip-color-swatch {
        transition: none;
    }
}

/* ============================================
   Custom CSS Tooltips - Enhanced
   ============================================ */

/* Tooltip Trigger - Base */
.wcvip-tooltip-trigger {
    position: relative;
}

/* Tooltip Container */
.wcvip-tooltip {
    display: none !important; /* Hide custom tooltip, use browser tooltip instead */
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
    z-index: var(--wcvip-tooltip-z-index);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    margin-bottom: var(--wcvip-tooltip-arrow-size);
    white-space: nowrap;
}

/* Tooltip Content */
.wcvip-tooltip-content {
    background: var(--wcvip-tooltip-bg);
    color: var(--wcvip-tooltip-text);
    padding: var(--wcvip-tooltip-padding);
    border-radius: var(--wcvip-tooltip-border-radius);
    font-size: var(--wcvip-tooltip-font-size);
    line-height: var(--wcvip-tooltip-line-height);
    max-width: var(--wcvip-tooltip-max-width);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Tooltip Arrow */
.wcvip-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: var(--wcvip-tooltip-arrow-size) solid transparent;
    border-top-color: var(--wcvip-tooltip-bg);
}

/* Tooltip Price */
.wcvip-tooltip-price {
    font-weight: 600;
    color: #00a32a;
    margin-left: 6px;
}

/* Tooltip Status */
.wcvip-tooltip-status {
    font-size: 10px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Show tooltip on hover */
.wcvip-tooltip-trigger:hover .wcvip-tooltip,
.wcvip-tooltip-trigger:focus-visible .wcvip-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

/* Tooltip positioning for different display styles */

/* Horizontal Text Boxes - Tooltip above */
.wcvip-horizontal-text-boxes .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-horizontal-text-boxes .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Vertical Text List - Tooltip to the right */
.wcvip-vertical-text-list .wcvip-tooltip {
    bottom: auto;
    top: 50%;
    left: 100%;
    right: auto;
    transform: translateY(-50%) translateX(var(--wcvip-tooltip-distance));
    margin-bottom: 0;
    margin-left: var(--wcvip-tooltip-arrow-size);
}

.wcvip-vertical-text-list .wcvip-tooltip::after {
    top: 50%;
    left: 0;
    right: auto;
    bottom: auto;
    transform: translateY(-50%) translateX(-100%);
    border-left-color: transparent;
    border-right-color: var(--wcvip-tooltip-bg);
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/* Button Style - Tooltip above */
.wcvip-button-style .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-button-style .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Color Swatches - Tooltip above */
.wcvip-color-swatches .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-color-swatches .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Square Thumbnails - Tooltip above */
.wcvip-square-thumbnails .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-square-thumbnails .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Circular Thumbnails - Tooltip above */
.wcvip-circular-thumbnails .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-circular-thumbnails .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Rectangular Thumbnails - Tooltip above */
.wcvip-rectangular-thumbnails .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-rectangular-thumbnails .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Vertical List - Tooltip to the right */
.wcvip-vertical-list .wcvip-tooltip {
    bottom: auto;
    top: 50%;
    left: 100%;
    right: auto;
    transform: translateY(-50%) translateX(var(--wcvip-tooltip-distance));
    margin-bottom: 0;
    margin-left: var(--wcvip-tooltip-arrow-size);
}

.wcvip-vertical-list .wcvip-tooltip::after {
    top: 50%;
    left: 0;
    right: auto;
    bottom: auto;
    transform: translateY(-50%) translateX(-100%);
    border-left-color: transparent;
    border-right-color: var(--wcvip-tooltip-bg);
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/* Grid Layout - Tooltip above */
.wcvip-grid-layout .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-grid-layout .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Horizontal Strip - Tooltip above */
.wcvip-horizontal-strip .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-horizontal-strip .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Radio Selector - Tooltip above */
.wcvip-radio-selector .wcvip-tooltip {
    bottom: 100%;
    top: auto;
    transform: translateX(-50%) translateY(calc(-1 * var(--wcvip-tooltip-distance)));
}

.wcvip-radio-selector .wcvip-tooltip::after {
    top: 100%;
    bottom: auto;
    border-top-color: var(--wcvip-tooltip-bg);
    border-bottom-color: transparent;
}

/* Responsive: Mobile - Adjust tooltip positioning */
@media (max-width: 768px) {
    .wcvip-tooltip {
        max-width: 180px;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .wcvip-tooltip-content {
        white-space: normal;
        flex-wrap: wrap;
    }
    
    /* On mobile, show tooltip below for better visibility */
    .wcvip-horizontal-text-boxes .wcvip-tooltip,
    .wcvip-button-style .wcvip-tooltip,
    .wcvip-color-swatches .wcvip-tooltip,
    .wcvip-square-thumbnails .wcvip-tooltip,
    .wcvip-circular-thumbnails .wcvip-tooltip {
        bottom: auto;
        top: 100%;
        transform: translateX(-50%) translateY(var(--wcvip-tooltip-distance));
    }
    
    .wcvip-horizontal-text-boxes .wcvip-tooltip::after,
    .wcvip-button-style .wcvip-tooltip::after,
    .wcvip-color-swatches .wcvip-tooltip::after,
    .wcvip-square-thumbnails .wcvip-tooltip::after,
    .wcvip-circular-thumbnails .wcvip-tooltip::after {
        top: 0;
        bottom: 100%;
        border-top-color: transparent;
        border-bottom-color: var(--wcvip-tooltip-bg);
    }
    
    /* Vertical text list - keep right on mobile */
    .wcvip-vertical-text-list .wcvip-tooltip {
        left: 100%;
        right: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcvip-tooltip-content {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcvip-tooltip {
        transition: none;
    }
}

/* Horizontal Strip */
.wcvip-horizontal-strip {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.wcvip-strip-item {
    width: 80px;
    height: 80px;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.wcvip-strip-item:hover {
    transform: scale(1.1);
    border-color: var(--wcvip-hover-border-color);
}

.wcvip-strip-item.active {
    border-color: var(--wcvip-active-border-color);
    border-width: var(--wcvip-active-border-width);
}

.wcvip-strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Radio Selector */
.wcvip-radio-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.wcvip-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 2px solid var(--wcvip-default-border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--wcvip-default-background);
}

.wcvip-radio-item:hover {
    border-color: var(--wcvip-hover-border-color);
    background: var(--wcvip-hover-background);
}

.wcvip-radio-item.active,
.wcvip-radio-item input[type="radio"]:checked + img {
    border-color: var(--wcvip-hover-border-color);
    background: var(--wcvip-hover-background);
}

.wcvip-radio-item input[type="radio"] {
    margin: 0;
}

.wcvip-radio-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.wcvip-radio-item span {
    font-size: 14px;
    color: var(--wcvip-default-text-color);
}

/* Active state for all selectors */
.wcvip-circular-thumb.active,
.wcvip-square-thumb.active,
.wcvip-rectangular-item.active,
.wcvip-button-thumb.active,
.wcvip-vertical-item.active,
.wcvip-grid-thumb.active,
.wcvip-strip-item.active,
.wcvip-radio-item.active,
.wcvip-horizontal-text-boxes .wcvip-text-box.active,
.wcvip-vertical-text-list .wcvip-text-box.active {
    border-color: var(--wcvip-active-border-color) !important;
    border-width: var(--wcvip-active-border-width) !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.wcvip-circular-thumb.active {
    border-width: 4px !important;
}
