/* =========================================================
   GOOGLE PLACES SUGGESTION LIST
   ========================================================= */

.pac-container {
    z-index: 20000 !important;
    margin-top: .35rem;
    overflow: hidden;
    border: 1px solid rgba(16, 24, 40, .12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 24, 40, .18);
    font-family: inherit;
}

.pac-item {
    min-height: 52px;
    padding: .65rem .85rem;
    border-top-color: #eef1f5;
    color: #475467;
    font-size: .82rem;
    line-height: 1.35;
    cursor: pointer;
}

    .pac-item:first-child {
        border-top: 0;
    }

    .pac-item:hover,
    .pac-item-selected {
        background: #f3f7ff;
    }

.pac-item-query {
    color: #101828;
    font-size: .9rem;
    font-weight: 750;
}

.pac-icon {
    margin-top: .2rem;
}


/* =========================================================
   LOCATION STATUS
   ========================================================= */

.carry-location-status {
    min-height: 1.25rem;
    margin-top: .35rem;
    color: #667085;
    font-size: .76rem;
    font-weight: 650;
}

    .carry-location-status[data-state="success"] {
        color: #157347;
    }

    .carry-location-status[data-state="warning"] {
        color: #946200;
    }

    .carry-location-status[data-state="error"] {
        color: #b42318;
    }


/* =========================================================
   LOADING STATE

   Do not change the button's position here.
   Food and Shop CSS control its absolute positioning.
   ========================================================= */

.food-location-button.is-loading i,
.shop-location-button.is-loading i {
    visibility: hidden;
}

.food-location-button.is-loading::after,
.shop-location-button.is-loading::after {
    position: absolute;
    inset: 0;
    width: 1rem;
    height: 1rem;
    margin: auto;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: carry-location-spin .7s linear infinite;
}

@keyframes carry-location-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   DESKTOP: GUARANTEE ONE HORIZONTAL SEARCH ROW
   ========================================================= */

@media (min-width: 768px) {

    .food-search-panel,
    .shop-search-panel {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(155px, 175px) max-content !important;
        align-items: end !important;
        column-gap: .75rem !important;
        row-gap: 0 !important;
    }

    .food-search-field--location,
    .shop-search-field--location {
        position: relative;
        min-width: 0 !important;
    }

    .food-search-field--time,
    .shop-search-field--time {
        min-width: 0 !important;
    }

    .food-input-shell,
    .shop-input-shell {
        position: relative;
        width: 100%;
        min-width: 0;
    }

        .food-input-shell .form-control,
        .shop-input-shell .form-control {
            width: 100%;
            min-width: 0;
            padding-right: 3.75rem;
        }

    .food-search-field--time .form-select,
    .shop-search-field--time .form-select {
        width: 100%;
        min-width: 0;
    }

    .food-search-submit,
    .shop-search-submit {
        min-height: 48px;
        align-self: end;
        white-space: nowrap;
    }

    /*
       Keep the status underneath without raising the input
       above the time selector and submit button.
    */
    .food-search-field--location .carry-location-status,
    .shop-search-field--location .carry-location-status {
        position: absolute;
        top: calc(100% + .25rem);
        left: 0;
        margin: 0;
        white-space: nowrap;
    }

    .food-search-panel,
    .shop-search-panel {
        padding-bottom: 1.75rem;
    }
}


/* =========================================================
   MOBILE

   Preserve the existing stacked mobile presentation.
   ========================================================= */

@media (max-width: 767.98px) {

    .food-search-panel,
    .shop-search-panel {
        display: flex;
        flex-direction: column;
    }

    .food-search-field,
    .shop-search-field,
    .food-search-submit,
    .shop-search-submit {
        width: 100%;
    }

    .carry-location-status {
        position: static;
        white-space: normal;
    }

    .pac-container {
        max-width: calc(100vw - 24px) !important;
        border-radius: 14px;
    }

    .pac-item {
        min-height: 56px;
        white-space: normal;
    }
}
