/* ============================================================
   PRS QUOTATION MODAL
   ============================================================ */

/* ─── Backdrop ─── */
.prs-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 25, 45, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.prs-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* ─── Modal box ─── */
.prs-modal {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 18px;
    background: var(--prs-white, #ffffff);
    box-shadow: 0 30px 80px rgba(20, 25, 45, 0.28);
    transform: scale(0.96) translateY(8px);
    transition: transform 220ms cubic-bezier(0.34, 1.2, 0.64, 1);
}

.prs-modal-backdrop.is-open .prs-modal {
    transform: scale(1) translateY(0);
}

/* ─── Header ─── */
.prs-modal-header {
    position: relative;
    padding: 24px 60px 18px 28px;
    border-bottom: 1px solid var(--prs-line, #e8e9ed);
}

.prs-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--prs-orange, #f8673b);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.prs-modal-title {
    margin: 0;
    color: var(--prs-navy, #2b3153);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.prs-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--prs-line, #e8e9ed);
    border-radius: 9px;
    background: var(--prs-white, #ffffff);
    color: var(--prs-muted, #697080);
    font-size: 14px;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.prs-modal-close:hover {
    border-color: var(--prs-orange, #f8673b);
    background: var(--prs-orange, #f8673b);
    color: #ffffff;
}

/* ─── Body ─── */
.prs-modal-body {
    padding: 22px 28px 8px;
}

/* ─── Estimate preview ─── */
.prs-modal-estimate {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff7f3;
    border: 1px solid rgba(248, 103, 59, 0.18);
}

.prs-modal-estimate-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--prs-orange-dark, #df4f25);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.prs-modal-estimate-range {
    color: var(--prs-navy, #2b3153);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.6px;
    line-height: 1.15;
}

.prs-modal-estimate-range span {
    color: var(--prs-orange, #f8673b);
}

.prs-modal-estimate-config {
    margin-top: 6px;
    color: var(--prs-muted, #697080);
    font-size: 11px;
    line-height: 1.5;
    font-weight: 600;
}

/* ─── Form fields ─── */
.prs-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.prs-modal-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: var(--prs-navy, #2b3153);
    font-size: 12px;
    font-weight: 750;
}

.prs-modal-label .prs-required {
    color: var(--prs-orange, #f8673b);
}

.prs-modal-input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--prs-line, #e8e9ed);
    border-radius: 10px;
    background: var(--prs-white, #ffffff);
    color: var(--prs-navy, #2b3153);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.prs-modal-input::placeholder {
    color: #a8adba;
    font-weight: 500;
}

.prs-modal-input:hover {
    border-color: rgba(248, 103, 59, 0.35);
}

.prs-modal-input:focus {
    border-color: var(--prs-orange, #f8673b);
    box-shadow: 0 0 0 3px rgba(248, 103, 59, 0.10);
}

.prs-modal-input.has-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.prs-modal-input-error {
    display: none;
    color: #dc2626;
    font-size: 10px;
    font-weight: 700;
    margin-top: -2px;
}

.prs-modal-input-error.is-visible {
    display: block;
}

/* ─── Actions ─── */
.prs-modal-actions {
    padding: 8px 28px 24px;
}

.prs-modal-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    background: var(--prs-orange, #f8673b);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.prs-modal-submit:hover:not(:disabled) {
    background: var(--prs-orange-dark, #df4f25);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(248, 103, 59, 0.25);
}

.prs-modal-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.prs-modal-submit i {
    font-size: 12px;
}

/* ─── Trust line ─── */
.prs-modal-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    color: var(--prs-muted, #697080);
    font-size: 10px;
    font-weight: 650;
}

.prs-modal-trust i {
    color: var(--prs-orange, #f8673b);
    font-size: 11px;
}

/* ─── General error banner ─── */
.prs-modal-alert {
    display: none;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid rgba(220, 38, 38, 0.20);
    color: #991b1b;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 650;
}

.prs-modal-alert.is-visible {
    display: flex;
}

.prs-modal-alert i {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 12px;
}

/* ─── Success state ─── */
.prs-modal-success {
    display: none;
    padding: 40px 32px 44px;
    text-align: center;
}

.prs-modal-success.is-visible {
    display: block;
}

.prs-modal-success-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 50%;
    background: rgba(52, 168, 83, 0.12);
    color: #1e7a3d;
    font-size: 34px;
    animation: prsSuccessPop 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes prsSuccessPop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.prs-modal-success h3 {
    margin: 0 0 10px;
    color: var(--prs-navy, #2b3153);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.prs-modal-success p {
    max-width: 360px;
    margin: 0 auto 26px;
    color: var(--prs-muted, #697080);
    font-size: 13px;
    line-height: 1.65;
    font-weight: 550;
}

.prs-modal-success strong {
    color: var(--prs-navy, #2b3153);
}

.prs-modal-success-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 24px;
    border: 1px solid var(--prs-line, #e8e9ed);
    border-radius: 10px;
    background: var(--prs-white, #ffffff);
    color: var(--prs-navy, #2b3153);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease;
}

.prs-modal-success-btn:hover {
    border-color: var(--prs-orange, #f8673b);
    color: var(--prs-orange, #f8673b);
}

/* ─── Hide scrollbar for clean look ─── */
.prs-modal::-webkit-scrollbar {
    width: 8px;
}
.prs-modal::-webkit-scrollbar-thumb {
    background: rgba(43, 49, 83, 0.18);
    border-radius: 4px;
}
.prs-modal::-webkit-scrollbar-track {
    background: transparent;
}

/* ─── Prevent body scroll when modal is open ─── */
body.prs-modal-locked {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 600px) {
    .prs-modal-backdrop {
        padding: 12px;
        align-items: flex-end;
    }

    .prs-modal {
        max-width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 18px 18px 0 0;
        transform: translateY(30px);
    }

    .prs-modal-backdrop.is-open .prs-modal {
        transform: translateY(0);
    }

    .prs-modal-header {
        padding: 20px 55px 16px 22px;
    }

    .prs-modal-title {
        font-size: 18px;
    }

    .prs-modal-body {
        padding: 18px 22px 6px;
    }

    .prs-modal-actions {
        padding: 6px 22px 22px;
    }

    .prs-modal-estimate-range {
        font-size: 19px;
    }

    .prs-modal-success {
        padding: 32px 22px 36px;
    }

    .prs-modal-success h3 {
        font-size: 19px;
    }
}