ul.wcs-swatches-modal li {
    width: 100%;
    border:1px solid #eee !important;
    display: flex; 
    padding: 10px;
}


.wcs-swatches {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}


.wcs-swatches li {
    margin: 5px;
    width: 52px;
    height: 52px;
    border: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}



.wcs-swatches li.selected {
    border: 2px solid #000;
}


.wcs-view-more {
    /*margin-left: auto;*/
    padding: 28px 10px;
    border: none;
    cursor: pointer;
    height: 33px;
    display: flex;
    align-items: center;
}

/* Disable scrolling when modal is open */
.wcs-no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Ensure modal has its own scroll */
.wcs-modal-content {
    max-height: 80vh; /* Limit modal height */
    overflow-y: auto; /* Enable scroll inside modal */
}

.wcs-swatch-info {
    margin-right: 5px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wcs-color-dot {
    width: 20px; 
    height: 20px;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid #ccc;
}





.wcs-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y:hidden; /* Enable vertical scrolling for the modal */
}

.wcs-modal-content {
    z-index: 9999;
    background-color: #fff;
    margin:3.5% auto; /* Adjusted margin for better responsiveness */
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 550px;
    position: relative;
    max-height: 90vh; /* Limit modal height to 90% of viewport height */
    overflow-y: hidden; /* Enable vertical scrolling for modal content */
    box-sizing: border-box; /* Ensure padding is included in width/height */
}

.wcs-close-modal {
    position: absolute;
    right: 24px;
    top: 10px;
    font-size: 34px;
    cursor: pointer;
}

.wcs-swatches-modal {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-right: 10px;
}

.jsb-modal {
    max-height: 80vh;
    overflow-y: auto;
    direction: ltr; /* Ensure left-to-right direction */
    text-align: left; /* Align text properly */
}

.wcs-swatches-modal li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.wcs-swatch {
    width: 41px;
    height: 36px;
    border: 1px solid #ccc;
    margin-right: 10px;
}

.wcs-swatch-label {
    font-size: 14px;
    font-weight:bold;
}

.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .wcs-modal-content {
        margin: 10% auto; /* Increase margin for smaller screens */
        padding: 15px; /* Reduce padding for smaller screens */
        width: 95%; /* Increase width for smaller screens */
    }

    .wcs-swatches-modal li {
        /*flex-direction: column; */
        /*align-items: flex-start;*/
    }

    .wcs-swatch {
        margin-bottom: 5px;
        margin-top: 5px;
        margin-left: 5px;
    }
    
    
}

@media (max-width: 768px) {
.wcs-swatches-wrapper
    {
    width:70% !important; 
    }
    
    .wcs-scroll-container
    {
    width:100% !important; 
    }
    
}


@media (max-width: 400px) {
    .wcs-modal-content {
        margin: 15% auto; /* Adjust margin for very small screens */
        padding: 10px; /* Reduce padding further */
    }

    .wcs-swatch {
        width: 25px; /* Reduce swatch size for very small screens */
        height: 25px;
    }

    .wcs-swatch-label {
        font-size: 12px; /* Reduce font size for very small screens */
    }
    
    .wcs-swatches-wrapper {
    width:38% !important;
    }
    
    .wcs-scroll-container {
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
      white-space: nowrap;
      padding: 5px 0;
      max-width: 100%;
      scroll-behavior: smooth;
    }

    .wcs-scroll-container::-webkit-scrollbar {
      display: none; /* optional: hide scrollbar */
    }

} 

#tbay-header
{
position: unset !important;
}

.wcs-modal-content h3 {
    margin-top: 0;
    text-align: left;
    font-weight: bold;
    font-size: 30px;
}

span.wcs-swatch-label {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-direction: row-reverse;
}


.wcs-swatches-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width:64.4%;
}

.wcs-scroll-container {
    overflow-x: hidden;
    white-space: nowrap;
    padding: 5px 0;
    max-width: 100%;
}

/* Base swatch styles */
.wcs-swatches {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0px !important;
    min-width: max-content;
}

/* Hide buttons initially */
.wcs-scroll-left,
.wcs-scroll-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    padding: 4px;
    cursor: pointer;
    display: none;
    width: 52px !important;
    height: 52px !important;
    transition: all 0.2s ease;
}

button.wcs-scroll-left svg {
 transform: rotate(90deg) !important;
}

.wcs-scroll-left {
    left: 47px !important;
}

.wcs-scroll-right {
    right: 5px !important;
}

button.wcs-scroll-right svg {
    transform: rotate(270deg) !important;
}

/* Show arrows on hover of wrapper */
.wcs-swatches-wrapper:hover .wcs-scroll-left,
.wcs-swatches-wrapper:hover .wcs-scroll-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show left arrow when hovering the first swatch */
.wcs-swatches li:first-child:hover ~ .wcs-scroll-left,
.wcs-swatches li:first-child:hover + .wcs-scroll-left {
    display: none !important;
}

/* Show right arrow when hovering the last swatch */
.wcs-swatches li:last-child:hover ~ .wcs-scroll-right,
.wcs-swatches li:last-child:hover + .wcs-scroll-right {
    display: none !important;
}


/*Scrollbar CSS*/

.jsb-modal::-webkit-scrollbar {
    width: 8px; /* Scrollbar width */
}

.jsb-modal::-webkit-scrollbar-track {
    background: #fff; /* Track color */
    border-radius: 10px;
}

.jsb-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #D1D5DB, #D1D5DB); /* Gradient thumb */
    border-radius: 10px;
    transition: background 0.3s;
}

.jsb-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #D1D5DB, #D1D5DB); /* Darker gradient on hover */
}

