/**
 * The property search bar.
 *
 * Built on the Go Tropical tokens: Fraunces for the tabs, Inter for the rest,
 * the lagoon green for the button, sand for the panel edges, and the 2px corner
 * the rest of the site uses. Everything is scoped under .gt-search.
 */

.gt-search {
    --gts-ink: #12171a;
    --gts-muted: #6b767c;
    --gts-paper: #ffffff;
    --gts-sand: #f6f2ea;
    --gts-line: rgba(18, 23, 26, 0.14);
    --gts-lagoon: #0e5b55;
    --gts-lagoon-dk: #07332f;
    --gts-sun: #c2733c;
    --gts-display: "Fraunces", Georgia, "Times New Roman", serif;
    --gts-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --gts-r: 2px;

    font-family: var(--gts-sans);
    color: var(--gts-ink);
    max-width: 1180px;
    margin: 0 auto;
}

.gt-search,
.gt-search p,
.gt-search select,
.gt-search input,
.gt-search button,
.gt-search label,
.gt-search summary,
.gt-search a,
.gt-search optgroup,
.gt-search option {
    font-family: var(--gts-sans);
}

.gt-search *,
.gt-search *::before,
.gt-search *::after {
    box-sizing: border-box;
}

/* The theme styles headings site-wide, so this one asks a little louder. */
.gt-search h2.gt-search__heading,
.gt-search__heading {
    font-family: var(--gts-sans);
    font-weight: 400;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    margin: 0 0 14px;
    color: var(--gts-ink);
}

/* Buy / Rent */

.gt-search__tabs {
    display: flex;
    gap: 2px;
    position: relative;
    z-index: 1;
    margin-bottom: -1px;
}

.gt-search__tab {
    cursor: pointer;
}

.gt-search__tab input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gt-search__tab span {
    display: block;
    padding: 12px 30px;
    border: 1px solid transparent;
    border-bottom: 0;
    font-family: var(--gts-sans);
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gts-paper);
    background: var(--gts-lagoon-dk);
    border-radius: var(--gts-r) var(--gts-r) 0 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gt-search__tab input:checked + span {
    background: var(--gts-paper);
    color: var(--gts-ink);
    border-color: var(--gts-line);
}

.gt-search__tab input:focus-visible + span {
    outline: 2px solid var(--gts-sun);
    outline-offset: 2px;
}

/* The panel */

.gt-search__panel {
    background: var(--gts-paper);
    border: 1px solid var(--gts-line);
    border-radius: 0 var(--gts-r) var(--gts-r) var(--gts-r);
    padding: 18px;
    box-shadow: 0 18px 44px rgba(7, 51, 47, 0.1);
}

.gt-search__fields {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1.2fr 0.7fr auto;
    gap: 12px;
    align-items: end;
}

.gt-search__field {
    margin: 0;
    min-width: 0;
}

.gt-search__field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gts-muted);
    margin-bottom: 6px;
}

.gt-search__field select,
.gt-search__field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 34px 0 14px;
    font-family: var(--gts-sans);
    font-size: 15px;
    font-weight: 400;
    color: var(--gts-ink);
    background-color: var(--gts-sand);
    border: 1px solid transparent;
    border-radius: var(--gts-r);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b767c' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.gt-search__field input[type="text"] {
    background-image: none;
    padding-right: 14px;
}

.gt-search__field select:focus,
.gt-search__field input[type="text"]:focus {
    outline: none;
    border-color: var(--gts-lagoon);
    background-color: var(--gts-paper);
}

/* Search */

.gt-search__submit {
    margin: 0;
}

.gt-search__submit button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: var(--gts-r);
    background: var(--gts-lagoon);
    color: var(--gts-paper);
    font-family: var(--gts-sans);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.gt-search__submit button:hover {
    background: var(--gts-lagoon-dk);
}

.gt-search__submit svg {
    width: 17px;
    height: 17px;
}

/* Under the fields */

.gt-search__extras {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 20px;
    margin-top: 14px;
}

.gt-search__more {
    order: 1;
}

.gt-search__more summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gts-lagoon);
    list-style: none;
}

.gt-search__more summary::-webkit-details-marker {
    display: none;
}

.gt-search__more summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.15s ease;
}

.gt-search__more[open] summary::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.gt-search__more[open] {
    flex: 1 1 100%;
}

.gt-search__more-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    padding-top: 14px;
    margin-top: 12px;
    border-top: 1px solid var(--gts-line);
}

.gt-search__field--wide {
    grid-column: span 2;
}

.gt-search__popular {
    order: 2;
    margin: 0;
    text-align: right;
    font-size: 14px;
    color: var(--gts-muted);
}

.gt-search__popular span {
    margin-right: 6px;
}

.gt-search__popular a {
    color: var(--gts-lagoon);
    font-weight: 600;
    text-decoration: none;
    margin-right: 14px;
    border-bottom: 1px solid transparent;
}

.gt-search__popular a:hover {
    color: var(--gts-sun);
    border-bottom-color: currentColor;
}

/* Narrower screens */

@media (max-width: 1024px) {
    .gt-search__fields {
        grid-template-columns: 1fr 1fr;
    }

    .gt-search__submit {
        grid-column: span 2;
    }

    .gt-search__submit button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .gt-search__fields {
        grid-template-columns: 1fr;
    }

    .gt-search__submit {
        grid-column: auto;
    }

    .gt-search__tab span {
        padding: 11px 22px;
        font-size: 14px;
    }

    .gt-search__panel {
        padding: 14px;
    }

    .gt-search__popular a {
        display: inline-block;
        margin: 2px 12px 2px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gt-search__tab span,
    .gt-search__submit button,
    .gt-search__more summary::after {
        transition: none;
    }
}

/* ==========================================================================
   Results
   ========================================================================== */

.gt-results {
    --gts-ink: #12171a;
    --gts-muted: #6b767c;
    --gts-paper: #ffffff;
    --gts-sand: #f6f2ea;
    --gts-line: rgba(18, 23, 26, 0.14);
    --gts-lagoon: #0e5b55;
    --gts-sun: #c2733c;
    --gts-display: "Fraunces", Georgia, "Times New Roman", serif;
    --gts-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --gts-r: 2px;

    font-family: var(--gts-sans);
    color: var(--gts-ink);
    max-width: 1180px;
    margin: 28px auto 0;
}

.gt-results__count {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin: 0 0 16px;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gts-muted);
}

.gt-results__clear {
    color: var(--gts-sun);
    font-weight: 600;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}

.gt-results__clear:hover {
    text-decoration: underline;
}

.gt-results__empty {
    padding: 28px;
    background: var(--gts-sand);
    border-radius: var(--gts-r);
    font-size: 16px;
    color: var(--gts-ink);
}

.gt-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.gt-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--gts-paper);
}

.gt-card__shot {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gts-sand);
    border-radius: var(--gts-r);
}

.gt-card__shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gt-card:hover .gt-card__shot img {
    transform: scale(1.04);
}

.gt-card__price {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(7, 51, 47, 0.88);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--gts-r);
}

.gt-card__body {
    display: block;
    padding: 12px 2px 0;
}

.gt-card__title {
    display: block;
    font-family: var(--gts-display);
    font-weight: 400;
    font-size: 19px;
    line-height: 1.25;
    color: var(--gts-ink);
}

.gt-card__meta {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: var(--gts-muted);
}

.gt-results__pages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.gt-results__pages a,
.gt-results__pages .page-numbers {
    min-width: 38px;
    padding: 9px 10px;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--gts-line);
    border-radius: var(--gts-r);
    color: var(--gts-ink);
}

.gt-results__pages a:hover {
    border-color: var(--gts-lagoon);
    color: var(--gts-lagoon);
}

.gt-results__pages .page-numbers.current {
    background: var(--gts-lagoon);
    border-color: var(--gts-lagoon);
    color: #fff;
}

.gt-results__pages .page-numbers.dots {
    border-color: transparent;
    padding-left: 2px;
    padding-right: 2px;
    min-width: 0;
    color: var(--gts-muted);
}

.gt-results__pages .prev,
.gt-results__pages .next {
    min-width: 0;
    font-weight: 600;
}

.gt-results__of {
    margin-left: auto;
    align-self: center;
    border: 0;
    padding: 0;
    font-size: 13px;
    color: var(--gts-muted);
}

@media (prefers-reduced-motion: reduce) {
    .gt-card__shot img {
        transition: none;
    }
}

/* ==========================================================================
   Banner version — the fields sit straight on a hero photograph
   ========================================================================== */

.gt-search--banner {
    --gts-ink: #ffffff;
    --gts-muted: rgba(255, 255, 255, 0.86);
    --gts-line: rgba(255, 255, 255, 0.55);
    max-width: 1120px;
    text-align: center;
}

.gt-search--banner .gt-search__heading {
    font-weight: 300;
    font-size: clamp(28px, 4.4vw, 52px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 10px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.gt-search--banner .gt-search__sub {
    margin: 0 0 26px;
    font-size: 14px;
    letter-spacing: 0.14em;
    color: var(--gts-muted);
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

/* Buy and Rent read as plain words above the fields. */
.gt-search--banner .gt-search__tabs {
    justify-content: center;
    gap: 26px;
    margin-bottom: 14px;
}

.gt-search--banner .gt-search__tab span {
    padding: 4px 2px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.gt-search--banner .gt-search__tab input:checked + span {
    color: #fff;
    border-bottom-color: #fff;
    background: none;
}

/* No card at all. */
.gt-search--banner .gt-search__panel {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.gt-search--banner .gt-search__fields {
    gap: 14px;
}

.gt-search--banner .gt-search__field label {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    text-align: left;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.gt-search--banner .gt-search__field select,
.gt-search--banner .gt-search__field input[type="text"] {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    height: 46px;
    /* A touch of blur keeps the words legible over a busy photograph without
       putting a colour behind them. */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    /* The arrow has to be white now, not the grey used on a pale field. */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
}

.gt-search--banner .gt-search__field input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.gt-search--banner .gt-search__field select:hover,
.gt-search--banner .gt-search__field input[type="text"]:hover {
    border-color: rgba(255, 255, 255, 0.85);
}

.gt-search--banner .gt-search__field select:focus,
.gt-search--banner .gt-search__field input[type="text"]:focus {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: #fff;
    outline: none;
}

/* The open dropdown is drawn by the browser on its own background, so the
   choices need their own colours or they come out white on white. */
.gt-search--banner .gt-search__field option,
.gt-search--banner .gt-search__field optgroup {
    color: #12171a;
    background-color: #fff;
}

/* A plain white button, like the rest of the row. */
.gt-search--banner .gt-search__submit button {
    height: 46px;
    background: #fff;
    color: #12171a;
    border-radius: 3px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 15px;
}

.gt-search--banner .gt-search__submit button:hover {
    background: rgba(255, 255, 255, 0.86);
}

.gt-search--banner .gt-search__submit svg {
    display: none;
}

/* The shortcut row underneath. */
.gt-search--banner .gt-search__extras {
    justify-content: center;
    margin-top: 18px;
}

.gt-search--banner .gt-search__more {
    order: 3;
    flex: 1 1 100%;
}

.gt-search--banner .gt-search__more summary {
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.gt-search--banner .gt-search__more-fields {
    border-top-color: var(--gts-line);
}

.gt-search--banner .gt-search__popular {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #fff;
}

.gt-search--banner .gt-search__popular span {
    margin-right: 6px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.gt-search--banner .gt-search__popular a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid var(--gts-line);
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(12, 28, 24, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gt-search--banner .gt-search__popular a:hover {
    background: #fff;
    border-color: #fff;
    color: #12171a;
}

.gt-search--banner .gt-search__popular a svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

@media (max-width: 1024px) {
    .gt-search--banner .gt-search__fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .gt-search--banner .gt-search__popular a {
        padding: 8px 12px;
        letter-spacing: 0.08em;
    }
}
