.swatch-control {
    overflow:hidden;
}

.swatch-control select {
	display: none !important;
}

.swatch-control .select2-container {
    display:none !important;
}

.swatch-control.radio-select ul {
	padding:1px !important;
	margin:0 !important;
	list-style: none !important;
}

.swatch-control.radio-select li {
	list-style: none !important;
}

.swatch-control.radio-select li label {
	display:inline;
	margin-left:10px;
}

.swatch-wrapper {
    padding:2px;
    background:#fff;
    border:1px solid #ccc; /* this is grey, change to what you want */
    float:left;
    margin:0 5px 5px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}


.swatch-wrapper:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swatch-wrapper.disabled:hover { /* will need jquery or something for < IE8 to allow hover on other items.., or use jquery to add class to it on hover and target that */
    border-color:#ccc; /* this is black, change to waht you want */
    transform: none;
    box-shadow: none;
}

.swatch-wrapper a {
    display:block;
}

.swatch-wrapper img { /* for images */
    width: 100px !important;
    height: 100px !important;
    object-fit: cover;
    border-radius: 4px;
}

/* Ensure all swatch images are properly sized */
.swatch-wrapper img,
.swatch-anchor img,
.radio-swatch-wrapper img,
.swatch-option img {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover;
    border-radius: 4px;
}

/* Swatch preview images in popup */
.swatch-preview img {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ccc;
}

div.swatch-wrapper.selected  {
    border:2px solid green; /* this is grey, change to what you want */
    padding:1px;
}


div.swatch-wrapper.disabled, div.swatch-wrapper.disabled a, .radio-select .disabled {

    cursor: not-allowed;

    /* Required for IE 5, 6, 7 */	
    zoom:1; 
    /* Theoretically for IE 8 & 9 (more valid) */	
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    /* This works in IE 8 & 9 too */
    /* ... but also 5, 6, 7 */
    filter: alpha(opacity=50);
    /* Older than Firefox 0.9 */
    -moz-opacity:0.5;
    /* Safari 1.x (pre WebKit!) */
    -khtml-opacity: 0.5;
    /* Modern!
    /* Firefox 0.9+, Safari 2?, Chrome any?
    /* Opera 9+, IE 9+ */
    opacity: 0.5;
}

/* Enhanced disabled state for regular swatches */
div.swatch-wrapper.disabled {
    position: relative;
    cursor: not-allowed;
    pointer-events: none; /* Prevent any interactions */
}

div.swatch-wrapper.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    pointer-events: none;
}

div.swatch-wrapper.disabled:hover::before {
    content: 'Out of stock';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* Radio swatch wrapper styles */
.radio-swatch-wrapper {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.radio-swatch-wrapper.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.radio-swatch-wrapper.disabled:hover {
    transform: none;
    box-shadow: none;
}

.radio-swatch-wrapper.selected {
    border: 2px solid #007cba !important;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.radio-swatch-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.radio-swatch-label .swatch-wrapper {
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.radio-swatch-wrapper:hover .swatch-wrapper {
    border-color: #007cba;
}

.radio-swatch-wrapper.selected .swatch-wrapper {
    border-color: #007cba;
}

/* Hide the actual radio inputs */
.radio-option {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Ensure swatches are properly sized */
.radio-swatch-wrapper .swatch-wrapper {
    margin: 0;
    float: none;
}

.radio-swatch-wrapper .swatch-wrapper a {
    display: block;
    text-decoration: none;
}

/* Disabled state for radio swatches */
.radio-swatch-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
    pointer-events: none; /* Prevent any interactions */
}

.radio-swatch-wrapper.disabled .swatch-wrapper {
    border-color: #ccc !important;
}

.radio-swatch-wrapper.disabled .text-swatch {
    background: #f1f3f4 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed;
}

/* Add a subtle overlay to disabled swatches */
.radio-swatch-wrapper.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    pointer-events: none;
}

/* Enhanced disabled state for text swatches */
.radio-swatch-wrapper.disabled .text-swatch {
    background: #f1f3f4 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
    pointer-events: none; /* Prevent any interactions */
}

/* Hover effect for disabled swatches - show tooltip */
.radio-swatch-wrapper.disabled:hover::before {
    content: 'Out of stock';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.radio-swatch-wrapper.disabled:hover::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Ensure proper spacing in different layouts */
.radio-swatch-control .radio-swatch-wrapper {
    flex: 0 0 auto;
}


/* Selected state with better visual feedback */
.radio-swatch-wrapper.selected .swatch-wrapper {
    border-color: #007cba !important;
    box-shadow: 0 0 8px rgba(0, 124, 186, 0.4);
}

/* Text swatch styling */
.text-swatch {
    min-width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Text swatch in selected state */
.radio-swatch-wrapper.selected .text-swatch {
    background: #007cba;
    color: white;
    border-color: #007cba;
    box-shadow: 0 0 8px rgba(0, 124, 186, 0.4);
}

/* Text swatch in disabled state */
.radio-swatch-wrapper.disabled .text-swatch {
    background: #f1f3f4;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.radio-swatch-wrapper.disabled .text-swatch:hover {
    background: #f1f3f4;
    border-color: #ddd;
    transform: none;
    box-shadow: none;
}

/* Responsive text swatches */
@media (max-width: 768px) {
    .text-swatch {
        min-width: 50px;
        height: 36px;
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Responsive design for radio swatches */
@media (max-width: 768px) {
    .radio-swatch-control {
        gap: 3px;
    }
    
    .radio-swatch-wrapper {
        margin-bottom: 5px;
    }
    
    .radio-swatch-wrapper:hover {
        transform: scale(1.02);
    }
}

/*---------------------------------------------------------------------------------------------
        Radio Swatches Styling
---------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------
        Admin Table
---------------------------------------------------------------------------------------------*/
table.wcsap_input {
    border: 0 none;
}

table.wcsap_input tbody tr td {
    padding: 10px;
}

table.wcsap_input tr.field_save {

}

table.wcsap_input tbody tr:last-child td {
    border-bottom: 0 none;
}

table.wcsap_input tbody tr td.label {
    width: 24%;
    vertical-align: top;
    border-right: #ebebeb solid 1px;
}

table.wcsap_input td.label ul.hl {
    margin: 20px 0 0;
}
table.wcsap_input td.label ul.hl li {
    margin: 0 3px 0 0;

}

table.wcsap_input td.label ul.hl li a.wcsap-button {
    font-size: 12px;
    padding: 6px 10px;
    font-weight: normal;
}

table.wcsap_input tbody tr td.label label{
    display: block;
    font-size: 12px;
    font-weight: bold;
    padding: 0;
    margin: 0;
    color: #333;

}

table.wcsap_input tbody tr td.label label span.required {
    color: #f00;
    display: inline;
    margin-right: 5px;
}


table.wcsap_input tbody tr td.label p{
    display: block;
    font-size: 12px;
    padding: 6px 0 !important;
    margin: 0 !important;
    font-style: normal;
    line-height: 16px;
    color: #666;
}

table.wcsap_input input[type=text],
table.wcsap_input textarea,
table.wcsap_input select{
    width: 99.95%;
    padding: 5px;
    outline: none;
}

table.wcsap_input select {
    padding: 2px;
}

table.wcsap_input input[type=text]:focus,
table.wcsap_input textarea:focus,
table.wcsap_input select:focus {
    border-color:#98B6CB;
}



/*---------------------------------------------------------------------------------------------
        Table
---------------------------------------------------------------------------------------------*/
table.widefat.wcsap {
    border: 0 none;
    background: transparent none;
}

table.widefat.wcsap td {
    border: 0 none;
}

.wcsap,
.wcsap tr,
.wcsap tr td {
    vertical-align: top;
}

.wcsap tr th span {
    color: #666;
    font-size: 10px;
    line-height: 1.2;
    font-weight: normal;
    text-shadow: 0 1px 0 #FFFFFF;
}

.wcsap tr td.field_preview,
.wcsap tr th.field_preview  {
    text-indent: 32px;
    width:25%;
}

.wcsap tr td.field_label,
.wcsap tr th.field_label  {
    width: 25%;
}

.wcsap tr td.field_name,
.wcsap tr th.field_name  {
    width: 25%;
}

.wcsap tr td.field_type,
.wcsap tr th.field_type  {
    width: 25%;
}

.wcsap tr td {
    background: transparent;
    padding: 8px;
    position: relative;
    font-size: 12px;
}



.wcsap tr td.attribute_swatch_label,
.wcsap tr th.attribute_swatch_label  {
    width: 50%;
}

.wcsap tr td.attribute_swatch_type,
.wcsap tr th.attribute_swatch_type  {
    width: 50%;
    text-align: right;
}


/*---------------------------------------------------------------------------------------------
        Fields Header
---------------------------------------------------------------------------------------------*/
.fields_header {
    -moz-border-radius: 3px 3px 0 0; 
    -webkit-border-radius: 3px 3px 0 0; 
    -khtml-border-radius: 3px 3px 0 0; 
    border-radius: 3px 3px 0 0; 
    border: #DFDFDF solid 1px;
    border-bottom: 0 none;
}


/*---------------------------------------------------------------------------------------------
        Field Meta
---------------------------------------------------------------------------------------------*/

#swatches .wcsap_field_meta {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

#swatches .field .wcsap_field_meta {
    border: #DFDFDF solid 1px;
    border-top: 0 none;
}

#swatches .field .wcsap_field_meta strong {
    display: block;
    padding-bottom: 6px;
    font-size: 13px;
    line-height: 13px;
}

#swatches .field .wcsap_field_meta .row_options {
    font-size: 12px;
    line-height: 12px;
    visibility: hidden;
}

#swatches .field .wcsap_field_meta:hover .row_options {
    visibility: visible;
}

#swatches .field.form_open > .wcsap_field_meta {
    background-color: #6e6e6e;
    color: #fff;
    text-shadow: #000 0 1px 0;
    border: #565656 solid 1px;
    /*border-top: #565656 solid 1px;
    border-left:0 none;
    border-right:0 none;*/

}

#swatches .field.form_open > .wcsap_field_meta td,
#swatches .field.form_open > .wcsap_field_meta a {
    color: #fff;
}

#swatches .field.form_open > .wcsap_field_meta a:hover {
    color: #ff8a4f;
}

#swatches .fields .field .wcsap_field_meta .circle {
    width: 20px;
    height: 20px;
    text-align: center;
    font-size: 11px;
    line-height: 20px;
    display: block;
    float: left;
    margin: 7px 0 0 7px;
    text-indent: 0;
    background: url(../images/sprite.png) 0 -350px no-repeat;
}

#swatches .fields .field:nth-child(2n) .wcsap_field_meta .circle {
    background-position: 0 -400px;

}

#swatches .field.form_open > .wcsap_field_meta .circle {
    background-position: 0 -300px !important;
}


.fields {
    position: relative;
    background: #FCFCFC;
    box-shadow: inset 0 0 0 1px #DFDFDF;
}

.fields .field {
    position: relative;
    overflow: hidden;
    background: #F9F9F9;
}


/*---------------------------------------------------------------------------------------------
        Field Options
---------------------------------------------------------------------------------------------*/
.field_options {
    background: #DFDFDF;
    position: relative;
    overflow: hidden;
}

.field_options .field_option {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 6px;
}

.field_options .field_option.open {
    display: block;
}

.field_options .field_option table {
    border: #CCCCCC solid 1px;
    border-radius: 5px;
}


.field_save td {
    line-height: 25px;
}




/*---------------------------------------------------------------------------------------------
        Field Form
---------------------------------------------------------------------------------------------*/
.field_form {
    border: #7390a5 solid 1px;
    border-top: 0 none;
    background: #DADADA;
    padding: 10px;
    clear: both;
    vertical-align: top;
}

.field_form table.wcsap_input {
    border: #7390a5 solid 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.field_form table.wcsap_input tr.field_label td {
    border-top: 0 none;
}

.field_form table.wcsap_input td {
    background: transparent;
    border-bottom-color: #DFDFDF;
    border-top-color: #FFFFFF;
}

.field_form_mask {
    display: none;
    width: 100%;
    position: relative;
    overflow: hidden;
    clear: both;
}


table.wcsap_input .field_option_color input.woo-color {
    width: 92.95%;
    padding: 5px;
    outline: none;
    margin-left: 5px;
}

/* Unselected state styling */
.radio-swatch-wrapper:not(.selected) .text-swatch {
    background: #f8f9fa;
    color: #333;
    border-color: #ddd;
    transition: all 0.2s ease;
}
/* Ensure regular swatches also start unselected */
.select-option:not(.selected) {
    opacity: 1;
    transition: all 0.2s ease;
}

.select-option:not(.selected):hover {
    transform: scale(1.05);
}

/* Default state for swatch labels */
.swatch-label:empty,
.swatch-label:contains('&nbsp;') {
    color: #999;
    font-style: italic;
}

/* Enhanced unselected state for better UX */
.radio-swatch-wrapper:not(.selected):not(.disabled) {
    cursor: pointer;
}

.radio-swatch-wrapper:not(.selected):not(.disabled):hover {
    transform: scale(1.02);
}

/* Focus state for accessibility */
.radio-swatch-wrapper:not(.selected):not(.disabled):focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Swatch Popup Styles */
.swatch-popup-overlay {
    display: flex ;
        flex-wrap: wrap;
        flex-direction: column;
        position: fixed;
        top: 8px;
        right: 8px;
        bottom: 8px;
        border-radius: 12px;
        z-index: 200;
        width: calc(100vw - 64px);
        max-width: 440px;
        padding: 0 16px 16px;
        background: #fff;
        visibility: hidden;
        pointer-events: none;
        will-change: transform;
        transform: translateX(100%);
        transition: all 0.3s;
        z-index: 9999;
}

.swatch-popup-overlay.active {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.swatch-popup {
   
}

.swatch-popup-overlay.active .swatch-popup {

}

.swatch-popup-content {
 
}

.swatch-popup-content h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    line-height: 1.3;
}

.swatch-preview {
  
}

.swatch-preview .swatch-wrapper {

}

.swatch-preview .swatch-wrapper:hover {

}

/* Swatch Options Grid */
.swatch-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    overflow-y: auto;
}

/* Swatch Trigger Button and Container */
.swatch-trigger-container {
    padding: 15px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.swatch-trigger-container:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}



.swatch-trigger-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.2);
}

.swatch-trigger-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.swatch-trigger-btn:active {
    transform: translateY(0);
}

/* Loading state for trigger buttons */
.swatch-trigger-btn.js-loading {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.swatch-trigger-btn.js-loading:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.swatch-trigger-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.swatch-trigger-btn:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Hide original swatches */
.swatch-control .select-option,
.swatch-control .radio-swatch-wrapper {
    display: none !important;
}

/* Ensure trigger containers are visible immediately */
.swatch-trigger-container {
    padding: 12px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: center;
}

/* Style the new variation layout */
.variations {
    margin-bottom: 20px;
    display: none;
}

.variation-row {
    margin-bottom: 15px;
}

.variation-row .variation-label {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}


.variation-label label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.variation-value {
    flex: 1;
}

/* Hide the original dropdown but keep it functional */
.variation-value select {
    display: none !important;
}

/* Force remove any selected states from swatches */
.swatch-control .select-option.selected,
.swatch-control .radio-swatch-wrapper.selected {
    display: none !important;
}



/* Responsive adjustments for trigger */
@media (max-width: 768px) {
    .swatch-trigger-container {
        padding: 12px;
    }
    
    .swatch-trigger-btn {
        padding: 14px 18px;
        font-size: 13px;
    }
    

}

.swatch-option {
    position: relative;
}


.swatch-preview:hover img {
    border-color: #e3ab61 !important;
}

.swatch-option.selected img {
    border-color:  #e3ab61 !important;
}

.swatch-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.variation-label {
    display: none;
}

.swatch-option.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
}

.swatch-option .swatch-preview {

}

.swatch-option .swatch-preview .swatch-wrapper {

}

.swatch-option .swatch-preview .swatch-wrapper:hover {

}

.swatch-option .swatch-label {

}

/* Selected indicator */
.swatch-option.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e3ab61;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .swatch-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 10px;
        max-height: 250px;
    }
    
    .swatch-option {
        padding: 12px 8px;
    }
    
    .swatch-option .swatch-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .swatch-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .swatch-option {
        padding: 10px 6px;
    }
}

.swatch-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.swatch-select-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.swatch-select-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .swatch-popup {
        width: 95%;
        margin: 20px;
        border-radius: 8px;
    }
    
    .swatch-popup-content {
        padding: 25px 20px;
    }
    
    .swatch-popup-content h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .swatch-preview {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .swatch-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .swatch-select-btn,
    .swatch-close-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 14px;
    }
}

/* Animation for popup entrance */
@keyframes swatchPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes swatchPopupSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
}

/* Loading state for popup */
.swatch-popup.loading .swatch-popup-content {
    opacity: 0.7;
    pointer-events: none;
}

.swatch-popup.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body class styling when swatch popup is open */
body.swatch-container-open {
    overflow: hidden;
}

body.swatch-container-open .swatch-popup-overlay {
    z-index: 999999;
}

body.swatch-container-open .swatch-popup-overlay.active {
    z-index: 999999;
}

/* Woostify overlay styling when swatch popup is open */
body.swatch-container-open #woostify-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Styling for the new Choose button */
.swatch-choose-btn {
    background: #f0b450;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%
}

.swatch-choose-btn:hover:not(:disabled) {
    background: #f0b450;
}

.swatch-choose-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.swatch-choose-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

/* Update swatch actions container for better button layout */
.swatch-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Variations Selected Container */
.variations-selected {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.variations-selected-header h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.variations-selected-content {
    margin-bottom: 20px;
}

.variation-selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.variation-selected-item:last-child {
    border-bottom: none;
}

.variation-selected-label strong {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.variation-selected-value {
    text-align: right;
    min-width: 80px;
}

.variation-selected-value .no-selection {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.variation-selected-value .selected-value {
    color: #28a745;
    font-weight: 500;
    font-size: 13px;
}

/* Swatch image display in variations-selected */
.variation-selected-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.variation-selected-display .swatch-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    object-fit: cover;
}

.variation-selected-display .swatch-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.variation-selected-display .swatch-text {
    flex: 1;
    min-width: 0;
}

.variations-selected-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.variations-selected-footer .reset_variations {
    display: inline-block;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.variations-selected-footer .reset_variations:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .variations-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .variations-selected {
        padding: 15px;
    }
    
    .variation-selected-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .variation-selected-value {
        text-align: left;
        min-width: auto;
    }
}

/* Out of stock and disabled swatch indicators */
.out-of-stock-indicator,
.not-available-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.not-available-indicator {
    background: rgba(128, 128, 128, 0.9);
}

/* Enhanced disabled state for swatches */
.swatch-wrapper.disabled,
.select-option.disabled,
.radio-swatch-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    position: relative;
}

.swatch-wrapper.disabled:hover,
.select-option.disabled:hover,
.radio-swatch-wrapper.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ccc !important;
}

/* Out of stock swatches */
.swatch-wrapper.out-of-stock,
.select-option.out-of-stock,
.radio-swatch-wrapper.out-of-stock {
    opacity: 0.6;
    cursor: not-allowed !important;
    position: relative;
}

.swatch-wrapper.out-of-stock:hover,
.select-option.out-of-stock:hover,
.radio-swatch-wrapper.out-of-stock:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ff0000 !important;
}

/* Not available swatches */
.swatch-wrapper.not-available,
.select-option.not-available,
.radio-swatch-wrapper.not-available {
    opacity: 0.4;
    cursor: not-allowed !important;
    position: relative;
}

.swatch-wrapper.not-available:hover,
.select-option.not-available:hover,
.radio-swatch-wrapper.not-available:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #808080 !important;
}

/* Ensure disabled swatches can't be clicked */
.swatch-wrapper.disabled a,
.select-option.disabled a,
.radio-swatch-wrapper.disabled input[type="radio"] {
    pointer-events: none;
}

/* Visual feedback for out-of-stock clicks */
.clicked-out-of-stock {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.swatch-option {
    width: calc((100% - 32px) / 3)!important;
    padding: 0;
}

.swatch-preview {
    width: 100%;
    padding: 0;
    margin: 0;
}

a.swatch-anchor {
    display: block;
    width: 100% !important;
    aspect-ratio: 1 !important;
    height: auto !important;
}

img.wp-post-image.swatch-photopa_color_swatches_id.swatch-img {
    width: 100% !important;
    aspect-ratio: 1;
    height: 100% !important;
}

.swatch-options-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}