.nexacore-qac-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    font-family: var(--nexacore-font-family, inherit);
}
.nexacore-qac-modal.is-open { display: flex; }
.nexacore-qac-overlay {
    position: absolute;
    inset: 0;
    background: var(--nexacore-overlay-color, rgba(0,0,0,.55));
    backdrop-filter: blur(2px);
}
.nexacore-qac-dialog {
    position: relative;
    width: min(100%, var(--nexacore-popup-width, 520px));
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: var(--nexacore-radius, 8px);
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    transform: translateY(0);
    opacity: 1;
    transition: transform .22s ease, opacity .22s ease;
}
.nexacore-qac-modal:not(.is-open) .nexacore-qac-dialog {
    transform: translateY(12px);
    opacity: 0;
}
.nexacore-qac-modal.is-open .nexacore-qac-dialog { animation: nexacoreQacFade .22s ease both; }
.nexacore-qac-modal.animation-slide.is-open .nexacore-qac-dialog { animation: nexacoreQacSlide .26s ease both; }
.nexacore-qac-modal.animation-none.is-open .nexacore-qac-dialog { animation: none; }
@keyframes nexacoreQacFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes nexacoreQacSlide { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.nexacore-qac-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--nexacore-close-bg, #7b00ff);
    color: var(--nexacore-close-color, #fff);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(123,0,255,.25);
}
.nexacore-qac-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 26px 26px;
}
.nexacore-qac-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.nexacore-qac-media {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.nexacore-qac-image {
    width: 135px;
    height: 135px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f7;
}
.nexacore-qac-headinfo { min-width: 0; flex: 1 1 auto; text-align: left; }
.nexacore-qac-content { min-width: 0; text-align: left; }
.nexacore-qac-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 11px;
    border-radius: 20px;
    background: var(--nexacore-badge-bg, #fff0fa);
    color: var(--nexacore-badge-color, #7b00ff);
    font-size: var(--nexacore-badge-font-size, 11px);
    font-weight: 800;
    letter-spacing: .2px;
    margin-bottom: 10px;
}
.nexacore-qac-title {
    margin: 0 42px 8px 0;
    color: var(--nexacore-title-color, #172033);
    font-size: var(--nexacore-title-font-size, 22px);
    line-height: 1.15;
    font-weight: var(--nexacore-title-font-weight, 800);
}
.nexacore-qac-price {
    color: var(--nexacore-price-color, #7b00ff);
    font-size: var(--nexacore-price-font-size, 20px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}
.nexacore-qac-price del {
    color: #333;
    opacity: .8;
    margin-right: 5px;
}
.nexacore-qac-price ins {
    color: var(--nexacore-price-color, #7b00ff);
    text-decoration: none;
}
.nexacore-qac-field { margin-bottom: 13px; text-align: left; }
.nexacore-qac-variations { text-align: left; }
.nexacore-qac-label,
.nexacore-qac-quantity-wrap > label {
    display: block;
    margin-bottom: 7px;
    text-align: left;
    color: var(--nexacore-label-color, #202738);
    font-size: var(--nexacore-label-font-size, 14px);
    font-weight: 800;
}
.nexacore-qac-select {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--nexacore-field-border-color, #dce2ec);
    border-radius: 7px;
    background: var(--nexacore-field-bg-color, #fff);
    color: var(--nexacore-field-text-color, #202738);
    font-size: 14px;
    box-sizing: border-box;
}
.nexacore-qac-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.nexacore-qac-swatch {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--nexacore-swatch-border, #dce2ec);
    border-radius: 8px;
    background: var(--nexacore-swatch-bg, #fff);
    color: var(--nexacore-swatch-text, #202738);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nexacore-qac-swatch:hover {
    background: var(--nexacore-swatch-hover-bg, #fff3ec);
    color: var(--nexacore-swatch-hover-text, #202738);
}
.nexacore-qac-swatch.is-active {
    background: var(--nexacore-swatch-active-bg, #ff8a50);
    color: var(--nexacore-swatch-active-text, #fff);
    border-color: transparent;
}
.nexacore-qac-quantity-wrap { margin-top: 12px; text-align: left; }
.nexacore-qac-quantity {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    min-height: 48px;
    max-width: 220px;
    border: 1px solid var(--nexacore-qty-border-color, #dce2ec);
    border-radius: 7px;
    overflow: hidden;
    background: var(--nexacore-qty-bg-color, #fff);
}
.nexacore-qac-quantity button {
    border: 0;
    background: var(--nexacore-qty-bg-color, #fff);
    color: var(--nexacore-qty-text-color, #202738);
    font-size: 21px;
    cursor: pointer;
    transition: background .12s ease;
}
.nexacore-qac-quantity button:hover { background: var(--nexacore-qty-hover-bg-color, #f6f7fb); }
.nexacore-qac-quantity input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-left: 1px solid var(--nexacore-qty-border-color, #dce2ec);
    border-right: 1px solid var(--nexacore-qty-border-color, #dce2ec);
    background: var(--nexacore-qty-bg-color, #fff);
    color: var(--nexacore-qty-text-color, #202738);
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    outline: none;
    box-sizing: border-box;
}
.nexacore-qac-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.nexacore-qac-add {
    flex: 1 1 0;
    min-height: 52px;
    border: 0;
    border-radius: var(--nexacore-button-radius, 7px);
    background: var(--nexacore-button-color, #7b00ff);
    color: var(--nexacore-button-text-color, #fff);
    font-family: var(--nexacore-button-font-family, inherit);
    font-size: var(--nexacore-button-font-size, 15px);
    font-weight: var(--nexacore-button-font-weight, 800);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.nexacore-qac-add:hover { background: var(--nexacore-button-hover-color, var(--nexacore-button-color, #7b00ff)); transform: translateY(-1px); }
.nexacore-qac-add:disabled { opacity: .65; cursor: wait; transform: none; }
.nexacore-qac-buynow {
    flex: 1 1 0;
    min-height: 52px;
    border: 0;
    border-radius: var(--nexacore-button-radius, 7px);
    background: var(--nexacore-buynow-color, #172033);
    color: var(--nexacore-buynow-text-color, #fff);
    font-family: var(--nexacore-button-font-family, inherit);
    font-size: var(--nexacore-button-font-size, 15px);
    font-weight: var(--nexacore-button-font-weight, 800);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.nexacore-qac-buynow:hover { background: var(--nexacore-buynow-hover-color, var(--nexacore-buynow-color, #172033)); transform: translateY(-1px); }
.nexacore-qac-buynow:disabled { opacity: .65; cursor: wait; transform: none; }
.nexacore-qac-buynow.is-hidden { display: none; }
.nexacore-qac-message {
    min-height: 18px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
}
.nexacore-qac-message.is-error { color: #d92d20; }
.nexacore-qac-message.is-success { color: #16803c; }
.nexacore-qac-modal.is-loading .nexacore-qac-content { opacity: .72; pointer-events: none; }
body.nexacore-qac-open { overflow: hidden; }

@media (max-width: 600px) {
    .nexacore-qac-modal { padding: 10px; align-items: flex-end; }
    .nexacore-qac-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 14px 14px 0 0;
    }
    .nexacore-qac-body {
        gap: 14px;
        padding: 28px 16px 18px;
    }
    .nexacore-qac-header {
        gap: 14px;
    }
    .nexacore-qac-image {
        width: 90px;
        height: 90px;
    }
    .nexacore-qac-title { font-size: 18px; }
    .nexacore-qac-price { font-size: 17px; margin-bottom: 13px; }
    .nexacore-qac-close {
        top: 9px;
        right: 9px;
        width: 36px;
        height: 36px;
        font-size: 25px;
    }
}

/* ==========================================================================
   Theme-override protection
   Themes such as Hello Elementor style every button / [type=button] /
   [type=submit] / input with their own border, colour and hover state at the
   same specificity as the rules above, so the theme used to win and the
   colours chosen in the plugin settings were ignored. These rules are more
   specific (and !important) so the admin settings always win.
   ========================================================================== */
body #nexacore-qac-modal .nexacore-qac-close {
    background: var(--nexacore-close-bg, #7b00ff) !important;
    color: var(--nexacore-close-color, #fff) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.18) !important;
    text-shadow: none !important;
    text-transform: none !important;
    width: 42px !important;
    height: 42px !important;
    min-height: 0 !important;
    padding: 0 !important;
    font-size: 26px !important;
    line-height: 1 !important;
}
body #nexacore-qac-modal .nexacore-qac-close:hover,
body #nexacore-qac-modal .nexacore-qac-close:focus,
body #nexacore-qac-modal .nexacore-qac-close:active {
    background: var(--nexacore-close-bg, #7b00ff) !important;
    color: var(--nexacore-close-color, #fff) !important;
    opacity: .88;
    outline: 0;
}
body #nexacore-qac-modal .nexacore-qac-close:focus-visible {
    outline: 2px solid var(--nexacore-close-color, #fff) !important;
    outline-offset: -4px;
}

body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-add,
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 52px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: var(--nexacore-button-radius, 7px) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.2 !important;
    font-family: var(--nexacore-button-font-family, inherit) !important;
    font-size: var(--nexacore-button-font-size, 15px) !important;
    font-weight: var(--nexacore-button-font-weight, 800) !important;
}
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-add {
    background: var(--nexacore-button-color, #7b00ff) !important;
    color: var(--nexacore-button-text-color, #fff) !important;
}
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-add:hover:not(:disabled),
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-add:focus:not(:disabled),
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-add:active:not(:disabled) {
    background: var(--nexacore-button-hover-color, var(--nexacore-button-color, #7b00ff)) !important;
    color: var(--nexacore-button-text-color, #fff) !important;
}
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow {
    background: var(--nexacore-buynow-color, #172033) !important;
    color: var(--nexacore-buynow-text-color, #fff) !important;
}
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow:hover:not(:disabled),
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow:focus:not(:disabled),
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow:active:not(:disabled) {
    background: var(--nexacore-buynow-hover-color, var(--nexacore-buynow-color, #172033)) !important;
    color: var(--nexacore-buynow-text-color, #fff) !important;
}
body #nexacore-qac-modal .nexacore-qac-actions .nexacore-qac-buynow.is-hidden { display: none !important; }
body #nexacore-qac-modal .nexacore-qac-actions button:focus-visible {
    outline: 2px solid var(--nexacore-button-color, #7b00ff);
    outline-offset: 2px;
}

/* Quantity box */
body #nexacore-qac-modal .nexacore-qac-quantity {
    border: 1px solid var(--nexacore-qty-border-color, #dce2ec) !important;
    background: var(--nexacore-qty-bg-color, #fff) !important;
}
body #nexacore-qac-modal .nexacore-qac-quantity button {
    background: var(--nexacore-qty-bg-color, #fff) !important;
    color: var(--nexacore-qty-text-color, #202738) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    font-size: 21px !important;
    line-height: 1 !important;
}
body #nexacore-qac-modal .nexacore-qac-quantity button:hover,
body #nexacore-qac-modal .nexacore-qac-quantity button:focus,
body #nexacore-qac-modal .nexacore-qac-quantity button:active {
    background: var(--nexacore-qty-hover-bg-color, #f6f7fb) !important;
    color: var(--nexacore-qty-text-color, #202738) !important;
}
body #nexacore-qac-modal .nexacore-qac-quantity input[type="number"] {
    background: var(--nexacore-qty-bg-color, #fff) !important;
    color: var(--nexacore-qty-text-color, #202738) !important;
    border: 0 !important;
    border-left: 1px solid var(--nexacore-qty-border-color, #dce2ec) !important;
    border-right: 1px solid var(--nexacore-qty-border-color, #dce2ec) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}
body #nexacore-qac-modal .nexacore-qac-quantity input[type="number"]::-webkit-outer-spin-button,
body #nexacore-qac-modal .nexacore-qac-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Variation dropdown */
body #nexacore-qac-modal select.nexacore-qac-select {
    background-color: var(--nexacore-field-bg-color, #fff) !important;
    color: var(--nexacore-field-text-color, #202738) !important;
    border: 1px solid var(--nexacore-field-border-color, #dce2ec) !important;
    box-shadow: none !important;
    height: auto !important;
}

/* Variation swatches */
body #nexacore-qac-modal .nexacore-qac-swatch {
    background: var(--nexacore-swatch-bg, #fff) !important;
    color: var(--nexacore-swatch-text, #202738) !important;
    border: 1px solid var(--nexacore-swatch-border, #dce2ec) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    text-transform: none !important;
}
body #nexacore-qac-modal .nexacore-qac-swatch:hover,
body #nexacore-qac-modal .nexacore-qac-swatch:focus {
    background: var(--nexacore-swatch-hover-bg, #fff3ec) !important;
    color: var(--nexacore-swatch-hover-text, #202738) !important;
}
body #nexacore-qac-modal .nexacore-qac-swatch.is-active,
body #nexacore-qac-modal .nexacore-qac-swatch.is-active:hover,
body #nexacore-qac-modal .nexacore-qac-swatch.is-active:focus {
    background: var(--nexacore-swatch-active-bg, #ff8a50) !important;
    color: var(--nexacore-swatch-active-text, #fff) !important;
    border-color: transparent !important;
}

/* Text elements the theme may recolour (h2, labels, price) */
body #nexacore-qac-modal .nexacore-qac-title {
    color: var(--nexacore-title-color, #172033) !important;
    font-size: var(--nexacore-title-font-size, 22px) !important;
    font-weight: var(--nexacore-title-font-weight, 800) !important;
}
body #nexacore-qac-modal .nexacore-qac-price,
body #nexacore-qac-modal .nexacore-qac-price .amount,
body #nexacore-qac-modal .nexacore-qac-price ins {
    color: var(--nexacore-price-color, #7b00ff) !important;
}
body #nexacore-qac-modal .nexacore-qac-label,
body #nexacore-qac-modal .nexacore-qac-quantity-wrap > label {
    color: var(--nexacore-label-color, #202738) !important;
}
body #nexacore-qac-modal .nexacore-qac-badge {
    background: var(--nexacore-badge-bg, #fff0fa) !important;
    color: var(--nexacore-badge-color, #7b00ff) !important;
}
