/* Size Chart Button */
.size-chart-button-container {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.evp-colors-container h3 .size-chart-button-container,
.evp-sizes-container h3 .size-chart-button-container,
.select-sizes-quantities-heading .size-chart-button-container {
    margin-top: 0;
    margin-bottom: 0;
}

 .size-chart-button {
    background-color: transparent !important;
    text-decoration: underline;
    color: #000000 !important;
    padding: 5px 12px !important;
    font-size: 14px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    font-family: 'Arial Rounded MT Pro';
    gap: 6px;}

.size-chart-button::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('/wp-content/uploads/2025/05/size-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    top: -1px;
}


.evp-colors-container h3 .size-chart-button,
.evp-sizes-container h3 .size-chart-button,
.select-sizes-quantities-heading .size-chart-button {
    font-size: 12px !important;
    padding: 3px 10px !important;
}

/* No size chart message */
.no-size-chart-message {
    display: inline-block;
    font-style: italic;
    color: #777;
    margin: 5px 0;
    font-size: 14px;
}

/* Size Chart Modal */
.size-chart-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.size-chart-modal-content {
    background-color: #fff;
    max-width: 1000px;
    overflow: auto;
    border: 1px solid #888;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.size-chart-modal-content.image-modal {
    max-height:70vh;
}
body.modal-open {
    overflow: hidden;
    padding-right: 17px;
}


.size-chart-close {
    position: absolute;
    top: 11px;
    right: 20px;
    color: #000000;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}

.size-chart-modal h2 {
    margin-top: 0;
    margin-bottom: 0px;
    font-size: 24px;
    text-align: center;
    padding-block:15px;
}

.size-chart-content {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding:0px 0 0 15px;
}

.size-chart-image {
    text-align: center;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
}

.size-chart-image img {
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.size-chart-pdf {
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pdf-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    position: relative;
}

.size-chart-pdf object.pdf-object {
    width: 100%;
    height: 500px;
    border: none;
    min-width: 100%;
    background: white !important;
    background-color: white !important;
}

/* Force white background for the object container */
.pdf-scroll-wrapper {
    background-color: white !important;
}

/* Target the object's internal document */
object.pdf-object::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white !important;
    z-index: -1;
}

/* PDF object styling for Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .size-chart-pdf object.pdf-object {
            width: 100% !important;
            height: 500px !important;
            min-height: 500px !important;
            max-width: 100% !important;
            transform: scale(1.0) !important;
        }
        
        .pdf-scroll-wrapper {
            background-color: white !important;
            min-height: 500px;
        }
    }
}

/* Fallback content styling */
.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    background-color: white;
    text-align: center;
}

.pdf-fallback p {
    margin-bottom: 20px;
}

/* Create an overlay to prevent interaction with PDF controls */
.pdf-scroll-wrapper::before {
}

/* Responsive Styles */
@media(min-width:768px){
        .download-pdf-container{
        padding-top:5px!important;
    }
}
@media (max-width: 767px) {
    .size-chart-modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 5px;
        max-height: 80vh;
        overflow: auto;
    }
    
    .size-chart-content {
        width: 100%;
        overflow: visible;
    }
    
    .size-chart-modal h2 {
        font-size: 20px;
    }
    
    .size-chart-pdf {
        min-height: auto;
        width: 100%;
        overflow: visible;
    }
    
    /* Hide desktop PDF viewer */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile download button */
    .mobile-only {
        display: block !important;
    }
    
    /* Style the download container for mobile */
    .download-pdf-container {
        padding: 20px 10px;
    }
    
    .download-pdf-container p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
} 
#viewerContainer:not(.pdfPresentationMode),
#outerContainer,
.pdfViewer,
.page,
.canvasWrapper,
.textLayer,
#viewerContainer,
#mainContainer,
#sidebarContainer,
#thumbnailView,
#toolbarSidebar,
#toolbarContainer,
.dropdownToolbarButton,
.secondaryToolbarButton,
.overlayButton,
.splitToolbarButton,
.toolbarButton,
.toolbar,
#viewerContextMenu,
#loadingBar,
body {
    background: white !important;
    color: #000 !important;
}

/* Force white background for the entire PDF viewer */
.size-chart-modal {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Target the PDF viewer's container */
.size-chart-modal-content {
    background-color: #fff;
}

/* Target the PDF iframe directly */
.pdf-iframe {
    background-color: white !important;
}

/* Force white background on the iframe and its contents */
.pdf-iframe,
.pdf-iframe html,
.pdf-iframe body,
.pdf-iframe div {
    background-color: white !important;
}

/* Target the viewer container inside the iframe */
.size-chart-modal-content iframe {
    background: white !important;
}

/* Style to override the PDF viewer's dark sidebars */
.pdf-iframe::before,
.pdf-iframe::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    background-color: white;
    z-index: 9999;
}

.pdf-iframe::before {
    left: -100px; /* Position to the left of the iframe */
}

.pdf-iframe::after {
    right: -100px; /* Position to the right of the iframe */
}

/* Additional styles to force white background */
.pdf-scroll-wrapper {
    background: white !important;
}

/* Override any dark theme styles in the PDF viewer */
.pdf-iframe::part(viewer) {
    background-color: white !important;
}

/* Target the PDF viewer's shadow DOM elements */
:host {
    background-color: white !important;
}

/* Desktop/Mobile visibility classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Download button styling */
.download-pdf-container {
    text-align: center;
    padding: 20px;
    max-width: 100%;
}

.download-pdf-container p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}
