/* =====================================================
   QCEP MODAL OVERLAY
===================================================== */

.qcep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
}

.qcep-overlay.active {
    display: flex;
}

body.qcep-lock {
    overflow: hidden;
}
.qcep-edit-link
{
color: #0D69A0;
}

/* =====================================================
   MODAL CONTAINER
===================================================== */

.qcep-modal {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 14px;
}

.qcep-content {
    background: #ffffff;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    padding: 40px 45px;
    position: relative;
    animation: modalFade 0.3s ease;
}

@keyframes modalFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =====================================================
   CLOSE BUTTON
===================================================== */

.qcep-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    background: #0D69A0;
    border-radius: 50%;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.qcep-close:hover {
    transform: scale(1.1);
}


/* =====================================================
   ONE ROW FORM LAYOUT (IMPORTANT PART)
===================================================== */

.qcep-content .wc-pao-addon-container,
.qcep-content table.variations tr {
    display: flex;
    align-items: center;
    gap: 35px;
    /*margin-bottom: 28px;*/
    border-bottom: 1px solid #eee;
   /* padding-bottom: 22px;*/
   padding:10px;
}

/* Label column */
.qcep-content .wc-pao-addon-name,
.qcep-content table.variations th.label {
    width: 180px;
    min-width: 180px;
    font-size: 16px !important;
    font-weight: 600;
    margin: 0;
    text-align:left;
}

/* Field column */
.qcep-content .wc-pao-addon-wrap,
.qcep-content table.variations td.value {
    flex: 1;
    width: 100%;
}

.reset_variations{
    display:none;
}

.wc-pao-addon {
    margin: 0 0 0em !important;
}
/* =====================================================
   SELECT / INPUT / TEXTAREA
===================================================== */

.qcep-content select,
.qcep-content .wc-pao-addon-field,
.qcep-content textarea,
.qcep-content input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    font-size: 15px;
    transition: 0.2s ease;
}

.qcep-content textarea {
    height: 120px;
    padding: 14px;
    resize: vertical;
}

.qcep-content select:focus,
.qcep-content textarea:focus,
.qcep-content input:focus {
    background: #fff;
    border-color: #0D69A0;
    outline: none;
}


/* =====================================================
   CHECKBOX FIX (Single Row Proper Alignment)
===================================================== */

.qcep-content .wc-pao-addon-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qcep-content .wc-pao-addon-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.qcep-content .wc-pao-addon-wrap label {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* =====================================================
   VARIATION TABLE RESET
===================================================== */

.qcep-content table.variations {
    width: 100%;
    border-collapse: collapse;
    margin-top:5px;
    margin-bottom:0px !important;
}

.qcep-content table.variations th,
.qcep-content table.variations td {
    display: block;
    padding: 0;
}
.wc-pao-addon .wc-pao-addon-wrap {
    margin: 0em -15px 0 -15px !important;
}

/* =====================================================
   UPDATE BUTTON
===================================================== */

.qcep-update-btn,
.qcep-content .single_add_to_cart_button {
    width: 100%;
    margin-top: 35px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    background: #0D69A0;
    color: #fff;
    cursor: pointer;
    transition: 0.25s ease;
}

.qcep-update-btn:hover,
.qcep-content .single_add_to_cart_button:hover {
    background: #333;
}


/* =====================================================
   SCROLLBAR
===================================================== */

.qcep-content::-webkit-scrollbar {
    width: 6px;
}

.qcep-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}


/* =====================================================
   RESPONSIVE (Mobile)
===================================================== */

@media (max-width: 768px) {

    .qcep-content {
        padding: 25px 20px;
    }

    .qcep-content .wc-pao-addon-container,
    .qcep-content table.variations tr {
        flex-direction: column;
        align-items: flex-start;
    }

    .qcep-content .wc-pao-addon-name,
    .qcep-content table.variations th.label {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Ensure body lock class is properly managed */
body.qcep-lock {
    overflow: hidden;
    position: relative;
    height: 100%;
}

/* Make sure overlay doesn't leave any traces */
#qcep-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999999;
}

#qcep-overlay.active {
    display: block;
}

/* Center the modal */
#qcep-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure modal is scrollable if content is long */
.qcep-modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

/* Optional: Add some padding to content */
.qcep-content {
    padding: 25px;
}
.qcep-content .wc-pao-addon-container  .wc-pao-addon .wc-pao-addon-quantity
{
visibility: hidden;
}

/* Modal Header */
.qcep-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.qcep-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f8f8;
    border-radius: 8px 8px 0 0;
}

.qcep-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.qcep-close-header {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:#0D69A0;
}

.qcep-close-header:hover {
    background-color: red;
    color: #fff;
}

.qcep-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Hide any old close buttons from content */
.qcep-content .qcep-close,
.qcep-content .qcep-close-header {
    display: none !important;
}

/* Hide default quantity field but keep add-on quantity visible */
.qcep-content .quantity {
    display: none !important;
}

.qcep-content label.hpw-qty-label,
.qcep-content .variations_button label {
    display: none !important;
}
/* Ensure add-on quantity select is visible */
.qcep-content .wc-pao-addon-quantity select,
.qcep-content select[name="quantity"] {
    display: none;
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 5px 0;
}
.qcep-content .wc-pao-addon-quantity {
    display: none !important;
    margin-bottom: 15px;
}
/* Sirf qcep-modal ke andar hide karein */
.qcep-modal .single_variation,
.qcep-modal .woocommerce-variation {
    display: none !important;
}

/* Disabled option styling */
.qcep-disabled-option {
    text-decoration: line-through !important;
    color: #999 !important;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Hover effect */
.qcep-disabled-option:hover {
    background-color: #f5f5f5 !important;
}

/* Optional: Style for disabled option in select */
select option:disabled {
    text-decoration: line-through !important;
    color: #999;
    background-color: #f5f5f5;
}

/* =====================================================
   FINAL FIX - MODAL DROPDOWN BORDERS + HIDE QUANTITY
   Add this AFTER all CSS files
===================================================== */

/* Force borders on ALL dropdowns in modal including addons */
html body .qcep-modal select,
html body .qcep-modal .wc-pao-addon-field,
html body .qcep-modal select.wc-pao-addon-select,
html body .qcep-modal .wc-pao-addon-select {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    background: #f8f8f8 !important;
    height: 50px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #111 !important;
    /*width: 100% !important;*/
    box-shadow: none !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    background-image: none !important;
    line-height: normal !important;
}

/* Specifically target the Density dropdown */
html body .qcep-modal .wc-pao-addon-container .wc-pao-addon-select,
html body .qcep-modal select#addon-69649-density-0,
html body .qcep-modal select[name="addon-69649-density-0"] {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    background: #f8f8f8 !important;
    display: block !important;
    visibility: visible !important;
}

/* Ensure the select is visible and styled */
html body .qcep-modal .wc-pao-addon-density select {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
}

/* HIDE QUANTITY FIELD COMPLETELY IN MODAL */
html body .qcep-modal .quantity,
html body .qcep-modal .e-atc-qty-button-holder .quantity,
html body .qcep-modal .variations_button .quantity,
html body .qcep-modal .woocommerce-variation-add-to-cart .quantity {
    display: none !important;
}

/* Hide quantity label */
html body .qcep-modal .hpw-qty-label,
html body .qcep-modal label[for="quantity_69ba2fad3d69d"],
html body .qcep-modal .screen-reader-text {
    display: none !important;
}

/* Hide the specific quantity input */
html body .qcep-modal input#quantity_69ba2fad3d69d,
html body .qcep-modal input.qty {
    display: none !important;
}

/* Fix the Update button layout */
html body .qcep-modal .woocommerce-variation-add-to-cart {
    display: block !important;
    margin-top: 35px !important;
}

html body .qcep-modal .qcep-update-btn,
html body .qcep-modal .single_add_to_cart_button {
    width: 100% !important;
    margin-top: 0 !important;
    display: block !important;
}

/* Make sure the button is visible */
html body .qcep-modal button.qcep-update-btn {
    display: block !important;
    visibility: visible !important;
    margin: 0;
    margin-top: 10px;
}

/* Remove any flex layouts that might affect the button */
html body .qcep-modal .variations_button,
html body .qcep-modal .woocommerce-variation-add-to-cart {
    display: block !important;
    flex-direction: initial !important;
    align-items: initial !important;
}

/* Ensure the addon container has proper spacing */
html body .qcep-modal .wc-pao-addon-container {
    margin-bottom: 0 !important;
}

/* Fix any potential interference from second CSS */
html body .qcep-modal .wc-pao-addon-wrap {
    display: block !important;
    width: 100% !important;
}

/* Force border on all select elements in modal */
html body .qcep-modal select {
    border: 1px solid #ddd !important;
}

/* Override any border removal from other CSS */
html body .qcep-modal select.wc-pao-addon-select {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
}

/* Fix the p tag wrapping the select */
html body .qcep-modal .wc-pao-addon-container p.wc-pao-addon-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tablet and mobile fixes */
@media (max-width: 768px) {
    html body .qcep-modal .wc-pao-addon-container {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    html body .qcep-modal .wc-pao-addon-name {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
    
    html body .qcep-modal select,
    html body .qcep-modal .wc-pao-addon-select {
        width: 100% !important;
    }
}

/* Force hide quantity even with inline styles */
html body .qcep-modal [id*="quantity"] {
    display: none !important;
}

/* Debug - ensure select is visible and has border */
html body .qcep-modal .wc-pao-addon-density {
    position: relative !important;
    z-index: 1 !important;
}

/* Make sure the addon select is actually visible */
html body .qcep-modal .wc-pao-addon-select {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Fix for any hidden states */
html body .qcep-modal .wc-pao-addon-container .wc-pao-addon-select {
    display: block !important;
}

/* Remove any background transparency */
html body .qcep-modal select.wc-pao-addon-select {
    background-color: #f8f8f8 !important;
}

/* Ensure border shows on focus too */
html body .qcep-modal select.wc-pao-addon-select:focus {
    border-color: #0D69A0 !important;
    background: #fff !important;
    outline: none !important;
}