.closet-system-estimator-section {
    width: 100%;
    float: left;
    position: relative;
}

.closet-system-estimator-form-inner {
    position: relative;
}

.closet-system-estimator-form-inner .form-box {
    padding: 40px 40px;
    margin-top: 10px;
}

.form-box {
    background: rgba(255, 255, 255, 0.40);
    border: none;
}

/* ============================================================
   BLUE LINKS
   ============================================================ */

.closet-system-estimator-section .blue-link {
    text-decoration: underline !important;
    color: #000 !important;
}

form a {
    text-decoration: underline !important;
}

/* ============================================================
   INPUTS & PLACEHOLDERS
   ============================================================ */

.closet-system-estimator-section input[type=text],
.closet-system-estimator-section input[type=number],
.closet-system-estimator-section input[type=email],
.closet-system-estimator-section input[type=tel],
.closet-system-estimator-section input[type=url],
.closet-system-estimator-section input[type=password],
.closet-system-estimator-section input[type=search],
.closet-system-estimator-section textarea,
.closet-system-estimator-section .input-text,
.form-box input,
.form-box .wpcf7-form-control-wrap select {
    background: transparent;
    border-bottom: 1px solid black;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0 !important;
}

.closet-system-estimator-form-inner ::placeholder {
    color: rgba(0, 0, 0, 0.60) !important;
    font-family: Jost;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.form-box .wpcf7-form-control-wrap input[type=text],
.form-box .wpcf7-form-control-wrap input[type=email],
.form-inner.dd-rd p,
.firstcontact-div span,
.form-box .closet-system-notes-text,
.FileAttachment-label {
    color: rgba(0, 0, 0, 0.60);
    font-family: Jost;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    border-radius: 0;
}

/* ============================================================
   HEADINGS
   ============================================================ */

.closet-system-estimator-section .form-box h4,
.heading-h4 {
    background: transparent;
    position: relative;
    top: 0;
    color: #000;
    font-family: "Baskervvile";
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    border: none;
    text-transform: capitalize;
    padding: 38px 0;
    display: block;
    justify-content: unset;
}

/* ============================================================
   SELECTS
   ============================================================ */

.closet-system-estimator-section select:not([size]):not([multiple]),
.form-box .wpcf7-form-control-wrap select:not([size]):not([multiple]) {
    border-radius: 0;
    color: rgba(0, 0, 0, 0.60) !important;
    font-family: Jost;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    border-bottom: 1px solid black;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
    padding: 5px;
}

.closet-system-estimator-section select,
.customer-category-options {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-size: 30px 30px !important;
    background: url(https://dev.palmerindustries.com/wp-content/uploads/2025/04/Vector-2.svg) no-repeat right 10px center !important;
}

/* ============================================================
   RADIO BUTTONS
   ============================================================ */

.closet-system-estimator-section .closet-system-firstcontact-radio-btn input[type="radio"],
.closet-system-estimator-section .job-types input[type="radio"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    border: 2px solid rgba(0, 0, 0, 0.80);
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 0;
    position: relative;
}

.closet-system-estimator-section .closet-system-firstcontact-radio-btn input[type="radio"]:checked,
.closet-system-estimator-section .job-types input[type="radio"]:checked,
input[type="radio"]:checked {
    background-image: url(https://dev.palmerindustries.com/wp-content/plugins/custom-elementor-widgets/assets/images/on.png);
    background-position: center;
    background-repeat: no-repeat;
    border-color: #87D2D2;
}

/* ============================================================
   FORM INNER ROWS
   ============================================================ */

.closet-system-estimator-section .form-inner.dd-rd {
    display: flex;
    align-items: center;
}

.closet-system-estimator-section .customer-id .form-inner {
    border-bottom: 1px solid black;
    border-left: 0;
    border-right: 0;
    background: transparent;
    border-top: 0;
    margin-bottom: 35px;
}

.closet-system-estimator-section .form-inner {
    background: transparent;
}

.closet-system-estimator-section .main-top {
    padding-left: 0;
}

.closet-system-estimator-section span.wpcf7-form-control.wpcf7-radio.job-types {
    display: flex;
    border-bottom: 1px solid black;
    gap: 20px;
    padding: 5px;
}

.closet-system-estimator-section .job-types .wpcf7-list-item {
    margin: 0;
}

/* radio btn layout in customer id */
.form-box.customer-id .form-inner.closet-system-form-inner {
    display: flex;
    gap: 30px;
    height: 60px;
    padding-top: 10px;
}

.form-box.customer-id .form-inner.closet-system-form-inner .closet-system-firstcontact-radio-btn {
    display: flex;
    gap: 50px;
}

.form-box.customer-id .form-inner.closet-system-form-inner .closet-system-firstcontact-radio-btn span {
    display: flex;
    align-items: center;
}

.project-id-zip-textarea .main-xip.project-zip-radio {
    padding: 0;
}

/* ============================================================
   NOTES / TEXT AREAS
   ============================================================ */

.form-box.dimensions ul.closet-system-notes-text {
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    line-height: 20.23px;
    font-family: jost;
    color: rgba(0, 0, 0, 0.6);
}

.form-box .closet-system-notes-text,
.form-box.dimensions ul.closet-system-notes-text {
    margin-bottom: 1.2rem;
}

.projectnote,
.AdditionalNote {
    border: 1px solid rgba(0, 0, 0, 0.30);
    background: #FFF;
    border-radius: 0 !important;
}

.zip-code-col {
    padding-left: 0;
}

.note-col {
    padding-right: 0;
}

.border-text-input {
    border: 1px solid rgba(0, 0, 0, 0.80) !important;
    background: #FFF !important;
}

.border-bottom {
    border-bottom: 1px solid black;
}

.common-content {
    color: rgba(0, 0, 0, 0.60) !important;
    font-family: Jost;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    border-radius: 0;
}

b,
strong {
    font-weight: bold !important;
}

.mb-select {
    margin-top: 20px;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */

.codedropz-upload-handler {
    border: 1px solid #87D2D2;
    background: #FFF;
    border-radius: 0;
}

.codedropz-upload-inner .codedropz-btn-wrap a.cd-upload-btn {
    border-radius: 0;
    background: #FFF;
    color: #000;
    display: inline-flex;
    padding: 5px 20px 10px 20px;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    display: block;
    width: 100%;
    font-size: 18px;
    text-transform: uppercase;
    height: auto;
}

/* ============================================================
   CAPTCHA / RESPONSE
   ============================================================ */

#rc-anchor-container {
    border: 1px solid rgba(0, 0, 0, 0.20);
    background: #FFF;
    padding: 10px;
    display: inline-block;
    border-radius: 4px;
}

.wpcf7-response-output {
    color: #2e7d32 !important;
    font-weight: 700 !important;
    border-color: #2e7d32 !important;
    font-size: 18px !important;
    margin-top: 20px !important;
    display: block !important;
}

.firstcontact-div span.wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 0.65em;
    font-weight: 400;
    display: block;
}

/* ============================================================
   VALIDATION
   ============================================================ */

.field-error {
    border-bottom: 2px solid red !important;
}

.closet-system-estimator-section input.wpcf7-validates-as-required.field-error {
    border-bottom: 2px solid red !important;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    padding-top: 40px;
    padding-bottom: 30px;
}

.steps-progress {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ddd;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.steps-progress p {
    margin-bottom: 0;
    color: #fff !important;
    font-size: 18px !important;
}

.steps-progress:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -35px;
    width: 50px;
    height: 2px;
    background-color: #ddd;
    z-index: -1;
    transform: translateY(-50%);
}

.steps-progress.active {
    background-color: rgba(135, 210, 210, 1);
}

.steps-progress.active + .steps-progress::before {
    background-color: rgba(135, 210, 210, 1);
}

.mobile-step-progress {
    display: none;
}

/* ============================================================
   NAVIGATION BUTTONS
   ============================================================ */

.form-navigation {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: right;
    margin: 50px 0 20px;
}

.closet-system-estimator-section button {
    padding: 12px 32px !important;
    background-color: #fff;
    color: rgba(36, 36, 36, 1);
    border: 1px solid rgba(135, 210, 210, 1);
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    font-family: jost;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.closet-system-estimator-section button i {
    color: rgba(36, 36, 36, 1);
    font-size: 15px;
    font-weight: 600;
}

.closet-system-estimator-section button.btn-next-step,
.closet-system-estimator-section button.custom-submit-button {
    background-color: #87D2D2;
    transition: all 0.5s;
}

.closet-system-estimator-section button:hover {
    background-color: transparent !important;
    border-color: #000 !important;
}

/* legacy button classes kept for compatibility */
button.btn-go-back.palmer-button.palmer-secondary-btn,
button.btn-clear-form.palmer-button.palmer-secondary-btn {
    padding: 12px 32px;
    background-color: #fff;
    color: rgba(36, 36, 36, 1);
    border: 1px solid rgba(135, 210, 210, 1);
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    font-family: jost;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
}

button.btn-go-back.palmer-button.palmer-secondary-btn:hover,
button.btn-clear-form.palmer-button.palmer-secondary-btn:hover {
    background-color: transparent;
    border: 1px solid #000;
    color: rgba(36, 36, 36, 1);
}

button.btn-go-back i,
button.btn-clear-form i,
button.btn-next-step i {
    color: rgba(0, 0, 0, 1);
    font-size: 15px;
    font-weight: 600;
}

button.btn-next-step.palmer-button.palmer-primary-btn {
    background-color: #87D2D2;
    color: rgba(36, 36, 36, 1);
    border: 1px solid rgba(135, 210, 210, 1);
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    font-family: jost;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    border-color: transparent;
    border-radius: 0;
    padding: 12px 32px !important;
}

button.custom-submit-button {
    padding: 12px 32px !important;
    background-color: rgba(135, 210, 210, 1);
    color: rgba(36, 36, 36, 1);
    border: 1px solid rgba(135, 210, 210, 1);
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    font-family: jost;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
}

button.custom-submit-button:hover {
    background-color: transparent;
    border-color: #000;
}

button.custom-submit-button i {
    color: rgba(0, 0, 0, 1);
    font-size: 15px;
    font-weight: 600;
}

/* ============================================================
   TABLE (spec section)
   ============================================================ */

.form-table-wrapper {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 10px;
}

.form-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.form-table-wrapper table td,
.form-table-wrapper table th {
    padding: 10px;
}

.specification-section .form-title-wrapper {
    display: flex;
    gap: 30px;
}

.specification-section ul.term-defined {
    display: flex;
    gap: 30px;
    margin-left: 0;
}

.specification-section .title-text,
.form-boxdimensionsexcel p {
    color: rgba(0, 0, 0, 0.60);
    font-family: Jost;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.specification-section .form-boxdimensionsexcel p {
    color: #e60000;
}

.specification-section .form-inner-scroll td p {
    color: #000;
    font-size: 14px;
    font-weight: 500;
    word-break: normal;
}

.specification-section .form-table-wrapper td p input,
.specification-section .form-table-wrapper td select {
    color: rgba(0, 0, 0, 0.60) !important;
    font-family: Jost !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: normal !important;
    word-break: break-word;
    padding: 5px !important;
}

.specification-section .form-table-wrapper td select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url(/wp-content/uploads/2025/05/collapse-arrow.png) no-repeat right 0.1rem center;
    background-size: 16px 16px;
    padding-right: 20px !important;
    border-bottom: 1px solid #000;
    background-color: transparent;
}

.product-closetestimator-popup p {
    display: flex;
    justify-content: center;
}

.last-li li,
.sub-text {
    color: rgba(0, 0, 0, 0.60);
    font-family: Jost;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

/* ============================================================
   POPUP STYLES — matches studio shelving estimator exactly
   ============================================================ */

/*
 * Closet system popup markup must follow this structure:
 *
 * <div id="popup-id" class="mfp-hide">
 *   <button class="mfp-close mfp-close-mobile" title="Close">×</button>
 *   <div class="popup-inner-content">
 *     <div class="product-closetestimator-popup">
 *       <img src="...">
 *       <span class="mfp-close-desktop mfp-close">×</span>
 *     </div>
 *   </div>
 * </div>
 */

/* Outer content wrapper */
.closet-system-estimator-section ~ * .popup-inner-content,
.closet-system-estimator-section .popup-inner-content,
.mfp-content .popup-inner-content {
    width: 80%;
    max-width: 80vw;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* Popup card */
.product-closetestimator-popup {
    display: block;
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.product-closetestimator-popup img {
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

/* Desktop close button — sits inside the popup card, top-right corner */
.product-closetestimator-popup .mfp-close-desktop {
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 38px !important;
    font-size: 30px !important;
    color: #000 !important;
    opacity: 1 !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 0 !important;
    text-align: center !important;
    z-index: 999999 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-closetestimator-popup .mfp-close-desktop:hover {
    opacity: 0.7 !important;
}

/* Mobile close button — hidden by default, shown on mobile */
button.mfp-close.mfp-close-mobile {
    display: none !important;
}

/* MFP overlay and wrap */
html.mfp-helper {
    overflow: auto !important;
    margin-right: 0 !important;
}

.mfp-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mfp-wrap > .mfp-close {
    display: none !important;
}

.mfp-bg {
    z-index: 99998 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
}

.mfp-content {
    z-index: 99999 !important;
    position: relative !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 769px) {

    .closet-system-estimator-section {
        display: block;
    }

    .closet-system-estimator-section .form-box {
        padding: 40px 10px;
    }

    .closet-system-estimator-section .form-inner.dd-rd {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .closet-system-estimator-section select.customer-category-options,
    .closet-system-estimator-section select:not([size]):not([multiple]),
    .customer-category-options {
        white-space: normal !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .closet-system-estimator-section span.wpcf7-form-control.wpcf7-radio.job-types {
        padding: 5px 0 20px;
        flex-direction: column;
    }

    .desktop-progress-bar {
        display: none !important;
    }

    /* mobile progress bar */
    .mobile-step-progress {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .mobile-step-progress .steps-progress.active::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 220px;
        height: 2px;
        background-color: #ddd;
        z-index: -1;
        transform: translateY(-50%);
    }

    .form-box.customer-id .form-inner.closet-system-form-inner {
        display: block;
        height: auto;
        padding-top: 0px;
    }

    .AdditionalNote {
        width: 20em !important;
        height: 1em;
    }

    .note-col {
        padding-left: 0;
    }

    .form-navigation {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin: 50px 0 20px;
        flex-direction: row;
    }

    .closet-system-estimator-section button {
        width: 100% !important;
        gap: 10px;
        font-size: 16px;
        align-items: center;
    }

    .form-table-wrapper {
        overflow-x: auto;
    }

    .form-table-wrapper table {
        min-width: 1100px;
    }

    /* Mobile popup: show mobile close button, hide desktop one */
    button.mfp-close.mfp-close-mobile {
        display: block !important;
        position: absolute !important;
        top: -40px !important;
        right: 0 !important;
        color: #fff !important;
        font-size: 36px !important;
        line-height: 40px !important;
        width: 40px !important;
        height: 40px !important;
        text-align: center !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        z-index: 999999 !important;
    }

    .product-closetestimator-popup .mfp-close-desktop {
        display: none !important;
    }

    .product-closetestimator-popup img {
        max-width: 90vw;
    }
}



/* Hide the Smart Grid response wrapper until CF7 populates it after submission */
.cf7sg-response-output {
    display: none !important;
}

.wpcf7-form.sent .cf7sg-response-output,
.wpcf7-form.failed .cf7sg-response-output,
.wpcf7-form.invalid .cf7sg-response-output,
.wpcf7-form.spam .cf7sg-response-output {
    display: block !important;
}

.cf7sg-response-output[aria-hidden="true"] {
    display: none !important;
}

.cf7sg-response-output[aria-hidden="false"] {
    display: block !important;
}


.wpcf7 .ajax-loader {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 999999 !important;
    margin: 0 !important;
}