/*
 * biggym-find-your-gym.css
 * Dropdown styling for biggym-find-your-gym.js.
 */

.biggym_find_your_gym {
    --bfyg-icon-color: currentColor;
    /* colour of the search and location icons */
    --bfyg-icon-size: 44px;
    /* tap area of each icon button */

    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

/* Field: search button left, input, location button right; anchors the dropdown. */
.biggym_find_your_gym_field {
    position: relative;
    width: 100%;
}

.biggym_find_your_gym .biggym_find_your_gym_field>input {
    box-sizing: border-box;
    width: 100%;
    padding-left: var(--bfyg-icon-size);
    padding-right: var(--bfyg-icon-size);
    background-color: #1C1C1A;
    color: #ffffff;
    border: 1px solid #444444;
    border-radius: 0px 10px 0px 10px;
    font-weight: 500;
}

.biggym_find_your_gym .biggym_find_your_gym_field>input::placeholder {
    color: #ffffff;
    opacity: 1;
}

/* No location button (unsupported browser or plain http): no space reserved for it. */
.biggym_find_your_gym .biggym_find_your_gym_field:has(.biggym_find_your_gym_locate[hidden])>input {
    padding-right: 16px;
}

/* Hide the browser's own clear (×) button; it would collide with the location button. */
.biggym_find_your_gym_field>input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Element + classes + states so theme button styles (e.g. Hello Elementor) don't win. */
.biggym_find_your_gym button.biggym_find_your_gym_submit,
.biggym_find_your_gym button.biggym_find_your_gym_submit:hover,
.biggym_find_your_gym button.biggym_find_your_gym_submit:focus,
.biggym_find_your_gym button.biggym_find_your_gym_submit:active,
.biggym_find_your_gym button.biggym_find_your_gym_locate,
.biggym_find_your_gym button.biggym_find_your_gym_locate:hover,
.biggym_find_your_gym button.biggym_find_your_gym_locate:focus,
.biggym_find_your_gym button.biggym_find_your_gym_locate:active {
    position: absolute;
    z-index: 1;
    top: 50%;
    display: grid;
    place-items: center;
    width: var(--bfyg-icon-size);
    height: var(--bfyg-icon-size);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    box-shadow: none;
    color: var(--bfyg-icon-color);
    cursor: pointer;
    opacity: 0.75;
    transform: translateY(-50%);
    transition: opacity 120ms ease;
}

.biggym_find_your_gym button.biggym_find_your_gym_submit {
    left: 0;
}

.biggym_find_your_gym button.biggym_find_your_gym_locate {
    right: 0;
}

.biggym_find_your_gym button.biggym_find_your_gym_submit:hover,
.biggym_find_your_gym button.biggym_find_your_gym_locate:hover {
    opacity: 1;
}

.biggym_find_your_gym button.biggym_find_your_gym_submit:focus-visible,
.biggym_find_your_gym button.biggym_find_your_gym_locate:focus-visible {
    opacity: 1;
    outline: 2px solid var(--bfyg-icon-color);
    outline-offset: -4px;
}

.biggym_find_your_gym button.biggym_find_your_gym_locate[hidden] {
    display: none;
}

.biggym_find_your_gym button svg {
    display: block;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Subtle feedback while searching or locating. */
.biggym_find_your_gym.is-loading button.biggym_find_your_gym_submit,
.biggym_find_your_gym.is-loading button.biggym_find_your_gym_locate {
    opacity: 0.4;
    cursor: progress;
}

.biggym_find_your_gym_results {
    position: absolute;
    z-index: 100;
    top: calc(100% + 6px);
    left: 0;
    box-sizing: border-box;
    width: 100%;
    max-height: 320px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;

    color: #fff;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.biggym_find_your_gym_results[hidden] {
    display: none;
}

.biggym_find_your_gym_results li {
    margin: 0;
    padding: 0;
}

/*
 * Form class + list class + link states, so the theme's or Elementor's global
 * link colours (a, a:link, a:visited) can't override the white text.
 */
.biggym_find_your_gym .biggym_find_your_gym_results a,
.biggym_find_your_gym .biggym_find_your_gym_results a:link,
.biggym_find_your_gym .biggym_find_your_gym_results a:visited {
    display: -webkit-box;
    overflow: hidden;

    white-space: normal;
    overflow-wrap: break-word;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    line-height: 1.3 !important;

    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;

    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 6px;

    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;

    transition:
        background-color 120ms ease,
        color 120ms ease;
}

.biggym_find_your_gym .biggym_find_your_gym_results a:hover,
.biggym_find_your_gym .biggym_find_your_gym_results a:focus-visible,
.biggym_find_your_gym .biggym_find_your_gym_results a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    outline: none;
}

.biggym_find_your_gym .biggym_find_your_gym_results a:active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.biggym_find_your_gym .biggym_find_your_gym_results a span {
    color: inherit;
}

.biggym_find_your_gym_result__distance {
    margin-left: 6px;
    font-weight: 400;
    opacity: 0.6;
}

/* "Searching…", "not found" and error messages */
.biggym_find_your_gym .biggym_find_your_gym_message {
    padding: 10px 12px !important;
    color: #fff;
    line-height: 1.3;
}