/**
 * Mo Realty Team - IDX/VOW Search Styles
 * Matches existing site design system
 */

/* ===== IDX BROKERAGE LINE (Compliance) ===== */
.idx-brokerage {
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--light-gray);
}

/* ===== SEARCH FILTERS ===== */
.idx-search-filters {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.idx-filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.idx-filter-group {
    flex: 1;
    min-width: 140px;
}

.idx-filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.idx-filter-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--dark-gray);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239a9a9a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.idx-filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 154, 91, 0.15);
}

.idx-filter-btn-wrap {
    flex: 0 0 auto;
    min-width: auto;
}

.idx-search-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.idx-search-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* ===== RESULTS BAR ===== */
.idx-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

#idx-results-count {
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.idx-vow-status {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.idx-vow-status a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.idx-vow-status a:hover {
    text-decoration: underline;
}

.idx-vow-status .fa-check-circle {
    color: var(--success);
}

/* ===== NO RESULTS ===== */
.idx-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--medium-gray);
}

.idx-no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.idx-no-results p {
    font-size: 1rem;
}

/* ===== COMPLIANCE FOOTER ===== */
.idx-compliance-footer {
    margin-top: 32px;
    padding: 20px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-gray);
}

.idx-compliance-footer p {
    font-size: 0.75rem;
    color: var(--medium-gray);
    line-height: 1.5;
    margin-bottom: 8px;
}

.idx-compliance-footer p:last-child {
    margin-bottom: 0;
}

/* ===== MODAL: DETAIL TABLE ===== */
.idx-detail-table {
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.idx-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.idx-detail-row:nth-child(odd) {
    background: var(--off-white);
}

.idx-detail-row span:first-child {
    color: var(--medium-gray);
    font-weight: 500;
}

.idx-detail-row span:last-child {
    color: var(--dark-gray);
    font-weight: 600;
}

/* ===== MODAL: LISTING BROKERAGE (full) ===== */
.idx-listing-brokerage-full {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--medium-gray);
}

/* ===== MODAL: PRICE HISTORY ===== */
.idx-history-table {
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.idx-history-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
}

.idx-history-header span {
    flex: 1;
}

.idx-history-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.idx-history-row:nth-child(odd) {
    background: var(--off-white);
}

.idx-history-row span {
    flex: 1;
}

/* ===== MODAL: COMPARABLES ===== */
.idx-comps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.idx-comp-card {
    padding: 20px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.idx-comp-card:hover {
    border-color: var(--accent);
}

.idx-comp-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.idx-comp-address {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
    margin-bottom: 8px;
}

.idx-comp-meta {
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-bottom: 8px;
}

.idx-comp-sold {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
}

/* ===== MODAL: DISCLAIMER FOOTER ===== */
.idx-modal-footer {
    padding: 16px 32px;
    border-top: 1px solid var(--light-gray);
}

.idx-disclaimer {
    font-size: 0.7rem;
    color: var(--medium-gray);
    line-height: 1.5;
}

/* ===== VOW GATE (locked content) ===== */
.vow-gate {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(180deg, var(--off-white) 0%, rgba(200, 154, 91, 0.05) 100%);
    border-radius: var(--radius);
    border: 2px dashed var(--light-gray);
}

.vow-gate-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 16px;
}

.vow-gate h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.vow-gate p {
    color: var(--medium-gray);
    max-width: 400px;
    margin: 0 auto 24px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.vow-gate-btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary.vow-gate-btn {
    background: var(--accent);
    color: var(--white);
}

.btn-primary.vow-gate-btn:hover {
    background: var(--accent-dark);
}

.btn-secondary.vow-gate-btn {
    background: var(--off-white);
    color: var(--primary);
    border: 1.5px solid var(--light-gray);
}

.btn-secondary.vow-gate-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== VOW AUTH MODAL ===== */
.vow-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.vow-auth-overlay.active {
    display: flex;
}

.vow-auth-box {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalIn 0.3s ease;
    overflow: hidden;
}

.vow-auth-header {
    padding: 32px 32px 0;
    text-align: center;
}

.vow-auth-header h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.vow-auth-header p {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.vow-auth-form {
    padding: 24px 32px;
}

.vow-form-group {
    margin-bottom: 16px;
}

.vow-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.vow-form-group input[type="text"],
.vow-form-group input[type="email"],
.vow-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--dark-gray);
    transition: var(--transition);
    box-sizing: border-box;
}

.vow-form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 154, 91, 0.15);
}

.vow-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.vow-form-check input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent);
}

.vow-form-check label {
    font-size: 0.8rem;
    color: var(--medium-gray);
    line-height: 1.4;
}

.vow-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.vow-submit-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.vow-auth-footer {
    padding: 16px 32px;
    text-align: center;
    background: var(--off-white);
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* ===== IDX TEASER SECTION (HOME PAGE) ===== */
.idx-teaser-section {
    position: relative;
}

.idx-teaser-cta {
    text-align: center;
    margin-top: 32px;
}

.idx-teaser-cta a {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.idx-teaser-cta a:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .idx-filter-row {
        flex-direction: column;
        gap: 12px;
    }

    .idx-filter-group {
        min-width: 100%;
    }

    .idx-filter-btn-wrap {
        min-width: 100%;
    }

    .idx-search-btn {
        width: 100%;
    }

    .idx-results-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .idx-comps-grid {
        grid-template-columns: 1fr;
    }

    .vow-gate-btn {
        display: block;
        width: 100%;
        margin: 8px 0 !important;
    }

    .idx-modal-footer {
        padding: 12px 16px;
    }

    .vow-auth-box {
        max-width: 100%;
    }

    .vow-auth-header,
    .vow-auth-form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .idx-history-header,
    .idx-history-row {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .idx-detail-row {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .idx-search-filters {
        padding: 16px;
    }

    .vow-auth-header {
        padding: 24px 16px 0;
    }

    .vow-auth-form {
        padding: 16px;
    }
}
