/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Location Banner & Modal */

/* Location Banner */
#location-banner {
    background: var(--color2);
    color: #ffffff;
    text-align: center;
    padding: 10px;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 15px;
    border-bottom: 1px solid #ffffff;
    position: fixed;
    width: 100%;
    z-index: 100000;
}

#location-banner-text {
    margin: 0;
}

#location-banner-text strong {
    color: #ffffff;
}

@media screen and (max-width: 550px) {
    #location-banner {
        justify-content: center;
    }
}

/* Change Location Button */
#change-location-btn {
    background: var(--color1);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}
#change-location-btn:hover {
    background: var(--color3);
}


/* Location Modal */

/* Prevent background scrolling when modal is open */
.no-scroll {
    overflow: hidden;
}

.location-modal {
    position: fixed;
    z-index: 100000;
    padding: 3%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Modal Content Animation */
.location-modal-content {
    transform: translateY(-20px);
    transition: transform 0.4s ease;
}

/* Show Modal - Active State */
.location-modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Slide In Animation */
.location-modal.show .location-modal-content {
    transform: translateY(0);
}

.location-modal-content {
    background: #ffffff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

#location-modal-header-title {
    margin-top: 40px;
}

#close-modal-btn {
    right: 20px;
    background: var(--color1);
    color: #ffffff;
    position: absolute;
    border: none;
    padding: 10px 30px;
    cursor: pointer;
    top: 20px;
    border-radius: 5px;
}

#close-modal-btn:hover {
    background: var(--color3);
}

/* Search Bar */
#search-bar-div {
    display: flex;
    align-items: center;
    gap: 2%;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* State Filter */
#state-filter-div {
    display: flex;
    align-items: center;
    gap: 2%;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

#state-filter-div label {
    font-weight: bold;
    margin-right: 10px;
}

#state-filter {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
}

/* State Tabs */

#state-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

#state-tabs li {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    border: 1px solid var(--color2);
    border-bottom: none;
    background-color: #f5f5f5;
    transition: background-color 0.2s;
}

#state-tabs li:hover {
    background-color: #e0e0e0;
}

#state-tabs li.active {
    background-color: var(--color2);
    color: white;
    font-weight: bold;
}

#location-search {
    flex-grow: 6;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 5px 0;
}

#use-my-location-btn {
    background: var(--color2);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    flex-grow: 1;
    line-height: 1.5;
    margin: 5px 0;
}

#use-my-location-btn:hover {
    background: var(--color1);
}

/* Location List */
#location-list-div-outer {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#location-list-div {
    overflow-y: auto;
    flex: 1;
    border: 1px solid var(--color2);
    border-radius: 8px;
}

/* Adjust border radius when tabs are being used */
#location-list-div.tabs-mode {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

#location-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* List Items */
#location-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 10px 15%;
    border-bottom: 1px solid #eee;
    text-align: left;
}

@media screen and (max-width: 650px) {
    #location-list li {
        padding: 10px 5%;
    }
}

/* Location Name */
.location-name {
    color: #0073e6;
    font-size: 18px;
    font-weight: bold;
}

/* Select Button */
.location-select-btn {
    background: var(--color2);
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.location-select-btn:hover {
    background: var(--color1);
}