/* Self-hosted contact form. Brand: navy #221e71, green #007e3f. */

.cpr-form-title {
    margin: 0 0 .5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #221e71;
}

.cpr-form-intro {
    margin: 0 0 1.5rem;
    color: #5a5a68;
}

/* Off-screen, NOT display:none. */
.cpr-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cpr-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 1.25rem;
}

.cpr-field { margin-bottom: 1.15rem; }

.cpr-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .85rem;
    font-weight: 600;
    color: #24242e;
}

.cpr-input {
    width: 100%;
    padding: .7rem .85rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: #24242e;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.cpr-input:focus {
    outline: none;
    border-color: #007e3f;
    box-shadow: 0 0 0 3px rgba(0, 126, 63, .12);
}

.cpr-textarea { min-height: 150px; resize: vertical; }

.cpr-input[aria-invalid="true"] { border-color: #c0392b; }

.cpr-error {
    display: block;
    margin-top: .3rem;
    font-size: .82rem;
    color: #c0392b;
}

.cpr-privacy {
    margin: 1rem 0 0;
    font-size: .8rem;
    color: #6a6a78;
}

/* ---------- Submit button ---------- */
.cpr-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-width: 210px;                 /* stops the width jumping */
    padding: .85rem 1.75rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #007e3f 0%, #00522a 100%);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .25s ease;
}

.cpr-submit:hover { background: linear-gradient(135deg, #00522a 0%, #003d1f 100%); }
.cpr-submit:focus-visible { outline: 3px solid #7ce0aa; outline-offset: 2px; }

.cpr-submit .cpr-submit-busy { display: none; }
.cpr-submit.is-busy .cpr-submit-idle { display: none; }
.cpr-submit.is-busy .cpr-submit-busy { display: inline-flex; align-items: center; gap: 10px; }
.cpr-submit[disabled] { opacity: .8; cursor: progress; }

.cpr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: none;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cpr-spin .7s linear infinite;
}

@keyframes cpr-spin { to { transform: rotate(360deg); } }

/* Locked while in flight. Reads as "busy", not as "broken". */
.cpr-form.is-sending .cpr-input { opacity: .55; cursor: progress; }

/* ---------- Status region ---------- */
.cpr-form-status { display: none; }

.cpr-form-status.is-visible {
    display: block;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border-radius: 4px;
}

.cpr-form-status.is-sending { background: #f1f4f2; border-left: 4px solid #221e71; }
.cpr-form-status.is-error   { background: #fdf1f3; border-left: 4px solid #c0392b; color: #8c2318; }

.cpr-status-line { display: flex; align-items: center; gap: 12px; }
.cpr-status-line .cpr-spinner { border-color: rgba(34, 30, 113, .25); border-top-color: #221e71; }

/* Indeterminate bar. You cannot know how long SMTP will take, so show motion,
   never a fake percentage that stalls at 90%. */
.cpr-progress {
    display: block;
    height: 3px;
    margin-top: 12px;
    border-radius: 2px;
    background: rgba(34, 30, 113, .14);
    overflow: hidden;
}

.cpr-progress::after {
    content: "";
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: #221e71;
    animation: cpr-indeterminate 1.15s ease-in-out infinite;
}

@keyframes cpr-indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ---------- Completion panel ---------- */
.cpr-complete { text-align: center; padding: 2.25rem 1.5rem; }
.cpr-complete.is-hidden { display: none; }

.cpr-complete h3 {
    margin: 0 0 .6rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #221e71;
}

.cpr-complete p { margin: 0 0 1.5rem; color: #5a5a68; }

/* A tick drawn in CSS has no dependency and cannot fail to render the way a
   dynamically inserted icon-font element can. */
.cpr-complete-icon {
    display: block;
    width: 62px;
    height: 62px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: #007e3f;
    position: relative;
    animation: cpr-pop .35s cubic-bezier(.2, .8, .3, 1.2);
}

.cpr-complete-icon::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 14px;
    width: 13px;
    height: 26px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    animation: cpr-check .3s ease-out .16s backwards;
}

@keyframes cpr-pop   { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cpr-check { from { opacity: 0; transform: rotate(45deg) scale(.5); } to { opacity: 1; transform: rotate(45deg) scale(1); } }

/* ------------------------------------------------------------------
   PROPERTY ENQUIRY CARD
   Shown only when the visitor arrived from a listing (/contact?mls=).
   Matching the property cards elsewhere on the site: green accents,
   soft green-tinted shadow, same radius family.
   ------------------------------------------------------------------ */
.cpr-property {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0 0 1.6rem;
    padding: .85rem;
    border: 1px solid #e0eae4;
    border-radius: 14px;
    background: #f7fbf9;
}

.cpr-property-thumb {
    flex: none;
    width: 104px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
    background: #eef1ef;
}

.cpr-property-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a6b3ac;
    font-size: 1.4rem;
}

.cpr-property-body { min-width: 0; }

.cpr-property-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1d2b24;
}

.cpr-property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem .75rem;
    margin: .2rem 0 0;
    font-size: .85rem;
    color: #6a7a72;
}

.cpr-property-price { font-weight: 700; color: #007e3f; }

.cpr-property-link,
.cpr-property-link:hover,
.cpr-property-link:focus,
.cpr-property-link:active,
.cpr-property-link:visited {
    display: inline-block;
    margin-top: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: #007e3f;
    text-decoration: none;
}

.cpr-property-link:hover,
.cpr-property-link:focus { text-decoration: underline; }

@media (max-width: 430px) {
    .cpr-property { flex-direction: column; align-items: flex-start; }
    .cpr-property-thumb { width: 100%; height: 130px; }
}

/* A frozen spinner conveys nothing, so slow the motion rather than stop it,
   and drop the flourishes that only decorate. */
@media (prefers-reduced-motion: reduce) {
    .cpr-spinner { animation-duration: 2.4s; }
    .cpr-progress::after { animation-duration: 3s; }
    .cpr-complete-icon, .cpr-complete-icon::after { animation: none; }
}
