/* ═══════════════════════════════════════════════════════════════════
   EL Broker — Property Search Form & Listing Cards
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --elb-teal:       #2cacad;
    --elb-navy:       #1a2547;
    --elb-btn-dark:   #1c2b4a;
    --elb-btn-green:  #365659;
    --elb-border:     #e2e5ea;
    --elb-label-clr:  #6b7280;
    --elb-radius:     4px;
    --elb-card-gap:   24px;
}

/* ── Wrapper ──────────────────────────────────────────────────────── */
.elb-search-wrapper {
    position: relative;
    width: 100%;
}

/* ── Form Card ────────────────────────────────────────────────────── */
.elb-search-form {
    background: #fff;
    padding: 32px 32px 24px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.07);
}

/* ── Form Rows ────────────────────────────────────────────────────── */
.elb-form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.elb-row-1 {
    grid-template-columns: 1fr 1fr 1fr;
}

.elb-row-2 {
    grid-template-columns: 2fr 1fr 1fr 2fr 2fr;
    align-items: start;
}

.elb-row-submit {
    display: grid;
    gap: 0;
    margin-bottom: 0;
}

@media (max-width: 1100px) {
    .elb-row-2 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .elb-row-2 .elb-field-slider {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .elb-search-form {
        padding: 20px;
    }
    .elb-row-1,
    .elb-row-2 {
        grid-template-columns: 1fr;
    }
    .elb-row-2 .elb-field-slider {
        grid-column: auto;
    }
}

/* ── Field Labels ─────────────────────────────────────────────────── */
.elb-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elb-form-field > label {
    font-size: 13px;
    font-weight: 500;
    color: var(--elb-label-clr);
    letter-spacing: 0.01em;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: block;
}

/* ── Select Styling ───────────────────────────────────────────────── */
.elb-select-wrap {
    position: relative;
}

.elb-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--elb-navy);
    pointer-events: none;
}

.elb-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--elb-border);
    border-radius: var(--elb-radius);
    padding: 11px 36px 11px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--elb-navy);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s;
    line-height: 1.3;
}

.elb-select:focus,
.elb-select:hover {
    border-color: var(--elb-teal);
}

/* ── Text Input ───────────────────────────────────────────────────── */
.elb-input {
    width: 100%;
    border: 1.5px solid var(--elb-border);
    border-radius: var(--elb-radius);
    padding: 11px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--elb-navy);
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s;
    line-height: 1.3;
}

.elb-input:focus,
.elb-input:hover {
    border-color: var(--elb-teal);
}

.elb-input::placeholder {
    font-weight: 400;
    color: #aab0bb;
}

/* ── Autocomplete ─────────────────────────────────────────────────── */
.elb-field-autocomplete {
    position: relative;
}

.elb-autocomplete-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--elb-teal);
    border-radius: var(--elb-radius);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.elb-autocomplete-list li {
    padding: 10px 14px;
    font-size: 14px;
    color: var(--elb-navy);
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f3f4f6;
}

.elb-autocomplete-list li:last-child {
    border-bottom: none;
}

.elb-autocomplete-list li:hover {
    background: #f0fafa;
    color: var(--elb-teal);
}

/* ── Range Sliders ────────────────────────────────────────────────── */
.elb-field-slider {
    padding-bottom: 4px;
}

.elb-slider {
    margin: 6px 4px 14px;
}

/* noUiSlider custom theme */
.noUi-target {
    background: #e2e5ea;
    border-radius: 3px;
    border: none;
    box-shadow: none;
    height: 4px;
}

.noUi-connect {
    background: var(--elb-navy);
}

.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    top: -7px !important;
    right: -9px !important;
    border-radius: 50%;
    background: var(--elb-navy);
    border: 2.5px solid #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    cursor: pointer;
    outline: none;
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.elb-slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--elb-label-clr);
    margin-top: 2px;
    line-height: 1;
}


.elb-form-standalone {
    width: 100%;
}

/* ── Submit Button ────────────────────────────────────────────────── */
.elb-btn-search {
    width: 100%;
    background: var(--elb-btn-green);
    color: #fff;
    border: none;
    border-radius: var(--elb-radius);
    padding: 16px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
    text-align: center;
}

.elb-btn-search:hover {
    background: #253461;
}

/* ── Quick Search Link ────────────────────────────────────────────── */
.elb-quick-search-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--elb-navy);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s;
    user-select: none;
}

.elb-quick-search-link:hover {
    opacity: 1;
}

/* ── Results Area ─────────────────────────────────────────────────── */
.elb-results-area {
    position: relative;
    margin-top: 40px;
    min-height: 100px;
    transition: opacity 0.25s;
}

.elb-results-area.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Loading Spinner ──────────────────────────────────────────────── */
.elb-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    z-index: 10;
    pointer-events: none;
}

.elb-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--elb-border);
    border-top-color: var(--elb-teal);
    border-radius: 50%;
    animation: elb-spin 0.75s linear infinite;
}

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

/* ── Results Grid ─────────────────────────────────────────────────── */
.elb-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--elb-card-gap);
}

@media (max-width: 1024px) {
    .elb-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .elb-results-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Listing Card ─────────────────────────────────────────────────── */
.elb-listing-card {
    border: 2px solid var(--elb-teal);
    border-radius: var(--elb-radius);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.elb-listing-card:hover {
    box-shadow: 0 6px 24px rgba(44, 172, 173, 0.18);
    transform: translateY(-3px);
}

.elb-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: block;
}

.elb-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.elb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.elb-listing-card:hover .elb-card-image img {
    transform: scale(1.04);
}

.elb-no-image {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
}

.elb-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* ── Card Header ─────────────────────────────────────────────────── */
.elb-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elb-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 48px;
    margin: 0;
    color: var(--elb-navy);
}

.elb-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.elb-card-title a:hover {
    color: var(--elb-teal);
}

.elb-card-location {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--elb-navy);
    margin: 0;
}

/* ── Card Amenities ──────────────────────────────────────────────── */
.elb-card-amenities {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.elb-amenity {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.elb-amenity-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
}

.elb-amenity span {
    font-size: 14px;
    font-weight: 800;
    color: var(--elb-teal);
    line-height: 1;
    white-space: nowrap;
}

/* ── Card Footer ─────────────────────────────────────────────────── */
.elb-card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(26, 37, 71, 0.12);
    padding-top: 16px;
    margin-top: auto;
    gap: 12px;
}

.elb-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--elb-navy);
    white-space: nowrap;
}

.elb-card-btn {
    display: inline-block;
    background: var(--elb-btn-green);
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: var(--elb-radius);
    transition: background 0.18s;
    white-space: nowrap;
    line-height: 1;
}

.elb-card-btn:hover {
    background: #2a4346;
    color: #fff;
    text-decoration: none;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.elb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.elb-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1.5px solid var(--elb-border);
    background: #fff;
    color: var(--elb-navy);
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elb-page-btn:hover {
    border-color: var(--elb-teal);
    color: var(--elb-teal);
}

.elb-page-btn.active {
    background: var(--elb-btn-green);
    border-color: var(--elb-btn-green);
    color: #fff;
}

/* ── View More link ──────────────────────────────────────────────── */
.elb-view-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.elb-view-more-btn {
    display: inline-block;
    padding: 12px 32px;
    color: #2CACAD;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-decoration:  underline;
}

.elb-view-more-btn:hover {
    transition: all 0.2s;
    text-decoration: none;
}

.elb-page-dots {
    color: var(--elb-label-clr);
    padding: 0 4px;
    font-size: 14px;
}

/* ── Homepage Search Tabs ────────────────────────────────────────── */
.elb-home-search {
    background: #fff;
    border-radius: var(--elb-radius);
    overflow: visible;
    width: 100%;
}

.elb-home-tabs {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: 1px solid var(--elb-border);
}

.elb-home-tabs__list {
    display: flex;
    gap: 0;
}

.elb-home-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 16px 28px;
    font-size: 14px;
    font-weight: 700;
    color: var(--elb-label-clr);
    cursor: pointer;
    letter-spacing: 0.06em;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.elb-home-tab:hover {
    color: var(--elb-teal);
}

.elb-home-tab.active {
    border-bottom-color: var(--elb-navy);
    color: var(--elb-navy);
}

.elb-home-advanced {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: var(--elb-navy);
    text-decoration: none;
    padding: 0 20px;
    transition: color 0.15s;
}

.elb-home-advanced:hover {
    color: var(--elb-teal);
}

.elb-home-advanced svg {
    flex-shrink: 0;
}

.elb-home-panel {
    display: none;
    padding: 20px 20px 24px;
}

.elb-home-panel.active {
    display: block;
}

.elb-home-fields {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.elb-hf-field {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    position: relative;
}

.elb-hf-field > label {
    font-size: 12px;
    color: var(--elb-label-clr);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Tall selects in home form */
.elb-home-fields .elb-select-wrap,
.elb-home-fields .elb-select {
    height: 50px;
}

.elb-home-fields .elb-select {
    font-size: 15px;
    padding: 0 36px 0 14px;
}

/* Tall text input in home form */
.elb-home-fields .elb-input {
    height: 50px;
    font-size: 15px;
    padding: 0 14px;
    border: 1.5px solid var(--elb-border);
    border-radius: var(--elb-radius);
    width: 100%;
    box-sizing: border-box;
    outline: none;
    background: #fff;
    color: var(--elb-navy);
    transition: border-color 0.15s;
}

.elb-home-fields .elb-input:focus {
    border-color: var(--elb-teal);
}

/* Submit button */
.elb-btn-home-search {
    flex-shrink: 0;
    height: 50px;
    padding: 0 28px;
    background: #365659;
    color: #fff;
    border: none;
    border-radius: var(--elb-radius);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    align-self: flex-end;
}

.elb-btn-home-search:hover {
    background: var(--elb-teal);
}

/* ── No Results ──────────────────────────────────────────────────── */
.elb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--elb-label-clr);
    font-size: 16px;
}
