/**
 * Sales MLS Archive — Filter Bar Styles
 *
 * Matches the theme's existing listing filter bar pattern (.filters)
 * scoped to #smls-filters to avoid conflicts.
 */

/* ── Filter Bar Container ────────────────────────────────────────── */
#smls-filters {
    background: #F9F9F9;
    position: sticky;
    top: 60px;
    z-index: 1000;
}

@media (min-width: 576px) {
    #smls-filters { top: 90px; }
}

@media (min-width: 992px) {
    #smls-filters { top: 100px; }
}

.logged-in #smls-filters {
    top: 106px;
}

@media (min-width: 576px) {
    .logged-in #smls-filters { top: 122px; }
}

@media (min-width: 992px) {
    .logged-in #smls-filters { top: 132px; }
}

#smls-filters > .inner {
    padding: 30px 0 10px;
}

#smls-filters > .inner .select2-container {
    margin-bottom: 30px;
}

/* ── Simple Filters Row ──────────────────────────────────────────── */
#smls-simple-filters .input-group {
    width: 100%;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    #smls-simple-filters .input-group {
        margin-bottom: 0;
    }
}

#smls-simple-filters .form-control {
    background: #fff;
    color: #000;
    box-shadow: none;
    font-size: 14px;
    text-transform: uppercase;
    height: 51px;
    position: relative;
    padding: 10px 15px;
    border-radius: 0;
    border: 1px solid #000;
    transition: all 0.2s ease-in-out;
}

#smls-simple-filters .form-control:focus {
    background: rgba(0, 0, 0, 0.15);
    border-color: #000;
    box-shadow: none;
    outline: none;
}

/* ── Slider Containers ───────────────────────────────────────────── */
#smls-slider-price,
#smls-slider-length {
    padding-bottom: 30px;
}

@media (min-width: 992px) {
    #smls-slider-price,
    #smls-slider-length {
        padding-bottom: 0;
    }
}

#smls-slider-price p,
#smls-slider-length p {
    margin: 0;
    top: -8px;
    position: relative;
}

#smls-slider-price label,
#smls-slider-length label {
    font-size: 12px;
    text-transform: uppercase;
}

@media (min-width: 992px) {
    #smls-slider-price label,
    #smls-slider-length label {
        font-size: 10px;
    }
}

@media (min-width: 1200px) {
    #smls-slider-price label,
    #smls-slider-length label {
        font-size: 12px;
    }
}

#smls-slider-price input,
#smls-slider-length input {
    float: right;
    text-align: right;
    border: 0 transparent;
    font-weight: 600;
    color: #9a7b2e;
    padding-top: 5px;
    background: transparent;
    width: 90px;
    font-size: 10px;
}

@media (min-width: 992px) {
    #smls-slider-price input,
    #smls-slider-length input {
        font-size: 10px;
    }
}

@media (min-width: 1200px) {
    #smls-slider-price input,
    #smls-slider-length input {
        font-size: 12px;
    }
}

#smls-slider-price input:focus,
#smls-slider-length input:focus {
    outline: none;
}

/* ── jQuery UI Slider Theming ────────────────────────────────────── */
#smls-price-slider,
#smls-length-slider {
    margin: 0 8px;
}

#smls-filters .ui-slider-horizontal {
    height: 1px;
    top: 0;
}

#smls-filters .ui-widget.ui-widget-content {
    border: 0 solid transparent;
}

#smls-filters .ui-slider-horizontal .ui-slider-range {
    top: -1px;
    height: 3px;
}

#smls-filters .ui-widget-content {
    border: 10px solid #ff0000;
    background: #000;
    color: #000;
}

#smls-filters .ui-slider .ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 16px;
    height: 16px;
    cursor: pointer;
    -ms-touch-action: none;
    touch-action: none;
    border-radius: 10px;
    outline: none;
}

#smls-filters .ui-widget-header {
    border: 1px solid #000;
    background: #121212;
    color: #222;
    font-weight: 700;
}

#smls-filters .ui-button,
#smls-filters .ui-state-default,
#smls-filters .ui-widget-content .ui-state-default,
#smls-filters .ui-widget-header .ui-state-default {
    border: 10px solid transparent;
    background: #333;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

#smls-filters .ui-slider-horizontal .ui-slider-handle {
    top: -9px;
    margin-left: -9px;
}

/* ── More Options Button ─────────────────────────────────────────── */
#smls-more-options {
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fdba2e;
    width: 100%;
    height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    margin-bottom: 30px;
    transition: all 0.2s ease-in-out;
}

@media (min-width: 992px) {
    #smls-more-options {
        margin-bottom: 0;
    }
}

#smls-more-options:hover {
    color: #fff;
}

#smls-more-options .fewer {
    display: none;
}

/* ── Advanced Filters ────────────────────────────────────────────── */
#smls-advanced-filters {
    padding-top: 0;
    overflow: hidden;
    height: 0;
}

#smls-advanced-filters > .inner {
    padding: 20px 0 0;
}

#smls-advanced-filters .select2-container {
    margin-bottom: 30px;
}

/* ── Autocomplete Dropdown ────────────────────────────────────────── */
.ui-autocomplete.ui-menu {
    background: #fff;
    border: 1px solid #000;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10000 !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ui-autocomplete.ui-menu .ui-menu-item-wrapper {
    padding: 8px 15px;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
}

.ui-autocomplete.ui-menu .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete.ui-menu .ui-state-focus {
    background: #F9F9F9;
    border: none;
    color: #000;
    font-weight: 600;
}

/* ── Results Count ───────────────────────────────────────────────── */
.smls-results-count {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #888;
    padding: 8px 0;
    line-height: 36px;
}

.smls-results-count span {
    font-weight: 600;
    color: #333;
}

/* ── CTA Card ────────────────────────────────────────────────────── */
.yacht-cta-card .cta-card-content {
    background-color: rgba(10, 10, 10, 0.92);
    background-size: cover;
    background-position: center;
    padding: 50px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 420px;
    box-sizing: border-box;
    position: relative;
}

.yacht-cta-card .cta-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

.yacht-cta-card .cta-card-content::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(253, 186, 46, 0.5);
    pointer-events: none;
    z-index: 2;
}

.yacht-cta-card .cta-card-content h2 {
    line-height: 1.25;
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    z-index: 3;
}

.yacht-cta-card .cta-card-content p {
    margin-bottom: 40px;
    font-size: 1.1em;
    line-height: 1.7;
    color: #ccc;
    position: relative;
    z-index: 3;
}

.yacht-cta-card .cta-holder.gold-outline {
    position: relative;
    z-index: 3;
}

.yacht-cta-card .cta-holder.gold-outline a {
    background: #fdba2e;
    border-color: #fdba2e;
    color: #000;
}

.yacht-cta-card .cta-holder.gold-outline a:hover {
    background: #fdba2e;
    border-color: #fdba2e;
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 575px) {
    #smls-simple-filters .cta-holder {
        margin-bottom: 10px;
    }

    .yacht-cta-card .cta-card-content {
        min-height: 320px;
        padding: 30px;
    }
}

@media (min-width: 992px) {
    .yacht-cta-card {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .yacht-cta-card .cta-card-content {
        flex: 1;
        min-height: 0;
        height: auto;
    }
}

/* ── Spacing between filter bar and cards ─────────────────────── */
#listing .listing-entries {
    padding-top: 30px;
}

/* ── Card Image Overrides (match _card-image-sizes.scss for listing pages) ── */
#yachts > .card-yacht-listings .inner .featured-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#yachts > .card-yacht-listings .inner .featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}
