/* =========================================================
   PROJECT ESTIMATE FORM
   Keeps the original two-column structure/design.
========================================================= */

.pef-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: Arial, sans-serif;
    color: #18212b;
}


/* =========================================================
   PROGRESS BAR
========================================================= */

.pef-progress {
    display: flex;
    align-items: flex-start;

    margin-bottom: 65px;
    padding: 25px 35px;

    border: 1px solid #e4e7eb;
    border-radius: 14px;

    background: #fff;
}

.pef-step {
    width: 160px;

    text-align: center;
    color: #aaa;

    transition: color .25s ease;
}

.pef-step-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    margin: 0 auto 14px;

    border-radius: 50%;

    background: #aaa;
    color: #fff;

    font-size: 12px;
    font-weight: 600;

    transition: background .25s ease;
}

.pef-step strong {
    display: block;

    font-size: 14px;
    line-height: 1.3;
}

.pef-line {
    flex: 1;

    margin-top: 12px;

    border-top: 1px dashed #aaa;

    transition: border-color .25s ease;
}

.pef-step.active {
    color: #18212b;
}

.pef-step.active .pef-step-number {
    background: #0967f2;
}

.pef-step.completed {
    color: #0967f2;
}

.pef-step.completed .pef-step-number {
    background: #0967f2;
    font-size: 0;
}

.pef-step.completed .pef-step-number::before {
    content: "✓";

    font-size: 13px;
    font-weight: 700;
}

.pef-line.completed {
    border-top-color: #0967f2;
}


/* =========================================================
   ORIGINAL TWO COLUMN STRUCTURE
========================================================= */

.pef-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;

    align-items: start;
}

.pef-card {
    padding: 34px;

    border: 1px solid #dde2e7;
    border-radius: 12px;

    background: #fff;
}

.pef-title {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-bottom: 28px;
}

.pef-title h2 {
    margin: 0;

    font-size: 24px;
    line-height: 1.25;
    font-weight: 500;
}

.pef-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border-radius: 50%;

    background: #0967f2;
    color: #fff;
}


/* =========================================================
   FORM FIELDS
========================================================= */

.pef-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.pef-field {
    margin-bottom: 22px;
}

.pef-field label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 600;
}

.pef-field label span {
    color: #e22;
}

.pef-field input,
.pef-field select,
.pef-field textarea {
    box-sizing: border-box;

    width: 100%;

    padding: 13px 14px;

    border: 1px solid #d4dae1;
    border-radius: 7px;

    background: #fff;
    color: #18212b;

    font-size: 14px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.pef-field input:focus,
.pef-field select:focus,
.pef-field textarea:focus {
    border-color: #0967f2;
    box-shadow: 0 0 0 2px rgba(9, 103, 242, .08);
}

.pef-field textarea {
    min-height: 140px;
    resize: vertical;
}

.pef-field small {
    display: block;

    margin-top: 7px;

    color: #737d8c;

    font-size: 12px;
    line-height: 1.4;
}


.pef-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626 !important;
}

/* =========================================================
   PHOTO INTRO
========================================================= */

.pef-help-link {
    display: inline-block;

    margin-bottom: 25px;

    color: #0967f2;

    font-weight: 600;
    text-decoration: underline;
}

.pef-photo-intro {
    margin-bottom: 25px;
}

.pef-photo-intro strong {
    display: block;

    margin-bottom: 10px;

    font-size: 14px;
}

.pef-photo-intro p {
    margin: 0;

    color: #687383;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   UPLOAD AREA
========================================================= */

.pef-upload-wrap {
    width: 100%;
}

.pef-drop-zone {
    box-sizing: border-box;

    display: block;

    width: 100%;

    padding: 32px 20px;

    border: 2px dashed #0967f2;
    border-radius: 8px;

    background: #fff;

    text-align: center;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease;
}

.pef-drop-zone:hover,
.pef-drop-zone.dragging {
    background: #f4f8ff;
}

.pef-upload-icon {
    margin-bottom: 10px;

    color: #0967f2;

    font-size: 32px;
    line-height: 1;
}

.pef-drop-zone strong {
    color: #0967f2;
}

.pef-drop-zone small {
    display: block;

    margin-top: 10px;

    color: #7a8592;

    font-size: 12px;
}


/* =========================================================
   PHOTO PREVIEWS
========================================================= */

.pef-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;

    margin-top: 15px;
}

.pef-preview-item {
    position: relative;

    overflow: hidden;

    min-width: 0;
    min-height: 88px;

    border: 1px solid #ddd;
    border-radius: 6px;

    background: #f4f5f6;
}

.pef-preview-item img {
    display: block;

    width: 100%;
    height: 88px;

    object-fit: cover;
}

.pef-remove-photo {
    position: absolute;

    z-index: 3;

    top: 4px;
    right: 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, .95);
    color: #222;

    font-size: 18px;
    line-height: 1;

    cursor: pointer;
}

.pef-heic-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 88px;

    color: #666;

    font-size: 12px;
    font-weight: 700;
}

.pef-photo-count {
    margin-top: 10px;

    color: #66717e;

    font-size: 12px;
}


/* =========================================================
   PHOTO GUIDE
========================================================= */

.pef-guide {
    margin-top: 28px;
}

.pef-guide > strong {
    display: block;

    margin-bottom: 12px;

    font-size: 14px;
}

.pef-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pef-guide-grid > div {
    min-width: 0;
}

.pef-guide-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 85px;

    margin-bottom: 7px;

    border-radius: 6px;

    background: #e9edf2;
    color: #0967f2;

    font-size: 22px;
    font-weight: 700;
}

.pef-guide-grid small {
    display: block;

    color: #424c58;

    font-size: 11px;
    line-height: 1.3;
}


/* =========================================================
   NOTICE
========================================================= */

.pef-notice {
    margin-top: 28px;
    padding: 17px 18px;

    border: 1px solid #f3ca54;
    border-radius: 8px;

    background: #fff9e8;
    color: #d16a00;
}

.pef-notice strong {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
}

.pef-notice p {
    margin: 0;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   AJAX MESSAGE
   Used for validation/errors only.
   No success thank-you box is displayed.
========================================================= */

.pef-message {
    margin-top: 18px;
}

.pef-message:empty {
    display: none;
}

.pef-message.error {
    display: block;

    padding: 12px 15px;

    border: 1px solid #fecaca;
    border-radius: 6px;

    background: #fff1f2;
    color: #b42318;

    font-size: 13px;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.pef-submit {
    min-width: 210px;

    margin-top: 25px;
    padding: 14px 28px;

    border: 0;
    border-radius: 5px;

    background: #0967f2;
    color: #fff;

    font-size: 15px;

    cursor: pointer;

    transition:
        background .2s ease,
        opacity .2s ease;
}

.pef-submit:hover {
    background: #075bd7;
}

.pef-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}


/* =========================================================
   24-HOUR RESPONSE PROMISE MODAL
========================================================= */

body.pef-modal-open {
    overflow: hidden;
}

.pef-success-modal {
    position: fixed;

    z-index: 999999;

    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.pef-success-modal.is-open {
    display: flex;
}

.pef-success-overlay {
    position: absolute;

    inset: 0;

    background: rgba(15, 23, 42, .68);
}

.pef-success-dialog {
    position: relative;

    z-index: 2;

    box-sizing: border-box;

    width: 100%;
    max-width: 520px;

    padding: 45px 40px 38px;

    border-radius: 14px;

    background: #fff;

    text-align: center;
}

.pef-success-close {
    position: absolute;

    top: 12px;
    right: 16px;

    padding: 5px;

    border: 0;

    background: transparent;
    color: #647182;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}

.pef-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 66px;
    height: 66px;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #0967f2;
    color: #fff;

    font-size: 28px;
    font-weight: 700;
}

.pef-success-dialog h2 {
    margin: 0 0 10px;

    color: #18212b;

    font-size: 28px;
    line-height: 1.2;
}

.pef-success-intro {
    margin: 0 0 22px;

    color: #647182;

    font-size: 15px;
}

.pef-24-hour-promise {
    padding: 20px;

    border: 1px solid #d8e5fa;
    border-radius: 8px;

    background: #f4f8ff;
}

.pef-24-hour-promise strong {
    display: block;

    margin-bottom: 8px;

    color: #0967f2;

    font-size: 20px;
}

.pef-24-hour-promise p {
    margin: 0;

    color: #637081;

    font-size: 14px;
    line-height: 1.6;
}

.pef-success-done {
    min-width: 160px;

    margin-top: 24px;
    padding: 13px 26px;

    border: 0;
    border-radius: 5px;

    background: #0967f2;
    color: #fff;

    font-size: 15px;

    cursor: pointer;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .pef-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .pef-wrapper {
        padding: 25px 15px;
    }

    .pef-card {
        padding: 22px 18px;
    }

    .pef-progress {
        padding: 20px 10px;
        margin-bottom: 35px;
    }

    .pef-step {
        width: auto;
        flex: 0 0 80px;
    }

    .pef-step strong {
        font-size: 11px;
    }

    .pef-line {
        margin-left: 4px;
        margin-right: 4px;
    }

    .pef-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .pef-title h2 {
        font-size: 20px;
    }

    .pef-preview {
        grid-template-columns: repeat(3, 1fr);
    }

    .pef-guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pef-submit {
        width: 100%;
    }

    .pef-success-dialog {
        padding: 38px 22px 28px;
    }

    .pef-success-dialog h2 {
        font-size: 24px;
    }

    .pef-24-hour-promise strong {
        font-size: 18px;
    }

    .pef-success-done {
        width: 100%;
    }

}
