#location {
    position: relative;
}

#locationTitle {
    font-family: "Eames Century Modern", sans-serif;
    color: var(--primary-green);
    font-size: 24px;
    font-weight: bold;
    line-height: 32px;
    margin-top: 0;
    margin-bottom: 23px;
    text-align: center;
}

#locationSearch {
    display: flex;
    gap: 10px;
    margin: 0 0 20px 0;
}

#locationSearchAutocomplete {
    position: relative;
    width: 100%;
}

#locationSearchAutocomplete input {
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid var(--mediumgrey);
    font-size: 16px;
    color: var(--darkgrey);
    line-height: normal;
    height: auto;
    width: 100%
}

.geoapify-close-button.visible {
    display: none;
}

#locationSearchSubmit {
    max-width: 200px;
}

#locationItems {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.locationItem.new {
    display: flex;
    flex-direction: column;
}

.locationItem.new .locationItemBody {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.locationItem.new .locationItemServiceOption {
    margin-top: auto;
}

.locationItem {
    border: 1px solid var(--mediumgrey);
    border-radius: 6px;
}

.locationItem.recentOrder {
    order: -1;
    border: 3px solid var(--lime-green);
    position: relative;
}

.locationItem.recentOrder::after {
    content: "Most Recent Order";
    position: absolute;
    top: 0;
    left: 0;
    background: var(--lime-green);
    color: #FFFFFF;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 0 0 6px 0;
    line-height: 1;
    text-transform: uppercase;
}

.locationItemImg {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    height: 200px;
    object-fit: cover;
}

.locationItemBody {
    padding: 20px;
}

.locationItemName {
    font-family: 'Eames Century Modern', sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.locationItemAddress {
    color: var(--darkgrey);
    font-weight: 600;
}

.locationItemPhone {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 10px;
    display: block;
}

.locationItemHours {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
}

.locationItemHoursStatus {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--primary-green);
    font-weight: bold;
    text-transform: uppercase;
}

.locationItemHoursStatus.open {
    color: var(--primary-green);
}

.locationItemHoursStatus.closed {
    color: var(--barn-red);
}

.locationItemServiceOptions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.locationItemServiceOption {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    background: var(--primary-green);
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.locationItemServiceOption.disabled{
    margin-top: 24px;
    border-radius: 0 6px 6px 6px;
}

.locationItemServiceOption.disabled::after{
    content: attr(data-disabled);
    position: absolute;
    bottom: 100%;
    left: 0;
    padding: 5px 10px;
    display: block;
    color: white;
    background: var(--primary-green);
    border-radius: 8px 8px 0 0;
    line-height: 1;
    font-size: 14px;
}

.locationItemServiceOption:hover {
    background-color: var(--lime-green);
}

.locationItemServiceOption[data-type="2"] {
    order: -1;
}

.locationItemServiceOption[data-type="3"] {
    order: -1;
}

.locationItemServiceOption[disabled] {
    pointer-events: none;
    background: var(--mediumgrey);
    color: var(--darkgrey);
}

#locationsEmpty {
    padding: 0 20px;
    display: none;
}

#locationsEmpty.active {
    display: block;
}

#locationsEmptyTitle {
    margin-bottom: 20px;
    text-align: center;
    color: var(--barn-red);
    font-size: 20px;
}

#locationsEmptyAll {
    width: auto;
    margin: auto;
}

@media (max-width: 800px) {
    #locationSearch {
        flex-direction: column;
    }

    #locationSearchSubmit {
        max-width: none;
    }

    #locationItems {
        grid-template-columns: 1fr;
    }

    .locationItem.new .locationItemServiceOption {
        margin-top: 20px;
    }
}

/****** Skeleton *******/
#locationSkeleton {
    position: relative;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    display: none;
}

#locationSkeleton.active {
    display: grid;
}

.locationSkeletonItem {
    border: 1px solid var(--mediumgrey);
    border-radius: 6px;
}

.locationSkeletonBody {
    padding: 20px;
}

.locationSkeletonStatus {
    margin-bottom: 10px;
}

.locationSkeletonName {
    margin-bottom: 10px;
}

.locationSkeletonAddress {
    margin-bottom: 5px;
}

.locationSkeletonPhone {
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    #locationSkeleton {
        grid-template-columns: 1fr;
    }
}
