/* Park27 Home Sale Calculator */
.p27h-calc {
    --p27h-blue:     #69151A;
    --p27h-blue-mid: #8B1E24;
    --p27h-bg:       #F2EDE5;
    --p27h-border:   #ddd5ca;
    --p27h-text:     #2c2c2c;
    --p27h-radius:   8px;
    font-family: inherit;
    color: var(--p27h-text);
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--p27h-border);
    border-radius: var(--p27h-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

/* Two-column body */
.p27h-calc__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* Inputs panel */
.p27h-calc__inputs {
    flex: 1 1 340px;
    padding: 24px;
    background: var(--p27h-bg);
    border-right: 1px solid var(--p27h-border);
}

/* Results panel */
.p27h-calc__results {
    flex: 1 1 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Rows / fields */
.p27h-calc__row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.p27h-calc__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.p27h-calc__field--pct {
    max-width: 90px;
    flex: 0 0 90px;
}
.p27h-calc__field label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--p27h-text);
}

/* Input wrappers */
.p27h-calc__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.p27h-calc__input,
.p27h-calc__select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--p27h-border);
    border-radius: 5px;
    font-size: .92rem;
    background: #fff;
    color: var(--p27h-text);
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
    appearance: auto;
}
.p27h-calc__input:focus,
.p27h-calc__select:focus {
    border-color: var(--p27h-blue);
    box-shadow: 0 0 0 3px rgba(105,21,26,.12);
}
.p27h-calc__input-wrap--prefix .p27h-calc__input { padding-left: 22px; }
.p27h-calc__input-wrap--suffix .p27h-calc__input { padding-right: 30px; }
.p27h-calc__prefix,
.p27h-calc__suffix {
    position: absolute;
    font-size: .85rem;
    color: #8a9ab0;
    pointer-events: none;
    user-select: none;
}
.p27h-calc__prefix { left: 8px; }
.p27h-calc__suffix { right: 8px; }

/* Monthly / Net proceeds */
.p27h-calc__monthly {
    text-align: center;
    width: 100%;
}
.p27h-calc__monthly-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7a8d;
    margin-bottom: 4px;
}
.p27h-calc__monthly-amount {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--p27h-blue);
    line-height: 1;
}

/* Price / Total costs summary row */
.p27h-calc__summary {
    display: flex;
    gap: 16px;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid var(--p27h-border);
    border-bottom: 1px solid var(--p27h-border);
}
.p27h-calc__summary-item {
    flex: 1;
}
.p27h-calc__summary-label {
    display: block;
    font-size: .75rem;
    color: #6b7a8d;
    margin-bottom: 3px;
}
.p27h-calc__summary-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--p27h-text);
}

/* Donut chart */
.p27h-calc__donut-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}
.p27h-calc__donut-wrap canvas {
    display: block;
}

/* Breakdown list */
.p27h-calc__breakdown {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    width: 100%;
    font-size: .88rem;
}
.p27h-calc__breakdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--p27h-border);
}
.p27h-calc__breakdown-item:last-child { border-bottom: none; }
.p27h-calc__legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}
.p27h-calc__breakdown-label { flex: 1; color: #4a5568; }
.p27h-calc__breakdown-val {
    font-weight: 600;
    color: var(--p27h-text);
    white-space: nowrap;
}

/* CTA button */
.p27h-calc__cta {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: var(--p27h-blue);
    color: #fff;
    text-align: center;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .03em;
    border: none;
    border-radius: var(--p27h-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    margin-bottom: 16px;
    box-sizing: border-box;
}
.p27h-calc__cta:hover {
    background: var(--p27h-blue-mid);
    color: #fff;
    text-decoration: none;
}

/* Disclaimer */
.p27h-calc__disclaimer {
    font-size: .72rem;
    color: #9a9a9a;
    line-height: 1.5;
    margin: auto 0 0;
}

/* Responsive */
@media (max-width: 600px) {
    .p27h-calc__inputs,
    .p27h-calc__results {
        flex-basis: 100%;
        border-right: none;
        border-bottom: 1px solid var(--p27h-border);
    }
    .p27h-calc__results { border-bottom: none; }
    .p27h-calc__monthly-amount { font-size: 1.8rem; }
    .p27h-calc__row { flex-direction: column; gap: 10px; }
    .p27h-calc__field--pct { max-width: 100%; flex: 1; }
}

/* ========================================================================
   GET ESTIMATE CTA + LEAD-CAPTURE MODAL
   ========================================================================
   The CTA sits at the bottom of the results column. Click opens a modal
   with a Gravity Form (the form ID is configurable via the shortcode's
   form_id attribute — defaults to 4 = Contact Form 2026).
*/

/* ---- CTA button ---- */
.p27h-calc__cta {
    display: block;
    width: 100%;
    margin: 24px 0 0;
    padding: 18px 28px;
    background: #104225;            /* park27 green */
    color: #ffffff;
    border: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.p27h-calc__cta:hover,
.p27h-calc__cta:focus-visible { background: #102717; outline: 0; }

/* ---- Modal: full-screen overlay + centered dialog ---- */
.p27h-cta-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(20px, 4vw, 60px) clamp(16px, 3vw, 32px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.p27h-cta-modal[hidden] { display: none; }
.p27h-cta-modal.is-open { opacity: 1; visibility: visible; }

.p27h-cta-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.p27h-cta-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    margin: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.p27h-cta-modal.is-open .p27h-cta-modal__dialog { transform: translateY(0) scale(1); }

.p27h-cta-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #555;
    transition: color 0.2s, background 0.2s;
    border-radius: 50%;
}
.p27h-cta-modal__close:hover,
.p27h-cta-modal__close:focus-visible {
    background: #f3f3f3;
    color: #000;
    outline: 0;
}

.p27h-cta-modal__title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

.p27h-cta-modal__form .gform_wrapper { margin: 0; }
.p27h-cta-modal__form .gform_fields { row-gap: 18px !important; }
.p27h-cta-modal__form .gfield_label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #222 !important;
    margin: 0 0 6px !important;
}
.p27h-cta-modal__form input[type="text"],
.p27h-cta-modal__form input[type="email"],
.p27h-cta-modal__form input[type="tel"],
.p27h-cta-modal__form select,
.p27h-cta-modal__form textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
}
.p27h-cta-modal__form .gform_button {
    width: 100% !important;
    margin: 8px 0 0 !important;
    padding: 14px 24px !important;
    background: #d24a26 !important;  /* orange like image 1 */
    color: #fff !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
.p27h-cta-modal__form .gform_button:hover { background: #b53a18 !important; }

.p27h-cta-modal__fallback {
    padding: 24px;
    background: #fff8ee;
    border: 1px dashed #d4a25a;
    border-radius: 6px;
    color: #6d4a13;
    font-size: 0.9rem;
}
.p27h-cta-modal__fallback code {
    background: #f3e4c2;
    padding: 2px 6px;
    border-radius: 3px;
}
