/* Listings / MLS search page */

:root {
    --listings-gold: #d4af77;
    --listings-gold-hover: #c9a05e;
    --listings-navy: #0f172a;
}

.listings-page {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    min-height: 100vh;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0));
}

/* ——— Nav ——— */
.listings-nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 40;
}

.listings-nav-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.listings-nav-logo img {
    height: 2.15rem;
    width: auto;
}

.listings-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.listings-nav-links a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.listings-nav-links a:hover {
    color: #0f172a;
}

.listings-nav-phone {
    color: #0f172a !important;
}

.listings-nav-cta {
    background: linear-gradient(145deg, #e8cc96, var(--listings-gold));
    color: #1a1208 !important;
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(212, 175, 119, 0.35);
}

@media (max-width: 480px) {
    .listings-nav-links a:not(.listings-nav-cta):not(.listings-nav-phone) {
        display: none;
    }
}

/* ——— Hero ——— */
.listings-hero {
    background: linear-gradient(165deg, #0b1220 0%, var(--listings-navy) 55%, #1e293b 100%);
    color: #e2e8f0;
    padding: 1.75rem 1rem 1.5rem;
}

.listings-hero-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.listings-hero-copy {
    max-width: 36rem;
}

.listings-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    color: #fff;
}

.listings-hero-lead {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}

.listings-hero-lead strong {
    color: var(--listings-gold);
    font-weight: 600;
}

.listings-hero-cta {
    flex-shrink: 0;
}

.listings-hero-btn {
    display: inline-block;
    background: linear-gradient(145deg, #e8cc96, var(--listings-gold));
    color: #1a1208;
    font-weight: 800;
    font-size: 0.875rem;
    padding: 0.75rem 1.15rem;
    border-radius: 0.65rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(212, 175, 119, 0.4);
}

.listings-hero-btn:hover {
    background: linear-gradient(145deg, #f0d9a8, var(--listings-gold-hover));
}

@media (max-width: 640px) {
    .listings-hero-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .listings-hero-btn {
        width: 100%;
        text-align: center;
    }
}

/* ——— MLS IDX wrapper ——— */
.listings-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.listings-idx-section {
    margin: 0;
}

.listings-idx-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Instruction panel — navy + gold */
.listings-idx-guide {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(155deg, #0b1220 0%, var(--listings-navy) 48%, #1e293b 100%);
    color: #e2e8f0;
    padding: 1.25rem 1.15rem 1.15rem;
    border: 1px solid rgba(212, 175, 119, 0.22);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.listings-idx-guide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--listings-gold), transparent);
}

.listings-idx-guide-inner {
    position: relative;
    z-index: 1;
}

.listings-idx-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--listings-gold);
}

.listings-idx-guide-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 0.65rem;
}

.listings-idx-instruction {
    margin: 0 0 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #cbd5e1;
    max-width: 40rem;
}

.listings-idx-instruction strong {
    color: #fff;
    font-weight: 700;
}

.listings-idx-steps {
    margin: 0;
    padding: 0 0 0 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #94a3b8;
}

.listings-idx-steps li + li {
    margin-top: 0.35rem;
}

@media (min-width: 768px) {
    .listings-idx-guide {
        padding: 1.5rem 1.5rem 1.35rem;
    }
}

/* IDX embed card */
.listings-idx-card {
    background: #fff;
    border-radius: 1rem;
    overflow: visible;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 20px 48px rgba(15, 23, 42, 0.1);
}

.listings-idx-frame-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.listings-idx-frame-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #cbd5e1;
}

.listings-idx-frame-dot:first-child {
    background: #f87171;
}

.listings-idx-frame-dot:nth-child(2) {
    background: #fbbf24;
}

.listings-idx-frame-dot:nth-child(3) {
    background: #34d399;
}

.listings-idx-frame-title {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.listings-idx-wrap {
    background: #f8fafc;
    padding: 0;
}

/* Tall embed: one page scroll; overrides global styles.css iframe caps */
.listings-page .listings-idx-wrap .idx-map-frame,
.listings-page .listings-idx-wrap #idx-root {
    width: 100%;
    min-height: 62.5rem;
    border: none;
    border-radius: 0;
    background: #fff;
    overflow: visible;
}

.listings-page .listings-idx-wrap #idx-root.idx-mounted {
    min-height: 62.5rem;
}

.listings-page .listings-idx-wrap #idx-root iframe,
.listings-page .listings-idx-wrap .idx-iframe {
    display: block;
    width: 100% !important;
    min-height: 62.5rem;
    max-height: none !important;
    border: 0;
    border-radius: 0;
}

.listings-idx-wrap .idx-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 320px;
    padding: 2.5rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.listings-idx-loading-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
}

.listings-disclaimer {
    margin: 1rem 0 0;
    font-size: 0.6875rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
}

/* ——— Footer ——— */
.listings-footer {
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    font-size: 0.75rem;
    color: #64748b;
}

.listings-footer a {
    color: #b8860b;
    text-decoration: none;
    font-weight: 600;
}

.listings-footer a:hover {
    text-decoration: underline;
}

.listings-footer p {
    margin: 0.25rem 0;
}

/* ——— Inquiry modal ——— */
.listings-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.listings-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.listings-modal-overlay[hidden] {
    display: none !important;
}

.listings-modal {
    width: 100%;
    max-width: 22rem;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem 1.2rem 1.15rem;
    position: relative;
    border-top: 3px solid var(--listings-gold);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
    color: #0f172a;
}

.listings-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.listings-modal-eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b8860b;
    margin: 0 0 0.25rem;
}

.listings-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    padding-right: 1.5rem;
}

.listings-modal-lead {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 1rem;
    line-height: 1.45;
}

.listings-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.listings-modal-field label,
.listings-contact-pick legend {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.listings-opt {
    font-weight: 400;
    color: #94a3b8;
}

.listings-contact-pick {
    border: none;
    margin: 0;
    padding: 0;
}

.listings-contact-pick legend {
    padding: 0;
}

.listings-contact-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
}

.listings-contact-option {
    display: block;
    cursor: pointer;
}

.listings-contact-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.listings-contact-option span {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.5rem 0.35rem;
    border-radius: 0.5rem;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.listings-contact-option input:checked + span {
    border-color: var(--listings-gold);
    background: #fffbeb;
    color: #1a1208;
}

.listings-modal-field.hidden,
.listings-contact-followup.hidden {
    display: none;
}

.listings-contact-followup {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.listings-modal-field input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #0f172a;
}

.listings-modal-field input:focus {
    outline: none;
    border-color: var(--listings-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 119, 0.25);
}

.listings-modal-consent {
    display: flex;
    gap: 0.45rem;
    font-size: 0.7rem;
    color: #64748b;
    align-items: flex-start;
    cursor: pointer;
}

.listings-modal-consent input {
    margin-top: 0.1rem;
    accent-color: var(--listings-gold);
}

.listings-modal-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #1a1208;
    background: linear-gradient(145deg, #e8cc96, var(--listings-gold));
    box-shadow: 0 4px 14px rgba(212, 175, 119, 0.4);
}

.listings-modal-submit:hover {
    background: linear-gradient(145deg, #f0d9a8, var(--listings-gold-hover));
}

.listings-modal-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.listings-modal-note {
    font-size: 0.6875rem;
    color: #94a3b8;
    text-align: center;
    margin: 0.35rem 0 0;
}

.listings-modal-error {
    font-size: 0.75rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    margin: 0;
}

.listings-modal-error.hidden {
    display: none;
}

.listings-modal-success {
    text-align: center;
    padding: 0.5rem 0;
}

.listings-modal-success.hidden {
    display: none;
}

.listings-modal-success h3 {
    font-size: 1.1rem;
    margin: 0 0 0.35rem;
}

.listings-modal-success #listing-modal-success-copy {
    color: #334155;
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 0 0 1rem;
}

.listings-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.listings-success-close {
    width: 100%;
    border: none;
    background: none;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem;
}

/* ——— Floating inquiry button ——— */
.listings-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #1a1208;
    background: linear-gradient(145deg, #e8cc96, var(--listings-gold));
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.listings-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.32), 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.listings-fab-text {
    line-height: 1.2;
    text-align: left;
}

.listings-fab-count {
    flex-shrink: 0;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: var(--listings-navy);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 1.35rem;
    text-align: center;
}

.listings-fab-count.hidden {
    display: none;
}

@media (min-width: 640px) {
    .listings-fab {
        right: 1.25rem;
        bottom: 1.25rem;
        font-size: 0.875rem;
        padding: 0.85rem 1.15rem;
    }
}

/* ——— Multi-property list ——— */
.listings-draft-hint {
    font-size: 0.75rem;
    font-weight: 600;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.4rem;
    padding: 0.35rem 0.5rem;
    margin: 0 0 0.65rem;
}

.listings-draft-hint.hidden {
    display: none;
}

.listings-properties-block {
    margin-bottom: 0.15rem;
}

.listings-properties-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.listings-properties-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.listings-property-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.listings-property-row input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.65rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: #0f172a;
}

.listings-property-row input:focus {
    outline: none;
    border-color: var(--listings-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 119, 0.25);
}

.listings-property-remove {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.4rem;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.listings-property-remove:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.listings-property-remove.hidden {
    visibility: hidden;
    pointer-events: none;
}

.listings-add-property {
    margin-top: 0.35rem;
    width: 100%;
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.listings-add-property:hover {
    border-color: var(--listings-gold);
    color: #1a1208;
    background: #fffbeb;
}

.listings-modal {
    max-height: min(90vh, 40rem);
    overflow-y: auto;
}
