﻿/* Root widget */
/* FORCE CORRECT GRID BEHAVIOR */
#broker-widget {
    font-family: Arial, sans-serif;
    width: 100%;
    text-align: center;
    padding-top: 40px; /* ADJUST THIS VALUE */
}
/*Title*/
.broker-widget-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 20px;
}

.broker-widget-header {
    background: #f5f5f5;
    padding: 10px 15px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.broker-grid {
    padding: 15px;
}
/* THIS is the correct, final grid */
.broker-grid {
    display: grid !important;
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(260px, 260px)) !important;
    justify-content: center !important;
    gap: 20px !important;
}

/* Listing cards */
.broker-card {
    width: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform .15s ease;
}

    .broker-card:hover {
        transform: translateY(-4px);
    }

.broker-card-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.broker-card-body {
    padding: 12px;
    text-align: left;
}

.broker-price {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.broker-address {
    font-size: .95rem;
    color: #444;
    margin-bottom: 6px;
}

.broker-meta {
    font-size: .85rem;
    color: #666;
}

/* Disclaimer */
.mls-disclaimer {
    font-size: 11px;
    color: #666;
    padding: 10px 4px;
    line-height: 1.4;
    max-width: 700px;
    margin: 15px auto 0 auto;
    text-align: center;
}

/* Modal backdrop */
.broker-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal container */
.broker-modal {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: brokerFadeIn .25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal close button */
.broker-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    color: white;
    cursor: pointer;
}

/* Detail content */
.broker-detail-content {
    padding: 16px;
}

/* Detail sections */
.mls-detail-section {
    margin-top: 20px;
}

/* Feature grids */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 12px;
}

.hoa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

/* Contact form */
.broker-contact {
    padding: 20px;
    margin-top: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

    .broker-contact input,
    .broker-contact textarea {
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

#bc-submit {
    width: 100%;
    padding: 12px;
    background: #0078ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Carousel */
.broker-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #000;
}

.broker-carousel-inner {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform .3s ease;
}

    .broker-carousel-inner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        flex-shrink: 0;
    }

.broker-carousel-prev,
.broker-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.broker-carousel-prev {
    left: 10px;
}

.broker-carousel-next {
    right: 10px;
}

/* Fade animation */
@keyframes brokerFadeIn {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
