/**
 * plp-cta-button.css
 *
 * Styles for the shared popup overlay used by .plp-cta-button[data-action="popup"].
 * The overlay is created on demand by plp-cta-button-handler.js; the target form
 * (e.g. #request-estimate) is moved into .plp-cta-popup__body while open.
 */

.plp-cta-popup[hidden] {
    display: none;
}

.plp-cta-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 16px;
}

.plp-cta-popup__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.plp-cta-popup__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    margin: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* No inner padding: the moved Kadence row (image column + form column)
       fills the dialog edge to edge as it does on the page. */
    padding: 0;
    overflow: hidden;
}

/* The relocated row should span the full dialog width. */
.plp-cta-popup__body > .kb-row-layout-wrap {
    margin: 0;
}

.plp-cta-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    font-size: 26px;
    line-height: 1;
    color: #333;
    cursor: pointer;
}

.plp-cta-popup__close:hover {
    background: #fff;
    color: #000;
}

/* Prevent the page behind the overlay from scrolling while it is open. */
body.plp-cta-popup-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .plp-cta-popup {
        padding: 16px 8px;
    }

    .plp-cta-popup__dialog {
        padding: 24px 16px;
    }
}
