/* ============================================================
 * Front Page Search Bar - Autograph Yachts
 * ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&display=swap");

#fp-search-bar {
    --fp-control-height: 44px;
    --fp-control-radius: 10px;
    --fp-control-bg: rgba(255, 255, 255, 0.94);
    --fp-control-border: rgba(255, 255, 255, 0.22);
    --fp-focus-ring: rgba(84, 153, 255, 0.28);
    --fp-focus-border: rgba(84, 153, 255, 0.72);
    --fp-filter-gap: 16px;
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.fp-hero-copy {
    max-width: 980px;
    margin: 0 auto 12px;
    padding: 0 12px;
    text-align: center;
    color: #fff;
    text-shadow: 0 6px 18px rgba(6, 20, 34, 0.28);
}

.fp-hero-copy__eyebrow,
.fp-hero-copy__subtitle,
.fp-hero-copy__examples {
    margin: 0;
}

.fp-hero-copy__eyebrow {
    color: #d9b56d;
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    font-size: clamp(14px, 1.3vw, 18px);
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.fp-hero-copy__title {
    margin: 10px 0 18px;
    color: #f6f8fb;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(48px, 6.4vw, 92px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.fp-hero-copy__title span {
    color: #d9b56d;
    font-style: italic;
    font-weight: 500;
}

.fp-hero-copy__subtitle {
    color: rgba(201, 212, 223, 0.92);
    font-size: clamp(14px, 1.35vw, 18px);
    font-weight: 500;
    line-height: 1.35;
}

.fp-hero-copy__examples {
    margin-top: 10px;
    color: rgba(230, 236, 242, 0.78);
    font-size: clamp(12px, 1.15vw, 14px);
    line-height: 1.35;
}

.fp-search-shell {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08)),
        rgba(11, 42, 66, 0.44);
    box-shadow:
        0 24px 48px rgba(5, 19, 34, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.fp-search-extras {
    margin-top: 24px;
}

.fp-main-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 175px 160px 134px;
    align-items: stretch;
    height: var(--fp-control-height);
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(208, 218, 230, 0.85);
    box-shadow: 0 10px 30px rgba(6, 28, 48, 0.14);
}

.fp-main-bar__search,
.fp-main-bar__select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    background: transparent;
}

.fp-main-bar__search::after,
.fp-main-bar__select-wrap::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    width: 1px;
    height: calc(100% - 20px);
    background: rgba(17, 56, 85, 0.12);
}

.fp-main-bar__icon {
    flex: 0 0 auto;
    margin-left: 16px;
    color: #607386;
}

.fp-main-bar__input,
.fp-main-bar__select {
    width: 100%;
    min-width: 0;
    height: var(--fp-control-height);
    border: 0;
    outline: 0;
    background: transparent;
    color: #173046;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.fp-main-bar__input {
    padding: 0 14px 0 10px;
}

.fp-main-bar__input::placeholder {
    color: #8696a8;
}

.fp-main-bar__select-wrap {
    padding: 0 12px;
}

.fp-main-bar__select {
    padding-right: 22px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23607386' d='M1.2 0.6 5 4.1 8.8 0.6 10 1.8 5 6 0 1.8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px 6px;
}

.fp-main-bar__typeahead {
    padding-right: 10px;
    background-image: none;
    cursor: text;
}

.fp-main-bar__typeahead::placeholder {
    color: #8696a8;
}

.fp-typeahead-list {
    position: fixed;
    z-index: 999999;
    display: none;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d0dae6;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 14px 32px rgba(6, 28, 48, 0.18);
    max-height: 280px;
    overflow-y: auto;
}

.fp-typeahead-list.is-below {
    border-radius: 0 0 12px 12px;
}

.fp-typeahead-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef3f7;
    color: #173046;
    cursor: pointer;
    transition: background 0.16s ease;
}

.fp-typeahead-list__item:last-child {
    border-bottom: 0;
}

.fp-typeahead-list__item:hover {
    background: #f4f8fc;
}

.fp-typeahead-list__label {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
}

.fp-typeahead-list__meta {
    flex: 0 0 auto;
    color: #7d90a3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fp-main-bar__search,
.fp-main-bar__select-wrap {
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.fp-main-bar__search:focus-within,
.fp-main-bar__select-wrap:focus-within {
    background: rgba(244, 248, 252, 0.95);
    box-shadow: inset 0 0 0 1px var(--fp-focus-border), 0 0 0 3px var(--fp-focus-ring);
    z-index: 1;
}

.fp-main-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--fp-control-height);
    min-height: var(--fp-control-height);
    max-height: var(--fp-control-height);
    margin: 0;
    padding: 0 18px;
    border: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    background: linear-gradient(180deg, #1d4f78 0%, #2b6d9b 100%);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

#fp-search-bar .fp-main-bar__btn {
    border-radius: 0 12px 12px 0 !important;
}

.fp-main-bar__btn:hover,
.fp-main-bar__btn:focus-visible {
    background: linear-gradient(180deg, #23608f 0%, #327aac 100%);
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.fp-advanced-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(235, 243, 250, 0.92);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.fp-advanced-toggle__plus {
    display: none;
}

.fp-advanced-panel {
    margin-top: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: max-height 0.32s ease, opacity 0.22s ease, transform 0.32s ease, margin-top 0.32s ease;
}

.fp-advanced-panel.is-open {
    margin-top: 14px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fp-advanced-panel__layout {
    display: flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(10, 39, 60, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    overflow: hidden;
}

.fp-advanced-panel__layout > .fp-filter-grid {
    display: grid;
    grid-template-columns: 150px 182px 182px 182px;
    align-items: stretch;
    flex: 0 0 auto;
}

.fp-filter-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 104px;
    margin-top: 0;
    align-self: stretch;
    width: 104px;
    padding: 10px 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.fp-filter-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: 100%;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: rgba(12, 52, 80, 0.72);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fp-filter-action-btn:hover,
.fp-filter-action-btn:focus-visible {
    background: rgba(18, 70, 104, 0.85);
    transform: translateY(-1px);
}

.fp-browse-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.fp-browse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.96);
    text-decoration: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.fp-browse-btn:hover,
.fp-browse-btn:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.58);
    color: #fff;
    transform: translateY(-1px);
}

.fp-browse-btn--arrow::after {
    content: "\203A";
    margin-left: 8px;
    font-size: 18px;
    line-height: 1;
}

.fp-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.fp-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 40px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fp-cta-btn:hover,
.fp-cta-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
}

.fp-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
}

.fp-filter-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 12px;
    min-height: 68px;
    border-radius: 0;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    box-sizing: border-box;
}

.fp-filter-grid .fp-filter-card:last-child {
    border-right: 0;
}

.fp-filter-card__label {
    display: block;
    margin-bottom: 8px;
    color: rgba(240, 246, 251, 0.88);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.fp-filter-card--inline-label {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.fp-filter-card--inline-label .fp-filter-card__label {
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.fp-filter-card--inline-label .fp-filter-card__control {
    flex: 1 1 auto;
    min-width: 0;
}

.fp-filter-card--inline-range {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.fp-filter-card--inline-range .fp-filter-card__label {
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.fp-filter-card--inline-range .fp-filter-card__range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.fp-filter-card__range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    flex: 1 1 auto;
}

.fp-filter-card__control {
    width: 100%;
    min-width: 0;
    height: 38px;
    box-sizing: border-box;
    border: 1px solid var(--fp-control-border);
    border-radius: 10px;
    background: var(--fp-control-bg);
    color: #173046;
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fp-filter-card input[type="number"].fp-filter-card__control {
    appearance: textfield;
    -moz-appearance: textfield;
}

.fp-filter-card input[type="number"].fp-filter-card__control::-webkit-outer-spin-button,
.fp-filter-card input[type="number"].fp-filter-card__control::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.fp-filter-card select.fp-filter-card__control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23607386' d='M1.2 0.6 5 4.1 8.8 0.6 10 1.8 5 6 0 1.8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
    padding-right: 28px;
}

.fp-filter-card__control:focus,
.fp-filter-card__control:focus-visible {
    border-color: var(--fp-focus-border);
    box-shadow: 0 0 0 3px var(--fp-focus-ring);
}

.fp-filter-card__control::placeholder {
    color: #8c9aac;
}

.fp-filter-card__sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    color: rgba(235, 243, 250, 0.72);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-1px);
}

.elementor-background-overlay {
    opacity: 0.4 !important;
}

.elementor-widget:has(#fp-search-bar) {
    margin-top: -18px !important;
}

/* remove any list-item bullet if widget is nested in a nav/list */
li:has(#fp-search-bar) {
    list-style: none !important;
}

@media (max-width: 768px) {
    .fp-hero-copy {
        max-width: 100%;
        margin-bottom: 16px;
    }

    .fp-hero-copy__eyebrow {
        font-size: 13px;
        letter-spacing: 0.16em;
    }

    .fp-hero-copy__title {
        margin: 8px 0 8px;
        font-size: clamp(42px, 11vw, 72px);
        letter-spacing: 0.01em;
        line-height: 0.96;
        white-space: normal;
    }

    .fp-hero-copy__subtitle {
        font-size: 15px;
    }

    .fp-hero-copy__examples {
        font-size: 13px;
    }

    .fp-advanced-panel__layout {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        gap: 8px;
    }

    .fp-advanced-panel__layout > .fp-filter-grid {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .fp-filter-action-row {
        width: auto;
        flex: none;
        justify-content: center;
        padding: 0;
        border-left: 0;
    }

    .fp-filter-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fp-filter-card {
        padding: 10px 12px;
        min-height: auto;
    }

    .fp-filter-card__control {
        height: 36px;
    }

    .fp-filter-action-btn {
        width: 100%;
        min-height: 36px;
        height: 36px;
        padding: 0 12px;
        border-radius: 10px;
        font-size: 12px;
    }

    .fp-filter-card--inline-label .fp-filter-card__label {
        flex: 0 0 auto;
    }

    .fp-filter-card--inline-range .fp-filter-card__label {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    #fp-search-bar {
        max-width: none;
        padding: 0 4px;
    }

    .fp-search-shell {
        padding: 14px;
        border-radius: 18px;
    }

    .fp-hero-copy {
        padding: 0 6px;
    }

    .fp-search-extras {
        margin-top: 14px;
    }

    .fp-main-bar {
        grid-template-columns: 1fr;
        height: auto;
    }

    .fp-main-bar__search {
        min-height: var(--fp-control-height);
        border-radius: 12px 12px 0 0;
    }

    .fp-main-bar__select-wrap {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.24s ease, opacity 0.2s ease;
    }

    .fp-main-bar.is-mobile-expanded .fp-main-bar__select-wrap {
        max-height: 60px;
        opacity: 1;
        pointer-events: auto;
    }

    .fp-main-bar__search::after,
    .fp-main-bar__select-wrap::after {
        top: auto;
        right: 16px;
        bottom: 0;
        width: calc(100% - 32px);
        height: 1px;
    }

    .fp-main-bar__btn {
        border-radius: 0 0 12px 12px !important;
        transform: none;
    }

    #fp-search-bar .fp-main-bar__btn {
        border-radius: 0 0 12px 12px !important;
    }

    .fp-filter-grid {
        grid-template-columns: 1fr;
    }

    .fp-advanced-panel__layout {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        gap: 8px;
    }

    .fp-advanced-panel__layout > .fp-filter-grid {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .fp-browse-row,
    .fp-cta-row {
        gap: 12px;
    }

    .fp-browse-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 12px;
    }

    .fp-browse-btn {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 7px 8px;
        font-size: 11px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
    }

    .fp-cta-btn {
        width: 100%;
    }

    .fp-filter-card--inline-label,
    .fp-filter-card--inline-range {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .fp-filter-card--inline-label .fp-filter-card__label,
    .fp-filter-card--inline-range .fp-filter-card__label {
        flex-basis: auto;
        margin-bottom: 0;
    }

    .fp-filter-card--inline-range .fp-filter-card__range {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 6px;
    }

    .fp-filter-card__range {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .fp-advanced-panel.is-open {
        margin-top: 12px;
    }
}
