/* ========================================
   APPLE-INSPIRED VARIATIONS SWATCHES
   Enhanced Design with Smooth Animations
   ======================================== */

/* ========================================
   LIST DROPDOWN STYLING
   ======================================== */

/* Select dropdown styling for List display method */
.cfvsw-swatches-container select,
.cfvsw-swatches-container .cfvsw-swatch-select,
select[name*="attribute_"],
select[id*="pa_"],
select[id*="attribute_"] {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    min-height: 50px !important;
    width: 100% !important;
    max-width: 300px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* Hover state for select dropdowns */
.cfvsw-swatches-container select:hover,
.cfvsw-swatches-container .cfvsw-swatch-select:hover,
select[name*="attribute_"]:hover,
select[id*="pa_"]:hover,
select[id*="attribute_"]:hover {
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Focus state for select dropdowns */
.cfvsw-swatches-container select:focus,
.cfvsw-swatches-container .cfvsw-swatch-select:focus,
select[name*="attribute_"]:focus,
select[id*="pa_"]:focus,
select[id*="attribute_"]:focus {
    outline: none !important;
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: 
        0 0 0 3px color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent),
        0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Dropdown options styling */
.cfvsw-swatches-container select option,
.cfvsw-swatches-container .cfvsw-swatch-select option,
select[name*="attribute_"] option,
select[id*="pa_"] option,
select[id*="attribute_"] option {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 12px 16px !important;
    border: none !important;
    cursor: pointer !important;
}

/* Selected option styling */
.cfvsw-swatches-container select option:checked,
.cfvsw-swatches-container .cfvsw-swatch-select option:checked,
select[name*="attribute_"] option:checked,
select[id*="pa_"] option:checked,
select[id*="attribute_"] option:checked {
    background: linear-gradient(135deg, var(--primary-color, #007AFF) 0%, var(--secondary-color, #5856D6) 100%) !important;
    color: white !important;
    font-weight: 600 !important;
}

/* Hover state for dropdown options */
.cfvsw-swatches-container select option:hover,
.cfvsw-swatches-container .cfvsw-swatch-select option:hover,
select[name*="attribute_"] option:hover,
select[id*="pa_"] option:hover,
select[id*="attribute_"] option:hover {
    background: color-mix(in srgb, var(--primary-color, #007AFF) 10%, transparent) !important;
    color: #333 !important;
}

/* Disabled state for select dropdowns */
.cfvsw-swatches-container select:disabled,
.cfvsw-swatches-container .cfvsw-swatch-select:disabled,
select[name*="attribute_"]:disabled,
select[id*="pa_"]:disabled,
select[id*="attribute_"]:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* RTL Support for select dropdowns */
.rtl .cfvsw-swatches-container select,
.rtl .cfvsw-swatches-container .cfvsw-swatch-select,
.rtl select[name*="attribute_"],
.rtl select[id*="pa_"],
.rtl select[id*="attribute_"] {
    background-position: left 12px center !important;
    padding-left: 40px !important;
    padding-right: 16px !important;
}

/* Mobile responsive for select dropdowns */
@media (max-width: 768px) {
    .cfvsw-swatches-container select,
    .cfvsw-swatches-container .cfvsw-swatch-select,
    select[name*="attribute_"],
    select[id*="pa_"],
    select[id*="attribute_"] {
        font-size: 13px !important;
        padding: 10px 14px !important;
        padding-right: 35px !important;
        min-height: 45px !important;
        background-size: 14px !important;
        background-position: right 10px center !important;
    }
    
    .rtl .cfvsw-swatches-container select,
    .rtl .cfvsw-swatches-container .cfvsw-swatch-select,
    .rtl select[name*="attribute_"],
    .rtl select[id*="pa_"],
    .rtl select[id*="attribute_"] {
        padding-left: 35px !important;
        padding-right: 14px !important;
        background-position: left 10px center !important;
    }
}

@media (max-width: 480px) {
    .cfvsw-swatches-container select,
    .cfvsw-swatches-container .cfvsw-swatch-select,
    select[name*="attribute_"],
    select[id*="pa_"],
    select[id*="attribute_"] {
        font-size: 12px !important;
        padding: 8px 12px !important;
        padding-right: 30px !important;
        min-height: 40px !important;
        background-size: 12px !important;
        background-position: right 8px center !important;
    }
    
    .rtl .cfvsw-swatches-container select,
    .rtl .cfvsw-swatches-container .cfvsw-swatch-select,
    .rtl select[name*="attribute_"],
    .rtl select[id*="pa_"],
    .rtl select[id*="attribute_"] {
        padding-left: 30px !important;
        padding-right: 12px !important;
        background-position: left 8px center !important;
    }
}

/* Main container styling - Compact */
.cfvsw-swatches-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 16px 12px 12px 12px !important;
    margin: 10px 0 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
    overflow: visible !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

/* Subtle gradient border at top */
.cfvsw-swatches-container::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color, #007AFF) 25%, 
        var(--secondary-color, #5856D6) 75%, 
        transparent 100%) !important;
    opacity: 0.4 !important;
}

/* Individual swatch styling - Compact */
.cfvsw-swatches-option {
    position: relative !important;
    min-width: 70px !important;
    min-height: 70px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #1d1d1f !important;
    text-align: center !important;
    padding: 12px !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transform-origin: center center !important;
    will-change: transform, box-shadow, border-color !important;
    user-select: none !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Enhanced hover effects - Compact */
.cfvsw-swatches-option:hover {
    transform: translateY(-4px) scale(1.08) !important;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.1) !important;
    border-color: color-mix(in srgb, var(--primary-color, #007AFF) 50%, transparent) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
}

/* Selected state with dynamic gradient - Compact */
.cfvsw-swatches-option.cfvsw-selected-swatch {
    background: linear-gradient(135deg, var(--primary-color, #007AFF) 0%, var(--secondary-color, #5856D6) 100%) !important;
    border-color: var(--primary-color, #007AFF) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
        0 10px 28px color-mix(in srgb, var(--primary-color, #007AFF) 40%, transparent),
        0 5px 15px color-mix(in srgb, var(--primary-color, #007AFF) 25%, transparent) !important;
    animation: swatchSelectEnhanced 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Selection indicator with checkmark - Compact */
.cfvsw-swatches-option.cfvsw-selected-swatch::before {
    content: '✓' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 22px !important;
    height: 22px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    color: var(--primary-color, #007AFF) !important;
    animation: checkmarkAppearEnhanced 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Inner swatch content - Compact */
.cfvsw-swatch-inner {
    font-weight: 600 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    transition: all 0.3s ease !important;
    letter-spacing: -0.01em !important;
}

/* Enhanced ripple effect */
.cfvsw-swatches-option::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: color-mix(in srgb, var(--primary-color, #007AFF) 25%, transparent) !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.8s, height 0.8s !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.cfvsw-swatches-option:active::after {
    width: 150px !important;
    height: 150px !important;
}

/* Continuous pulse animation for selected swatch */
.cfvsw-swatches-option.cfvsw-selected-swatch {
    animation: swatchPulseEnhanced 3s ease-in-out infinite !important;
}

/* Enhanced keyframe animations */
@keyframes swatchSelectEnhanced {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    40% {
        transform: translateY(-6px) scale(1.1);
        box-shadow: 0 12px 32px color-mix(in srgb, var(--primary-color, #007AFF) 50%, transparent);
    }
    100% {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color, #007AFF) 35%, transparent);
    }
}

@keyframes checkmarkAppearEnhanced {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes swatchPulseEnhanced {
    0%, 100% {
        box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color, #007AFF) 35%, transparent);
    }
    50% {
        box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color, #007AFF) 60%, transparent);
    }
}

/* Color swatches specific styling */
.cfvsw-swatches-option[data-slug*="color"],
.cfvsw-swatches-option[data-slug*="colour"] {
    background: var(--swatch-color, #f5f5f7) !important;
    border: 3px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.cfvsw-swatches-option[data-slug*="color"]:hover,
.cfvsw-swatches-option[data-slug*="colour"]:hover {
    border-color: color-mix(in srgb, var(--primary-color, #007AFF) 60%, transparent) !important;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-6px) scale(1.08) !important;
}

.cfvsw-swatches-option[data-slug*="color"].cfvsw-selected-swatch,
.cfvsw-swatches-option[data-slug*="colour"].cfvsw-selected-swatch {
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: 
        0 12px 36px color-mix(in srgb, var(--primary-color, #007AFF) 40%, transparent),
        0 6px 20px color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent) !important;
}

/* Size swatches specific styling - Compact */
.cfvsw-swatches-option[data-slug*="size"] {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 248, 250, 0.95) 100%) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: -0.02em !important;
}

/* Responsive design - Compact */
@media (max-width: 768px) {
    .cfvsw-swatches-container {
        padding: 12px !important;
        gap: 10px !important;
        border-radius: 14px !important;
        margin: 8px 0 !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    .cfvsw-swatches-option {
        min-width: 65px !important;
        min-height: 65px !important;
        border-radius: 14px !important;
        font-size: 12px !important;
        padding: 10px !important;
        flex: 0 0 auto !important;
    }
    
    .cfvsw-swatches-option:hover {
        transform: translateY(-1px) scale(1.02) !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch::before {
        width: 14px !important;
        height: 14px !important;
        font-size: 9px !important;
        top: 3px !important;
        right: 3px !important;
    }
    
    /* Mobile compact for many swatches */
    .cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+4)) {
        gap: 6px !important;
        padding: 8px !important;
    }
    
    .cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+4)) .cfvsw-swatches-option {
        min-width: 45px !important;
        min-height: 45px !important;
        font-size: 10px !important;
        padding: 4px !important;
    }
    
    /* Reset button mobile adjustments */
    .reset_variations {
        left: 6px !important;
        top: 6px !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .rtl .reset_variations {
        right: 190px !important;
        left: auto !important;
    }
    
    /* Horizontal layout for better UX */
    .cfvsw-swatches-option {
        flex: 0 0 auto !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .cfvsw-swatches-container {
        padding: 14px 10px 10px 10px !important;
        gap: 10px !important;
        border-radius: 16px !important;
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        position: relative !important;
    }
    
    .cfvsw-swatches-option {
        min-width: 60px !important;
        min-height: 60px !important;
        border-radius: 12px !important;
        font-size: 12px !important;
        padding: 8px !important;
        width: auto !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        margin-bottom: 0 !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch::before {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        top: 4px !important;
        right: 4px !important;
    }
    
    /* Reset button mobile adjustments */
    .reset_variations {
        left: 4px !important;
        top: 4px !important;
        padding: 5px 8px !important;
        font-size: 10px !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .rtl .reset_variations {
        right: 190px !important;
        left: auto !important;
    }
}

/* Loading state */
.cfvsw-swatches-option.loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
    animation: swatchLoadingEnhanced 2s ease-in-out infinite !important;
}

@keyframes swatchLoadingEnhanced {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}

/* Accessibility improvements */
.cfvsw-swatches-option:focus {
    outline: 3px solid var(--primary-color, #007AFF) !important;
    outline-offset: 3px !important;
    transform: translateY(-2px) scale(1.02) !important;
}

.cfvsw-swatches-option:focus-visible {
    outline: 3px solid var(--primary-color, #007AFF) !important;
    outline-offset: 3px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cfvsw-swatches-option {
        border-width: 3px !important;
        border-color: #000 !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch {
        border-color: #000 !important;
        background: #000 !important;
        color: #fff !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch::before {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cfvsw-swatches-option,
    .cfvsw-swatches-option:hover,
    .cfvsw-swatches-option.cfvsw-selected-swatch {
        transition: none !important;
        animation: none !important;
    }
    
    .cfvsw-swatches-option::after {
        display: none !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch::before {
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cfvsw-swatches-container {
        background: rgba(28, 28, 30, 0.85) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .cfvsw-swatches-option {
        background: rgba(44, 44, 46, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }
    
    .cfvsw-swatches-option:hover {
    background: rgba(58, 58, 60, 0.98) !important;
    border-color: color-mix(in srgb, var(--primary-color, #007AFF) 40%, transparent) !important;
}
    
    .cfvsw-swatches-option[data-slug*="size"] {
        background: linear-gradient(135deg, 
            rgba(44, 44, 46, 0.95) 0%, 
            rgba(58, 58, 60, 0.95) 100%) !important;
    }
}

/* Print styles */
@media print {
    .cfvsw-swatches-container {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .cfvsw-swatches-option {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .cfvsw-swatches-option.cfvsw-selected-swatch {
        background: #f0f0f0 !important;
        border-color: #007AFF !important;
        color: black !important;
    }
} 

/* ========================================
   DYNAMIC SHIPPING METHODS STYLING
   ======================================== */

/* Shipping Methods Container */
#shipping-methods {
    font-size: 14px !important;
    margin-left: 10px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
}

/* Shipping Option Container */
.codplugin-shipping-option {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    padding: 5px !important;
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.codplugin-shipping-option:hover {
    background-color: color-mix(in srgb, var(--primary-color, #007AFF) 5%, transparent) !important;
    border-color: color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent) !important;
}

/* Hide actual radio button */
.codplugin-shipping-input {
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
}

/* Label positioning and spacing */
.codplugin-shipping-label {
    position: relative !important;
    padding-left: 2.4em !important;
    cursor: pointer !important;
    font-size: 1em !important;
    line-height: 1.6em !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 0.5em !important;
    transition: all 0.3s ease !important;
}

/* Custom radio button circle with dynamic colors */
.codplugin-shipping-label::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1.6em !important;
    height: 1.6em !important;
    border: 2px solid color-mix(in srgb, var(--secondary-color, #bce0f7) 60%, transparent) !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Selected state with dynamic colors */
.codplugin-shipping-input:checked + .codplugin-shipping-label::before {
    background-color: var(--primary-color, #007AFF) !important;
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: inset 0 0 0 3px #fff !important;
    transform: scale(1.1) !important;
}

/* Focus state with dynamic colors */
.codplugin-shipping-input:focus + .codplugin-shipping-label::before {
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent) !important;
    outline: none !important;
}

/* Preset 2 Layout Styles */
.codform-preset-2 #codplugin-preset2-shipping {
    margin-top: 20px !important;
    padding-top: 15px !important;
    border-top: 1px dashed color-mix(in srgb, var(--secondary-color, #bce0f7) 30%, transparent) !important;
}

.codform-preset-2 .shipping-preset2-title {
    margin-bottom: 10px !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    text-align: center !important;
    color: var(--primary-color, #007AFF) !important;
}

/* Horizontal layout for shipping options */
.codform-preset-2 #shipping-methods {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-left: 0 !important;
}

.codform-preset-2 .codplugin-shipping-option {
    margin-bottom: 0 !important;
    border: 2px solid transparent !important;
    padding: 0 !important;
}

/* Adjust label for horizontal layout with dynamic colors */
.codform-preset-2 .codplugin-shipping-label {
    padding: 0.75rem calc(2.1em + 0.75rem) 0.75rem 1rem !important;
    border: 2px solid color-mix(in srgb, var(--secondary-color, #bce0f7) 40%, transparent) !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: 1.6em !important;
    margin-left: 0.5em !important;
    margin-right: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.codform-preset-2 .codplugin-shipping-label:hover {
    border-color: color-mix(in srgb, var(--primary-color, #007AFF) 40%, transparent) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color, #007AFF) 15%, transparent) !important;
}

/* Adjust ::before position within the padded label */
.codform-preset-2 .codplugin-shipping-label::before {
    left: auto !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border: 2px solid color-mix(in srgb, var(--secondary-color, #bce0f7) 60%, transparent) !important;
}

/* Selected state style with dynamic colors */
.codform-preset-2 .codplugin-shipping-input:checked + .codplugin-shipping-label {
    padding-left: 1em !important;
    padding-right: 1em !important;
    border-color: var(--primary-color, #007AFF) !important;
    background: linear-gradient(135deg, var(--primary-color, #007AFF) 0%, var(--secondary-color, #5856D6) 100%) !important;
    color: white !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color, #007AFF) 25%, transparent) !important;
}

.codform-preset-2 .codplugin-shipping-input:checked + .codplugin-shipping-label::before {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0.5rem !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    z-index: -1 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Focus state for preset 2 */
.codform-preset-2 .codplugin-shipping-input:focus + .codplugin-shipping-label {
    border-color: var(--primary-color, #007AFF) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent) !important;
}

/* Ensure default preset styles don't interfere */
.codform-preset-1 #shipping-methods {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-left: 10px !important;
    align-items: center !important;
}

.codform-preset-1 .codplugin-shipping-label {
    padding-left: 2.4em !important;
    line-height: 1.6em !important;
    margin-right: 0.5em !important;
}

.codform-preset-1 .codplugin-shipping-label::before {
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 1.6em !important;
    height: 1.6em !important;
    border-radius: 50% !important;
}

/* RTL Support */
.rtl #shipping-methods {
    margin-left: 0px !important;
    margin-right: 10px !important;
}

.rtl .codplugin-shipping-label {
    padding-left: 0.5em !important;
    padding-right: 2.4em !important;
    margin-right: 0 !important;
    margin-left: 0.5em !important;
}

.rtl .codplugin-shipping-label::before {
    left: auto !important;
    right: 0 !important;
}

.rtl .codform-preset-2 .codplugin-shipping-label {
    margin-left: 0 !important;
    margin-right: 0.5em !important;
    padding: 0.75rem 1rem 0.75rem calc(2.1em + 0.75rem) !important;
}

.rtl .codform-preset-2 .codplugin-shipping-label::before {
    left: 0.75rem !important;
    right: auto !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    #shipping-methods {
        gap: 8px !important;
    }
    
    .codform-preset-2 .codplugin-shipping-label {
        padding: 0.5rem calc(1.8em + 0.5rem) 0.5rem 0.75rem !important;
        font-size: 0.9em !important;
    }
    
    .codplugin-shipping-label::before {
        width: 1.4em !important;
        height: 1.4em !important;
    }
}

@media (max-width: 480px) {
    #shipping-methods {
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .codplugin-shipping-label {
        padding: 0.5rem 1rem !important;
        text-align: center !important;
    }
    
    .codplugin-shipping-label::before {
        width: 1.2em !important;
        height: 1.2em !important;
    }
}

/* Smart Layout for Variations Swatches */
.cfvsw-swatches-container {
    /* Always center the swatches */
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
}

/* Ensure all swatches are centered regardless of count */
.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(-n+2)) {
    justify-content: center !important;
}

.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+3)) {
    justify-content: center !important;
}

/* Force center alignment for all swatch groups */
.cfvsw-swatches-container > * {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* Ensure reset button is always visible */
.reset_variations {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Override any potential hiding */
.reset_variations[style*="display: none"],
.reset_variations[style*="visibility: hidden"] {
    display: block !important;
    visibility: visible !important;
}

/* Reset button positioning */
.reset_variations {
    position: absolute !important;
    left: 8px !important;
    top: 8px !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #555 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    z-index: 10 !important;
    line-height: 1.3 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    white-space: nowrap !important;
    display: block !important;
    visibility: visible !important;
}

.reset_variations:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--primary-color, #007AFF) !important;
    color: var(--primary-color, #007AFF) !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color, #007AFF) 20%, transparent) !important;
}

/* RTL Support for reset button */
.rtl .reset_variations {
    left: auto !important;
    right: 190px !important;
}

/* Ensure swatches don't stretch unnecessarily */
.cfvsw-swatches-option {
    flex: 0 0 auto !important;
    max-width: none !important;
}

/* Compact layout for many swatches */
.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+5)) {
    gap: 6px !important;
    padding: 10px !important;
}

.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+5)) .cfvsw-swatches-option {
    min-width: 50px !important;
    min-height: 50px !important;
    font-size: 11px !important;
    padding: 6px !important;
    border-radius: 10px !important;
}

/* Ultra compact for very many swatches */
.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+8)) {
    gap: 4px !important;
    padding: 8px !important;
}

.cfvsw-swatches-container:has(.cfvsw-swatches-option:nth-child(n+8)) .cfvsw-swatches-option {
    min-width: 45px !important;
    min-height: 45px !important;
    font-size: 10px !important;
    padding: 4px !important;
    border-radius: 8px !important;
}

/* Animation for shipping options */
.codplugin-shipping-option {
    animation: shippingOptionAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes shippingOptionAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover animation for shipping labels */
.codplugin-shipping-label:hover {
    transform: translateY(-1px) !important;
}

/* Selected state animation */
.codplugin-shipping-input:checked + .codplugin-shipping-label {
    animation: shippingOptionSelect 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes shippingOptionSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================
   ADDITIONAL DROPDOWN FIXES
   ======================================== */

/* Force visibility for all dropdown elements */
.cfvsw-swatches-container select,
.cfvsw-swatches-container .cfvsw-swatch-select,
select[name*="attribute_"],
select[id*="pa_"],
select[id*="attribute_"] {
    /* Force visibility */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Ensure proper height */
    height: auto !important;
    min-height: 50px !important;
    /* Force text color */
    color: #333 !important;
    /* Remove any transparent backgrounds */
    background-color: rgba(255, 255, 255, 0.95) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* Override any plugin styles that might hide dropdowns */
.cfvsw-swatches-container select[style*="display: none"],
.cfvsw-swatches-container select[style*="visibility: hidden"],
.cfvsw-swatches-container select[style*="opacity: 0"],
select[name*="attribute_"][style*="display: none"],
select[name*="attribute_"][style*="visibility: hidden"],
select[name*="attribute_"][style*="opacity: 0"],
select[id*="pa_"][style*="display: none"],
select[id*="pa_"][style*="visibility: hidden"],
select[id*="pa_"][style*="opacity: 0"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure dropdown options are visible */
.cfvsw-swatches-container select option,
.cfvsw-swatches-container .cfvsw-swatch-select option,
select[name*="attribute_"] option,
select[id*="pa_"] option,
select[id*="attribute_"] option {
    /* Force visibility */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Ensure proper colors */
    background-color: rgba(255, 255, 255, 0.98) !important;
    color: #333 !important;
    /* Remove any transparent backgrounds */
    background-image: none !important;
}

/* Override any plugin styles for options */
.cfvsw-swatches-container select option[style*="display: none"],
.cfvsw-swatches-container select option[style*="visibility: hidden"],
.cfvsw-swatches-container select option[style*="opacity: 0"],
select[name*="attribute_"] option[style*="display: none"],
select[name*="attribute_"] option[style*="visibility: hidden"],
select[name*="attribute_"] option[style*="opacity: 0"],
select[id*="pa_"] option[style*="display: none"],
select[id*="pa_"] option[style*="visibility: hidden"],
select[id*="pa_"] option[style*="opacity: 0"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for WooCommerce variation dropdowns */
.variations select,
.variations .value select,
table.variations select {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    min-height: 50px !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.variations select option,
.variations .value select option,
table.variations select option {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
} 