/* Contact Agent modal and inquiry feedback styles. */
body.is-contact-agent-open {
    overflow: hidden;
}

.contact-agent-modal[hidden],
.listing-inquiry-success[hidden] {
    display: none !important;
}

.contact-agent-modal {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.contact-agent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 23, 0.7);
    -webkit-backdrop-filter: blur(10px) saturate(0.82);
    backdrop-filter: blur(10px) saturate(0.82);
}

.contact-agent-dialog {
    position: relative;
    z-index: 1;
    width: min(30rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.8rem;
    color: #111b2b;
    background: rgba(255, 255, 255, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 24px;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.38), 0 0.35rem 1rem rgba(4, 20, 45, 0.16);
}

.contact-agent-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.contact-agent-header h2 {
    margin: 0;
    color: #0b1525;
    font-size: 1.55rem;
    line-height: 1.2;
}

.contact-agent-header p {
    margin: 0.65rem 0 0;
    color: #576174;
    font-size: 0.92rem;
    line-height: 1.5;
}

.contact-agent-close {
    display: grid;
    flex: 0 0 auto;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    place-items: center;
    color: #152033;
    background: #f1f4f8;
    border: 1px solid #e2e7ee;
    border-radius: 50%;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.contact-agent-close:hover,
.contact-agent-close:focus-visible {
    color: #ffffff;
    background: #172b49;
    transform: translateY(-1px);
}

.contact-agent-close svg {
    width: 1.22rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.contact-agent-form {
    display: grid;
    gap: 1.15rem;
}

.contact-agent-form > label {
    display: grid;
    gap: 0.48rem;
}

.contact-agent-form > label > span {
    color: #4c586b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.contact-agent-form select,
.contact-agent-form input {
    width: 100%;
    min-height: 3.45rem;
    padding: 0.78rem 0.95rem;
    color: #101b2d;
    background: #ffffff;
    border: 1px solid #cbd4e0;
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(20, 38, 64, 0.04);
    font: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.contact-agent-form select:focus,
.contact-agent-form input:focus {
    border-color: #2879ea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 121, 234, 0.16);
}

.contact-agent-error {
    margin: -0.25rem 0 0;
    padding: 0.72rem 0.82rem;
    color: #8f1e2e;
    background: #fff0f2;
    border: 1px solid #f3c7cd;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
}

.contact-agent-session-note {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: -0.1rem 0 0;
    padding: 0.7rem 0.8rem;
    color: #47566d;
    background: #f4f7fb;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.42;
}

.contact-agent-session-note svg {
    flex: 0 0 auto;
    width: 1.05rem;
    margin-top: 0.06rem;
    fill: #256cd5;
}

.contact-agent-submit {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    min-height: 3.55rem;
    padding: 0.8rem 1.2rem;
    color: #ffffff;
    background: #176fe3;
    border: 1px solid #1262d2;
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0.75rem 1.5rem rgba(21, 103, 218, 0.28);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.contact-agent-submit:hover,
.contact-agent-submit:focus-visible {
    background: #105fce;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0.9rem 1.8rem rgba(13, 82, 183, 0.38);
    outline: 3px solid rgba(42, 126, 239, 0.23);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.contact-agent-submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.contact-agent-submit svg {
    width: 1.18rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.listing-inquiry-success {
    position: absolute;
    z-index: 24;
    top: 0.9rem;
    left: 50%;
    display: flex;
    width: max-content;
    max-width: calc(100% - 1.5rem);
    min-height: 3.15rem;
    gap: 0.55rem;
    align-items: center;
    padding: 0.58rem 0.68rem 0.58rem 0.8rem;
    color: #ffffff;
    background: rgba(34, 157, 83, 0.97);
    border: 1px solid rgba(191, 255, 215, 0.65);
    border-radius: 12px;
    box-shadow: 0 0.8rem 1.8rem rgba(4, 47, 22, 0.38);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
    transform: translateX(-50%);
}

.listing-inquiry-success > svg {
    flex: 0 0 auto;
    width: 1.35rem;
    fill: rgba(255, 255, 255, 0.18);
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.listing-inquiry-success button {
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    place-items: center;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.listing-inquiry-success button:hover,
.listing-inquiry-success button:focus-visible {
    background: rgba(0, 0, 0, 0.16);
}

.listing-inquiry-success button svg {
    width: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

@media (max-width: 42rem) {
    .contact-agent-modal {
        align-items: end;
        padding: 0.7rem;
    }

    .contact-agent-dialog {
        width: 100%;
        max-height: calc(100vh - 1.4rem);
        padding: 1.25rem;
        border-radius: 20px;
    }

    .contact-agent-header {
        margin-bottom: 1.2rem;
    }

    .listing-inquiry-success {
        top: 0.7rem;
        font-size: 0.76rem;
    }}

@media (prefers-reduced-motion: reduce) {
    .contact-agent-close,
.contact-agent-submit {
        transition: none;
    }}
