.ptb-place-search {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.ptb-place-search:focus-within { z-index: 1010; }

.ptb-place-search > input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-inline-end: 54px !important;
}

.ptb-booking .ptb-place-search__clear {
    position: absolute;
    z-index: 1;
    inset-block-start: 0;
    inset-inline-end: 2px;
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ptb-text);
    cursor: pointer;
    font: 400 25px/1 sans-serif;
}

.ptb-booking .ptb-place-search__clear[hidden] { display: none; }
.ptb-booking .ptb-place-search__clear:hover { background: color-mix(in srgb, var(--ptb-accent) 12%, transparent); }
.ptb-booking .ptb-place-search__clear:focus-visible { outline: 2px solid var(--ptb-primary); outline-offset: -4px; }

.ptb-place-search__status {
    display: block;
    min-height: 1.2em;
    margin-top: 0.3rem;
    color: color-mix(in srgb, var(--ptb-text) 72%, transparent);
    font-size: 0.8rem;
}

.ptb-place-search__status:empty {
    display: none;
}

/* Short-lived network announcements must not move the active field, its
   dropdown, or the next control on every keystroke. Errors stay in flow. */
.ptb-place-search__status.is-working:not(:empty) {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.ptb-place-search__status.is-error {
    color: var(--ptb-error);
}

.ptb-place-search__selected {
    display: block;
    margin-top: 0.35rem;
    color: var(--ptb-text);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: normal;
}

.ptb-place-search__popup {
    box-sizing: border-box;
    position: absolute;
    z-index: 1000;
    top: calc(100% - 0.1rem);
    right: 0;
    left: 0;
    min-width: 0;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--ptb-text) 18%, transparent);
    border-radius: max(8px, calc(var(--ptb-radius) * 0.75));
    background: var(--ptb-bg);
    box-shadow: 0 14px 34px rgb(15 23 42 / 18%);
}

.ptb-place-search__popup[hidden] { display: none; }

.ptb-place-search__list {
    max-height: 17rem;
    overflow: auto;
}

.ptb-booking .ptb-place-search__option {
    box-sizing: border-box;
    display: flex;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    height: auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 8px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ptb-text) 10%, transparent);
    background: transparent;
    color: var(--ptb-text);
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
}

.ptb-place-search__icon {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ptb-place-search__option-copy {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ptb-booking .ptb-place-search__option:last-child {
    border-bottom: 0;
}

.ptb-booking .ptb-place-search__option:hover,
.ptb-booking .ptb-place-search__option:focus,
.ptb-booking .ptb-place-search__option[aria-selected="true"] {
    outline: 0;
    background: color-mix(in srgb, var(--ptb-accent) 16%, var(--ptb-bg));
}

.ptb-booking .ptb-place-search__option strong {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.ptb-booking .ptb-place-search__option span {
    color: color-mix(in srgb, var(--ptb-text) 72%, transparent);
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

/* Official unmodified Google Maps logo: 16px high, aspect ratio retained,
   10px top/side and at least 5px bottom clear space on a solid light surface.
   Branding guidance: https://developers.google.com/maps/documentation/places/web-service/policies
   Official asset ZIP: https://developers.google.com/static/maps/documentation/images/Google_Maps_Attribution_Assets.zip
   Asset use follows Google's attribution/branding guidance, not a new logo license. */
.ptb-place-search__attribution {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 10px 5px;
    border: 0;
    border-top: 1px solid #e8e8e8;
    border-radius: 0;
    background: #fff;
    color: #1f1f1f;
    font: normal 400 12px/1.5 sans-serif;
}

.ptb-place-search__attribution[hidden] {
    display: none;
}

.ptb-place-search__attribution img,
.ptb-site .ptb-booking .ptb-place-search__attribution > img {
    display: block;
    box-sizing: content-box;
    flex: 0 0 87.111111px;
    width: 87.111111px;
    min-width: 87.111111px;
    max-width: 87.111111px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    aspect-ratio: 98 / 18;
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
}

.ptb-place-search__policies {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
}

.ptb-place-search__policies a,
.ptb-place-search__providers a {
    color: #1f1f1f;
    text-decoration: underline;
    white-space: nowrap;
}

.ptb-place-search__providers {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-wrap: anywhere;
}

.ptb-place-search__providers:empty {
    display: none;
}

/* Fit suggestions to the actual visible viewport, not the page behind a
   mobile keyboard. The local list scrolls; Google branding remains separate. */
@media (max-width: 900px) {
    .ptb-place-search__popup[data-ptb-place-viewport-fit="1"] {
        display: flex;
        flex-direction: column;
        top: var(--ptb-place-popup-top);
        bottom: auto;
        max-height: var(--ptb-place-popup-height);
        overflow: auto;
        overscroll-behavior: contain;
    }

    .ptb-place-search__popup[data-ptb-place-viewport-fit="1"][hidden] { display: none; }

    .ptb-place-search__popup[data-ptb-place-placement="above"]:not([data-ptb-place-viewport-fit="1"]) {
        top: auto;
        bottom: calc(100% + 4px);
    }

    .ptb-place-search__popup[data-ptb-place-viewport-fit="1"] > .ptb-place-search__list {
        flex: 0 1 auto;
        min-height: 44px;
        max-height: var(--ptb-place-list-height);
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ptb-place-search__popup[data-ptb-place-viewport-fit="1"] > .ptb-place-search__attribution {
        flex: 0 0 auto;
    }

    .ptb-booking .ptb-place-search__option { min-height: 44px; }
}

