/* Force stable button position */
.vto-try-on-btn {
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    margin-top: 12px ;
    margin-bottom: 12px ;
    white-space: nowrap;     
    display: block !important;
    float: none !important;
    clear: both !important;    
    min-width: 80px;       
    white-space: normal !important;   /* allow text to wrap */
    word-break: break-word;            /* break long words if needed */
    box-sizing: border-box;            /* include padding in width */
    max-width: 100%;                   /* ensure button stays within container */

}


.vto-popup {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vto-popup[aria-hidden="false"] {
    display: flex;
}


.vto-popup-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 750px;

    max-height: 90vh;          /* KEY */
    overflow-y: auto;          /* KEY */

    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    position: relative;
}

#vto-placeholder-text
{
    margin-top: 6px;
}


#vto-popup .vto-close {
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    font-size: 26px !important;
    font-weight: bold !important;
    color: #444 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    z-index: 9999999 !important;
    
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;

    transition: color 0.2s ease !important;
}

#vto-popup .vto-close:hover {
    color: #d63638 !important;
}



.vto-columns {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
}

.vto-left,
.vto-right {
    width: 50%;
}


.vto-upload-box {
    border: 2px dashed #b8b8b8;
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s ease;
}

.vto-upload-box:hover {
    border-color: #777;
    background: #fafafa;
}

.vto-upload-box p {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 16px;
}

.vto-upload-box input[type="file"] {
    margin-top: 10px;
}

/* -----------------------------------
   TERMS CHECKBOX
----------------------------------- */
.vto-terms-box {
    margin-top: 18px;
    display: flex;
    align-items: center;
    font-size: 14px;
    gap: 10px;
}

.vto-terms-box input[type="checkbox"] {
    transform: scale(1.2);
}


.vto-preview {
    /* min-height: 350px; */
    border: 1px solid #ccc;
    border-radius: 10px;
    text-align: center;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    background:#f9f9f9;
}

#vto-preview img,
.vto-preview img {
    width: 100% !important;
    height: 100% !important;
    /* object-fit: cover !important; */
    border-radius: 10px;
    display: block;
}



.placeholder-text {
    color: #999;
    font-size: 15px;
    font-weight: 500;
}


.vto-btn {
    padding: 12px;
    border-radius: 6px;
    background: #2a7be4;
    color: #fff;
    border: none;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    margin-top: 14px;
    cursor: pointer;
}

.vto-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vto-btn:hover:not(:disabled) {
    background: #1e63b6;
}


.vto-prev-wrapper {
    margin-top: 20px;
}

.vto-prev-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.vto-prev-list {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.vto-prev-item {
    width: 76px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: 0.2s ease;
    background: #fafafa;
}

.vto-prev-item:hover {
    border-color: #2a7be4;
}

.vto-prev-item img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}

#vto-preview {
    position: relative;
}

#vto-content {
    position: relative;
}

#vto-loader {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* add this */
    background: rgba(255,255,255,0.7); /* semi-transparent overlay */
    z-index: 10;
    text-align: center; /* optional, helps center text */
}



/* Spinner inside overlay */
.vto-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: vto-spin 0.8s linear infinite;
    margin-bottom: 10px;
}

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



.dotted-box {
    border: 2px dashed #333;  /* dashed border */
    border-radius: 8px;       /* rounded corners */
    padding: 30px;            /* inner spacing */
    text-align: center;       /* center text */
    color: #555;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.dotted-box:hover {
    background: #f9f9f9;      /* light hover background */
    border-color: #000;       /* darker border on hover */
}

.vto-guide-description-box {
    background-color: #f5f5f5;       /* Light gray background */
    border-left: 4px solid #0073aa; /* WordPress admin blue accent */
    padding: 12px 15px;              /* Space inside the box */
    border-radius: 6px;              /* Slightly rounded corners */
    font-size: 14px;                 /* Slightly smaller text */
    color: #333;                     /* Dark text for readability */
    margin-top: 15px;                /* Space above the box */
    line-height: 1.5;                /* Better readability */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Subtle shadow */
}


.vto-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Zoom button — WooCommerce style */
/* Zoom button — FORCE SHOW (with !important on all key properties) */
.vto-zoom-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;

    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    cursor: pointer !important;
    z-index: 9999 !important;

    padding: 0 !important;
    transition: all 0.2s ease !important;
}

/* Hover effect */
.vto-zoom-btn:hover {
     background: rgba(161, 159, 159, 0.514) !important;
    border:1px solid rgba(0,0,0,0.3) !important;
}

.vto-zoom-btn span {
    width: 20px !important;
    height: 20px !important;
    display: block !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23000' d='M304 192h-80v-80c0-8.8-7.2-16-16-16s-16 7.2-16 16v80h-80c-8.8 0-16 7.2-16 16s7.2 16 16 16h80v80c0 8.8 7.2 16 16 16s16-7.2 16-16v-80h80c8.8 0 16-7.2 16-16s-7.2-16-16-16zm204.7 271.6L382 336.9c29.2-35.3 46-80.1 46-128.9C428 93.1 334.9 0 214 0S0 93.1 0 214s93.1 214 214 214c48.8 0 93.6-16.8 128.9-46l126.7 126.7c6.2 6.2 14.4 9.3 22.6 9.3s16.3-3.1 22.6-9.3c12.3-12.5 12.3-32.8-.1-45.4zM214 380c-91.7 0-166-74.3-166-166S122.3 48 214 48s166 74.3 166 166-74.3 166-166 166z'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}



/* Full-screen zoom modal */
.vto-zoom-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    text-align: center;
}

.vto-zoom-modal img {
    max-width: 90%;
    max-height: 90%;
    margin-top: 50px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.vto-zoom-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    cursor: pointer;
    color: #fff;
}




@media (max-width: 600px) {
    .vto-columns {
        flex-direction: column;
    }

    .vto-left,
    .vto-right {
        width: 100%;
    }

    .vto-prev-list {
        gap: 8px;
    }

    .vto-prev-item {
        width: 50px;
        height: 50px;
    }
}
