.branch-archive {
    display: flex;
    flex-direction: row;
    width: 100vw;
}

.search-list {
    width: 30%;
    min-width: 400px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1;
    box-shadow: 2px 0 4px 0 rgb(0 0 0 / 10%);
}
.map {
    width: 70%;
}

.branch-archive h1 {
    color: #133156;
    font-size: clamp(2rem, 1.5rem + 2.5vw, 40px);
    padding: 0;
}

/* Search Container */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    margin: 40px 24px 12px 24px;
}
.search-input-container {
    display: flex;
    flex-direction: row;
    width: 100%;
}
#clear-search {
    display: block;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: #007cba;
    background: none;
    padding: 8px;
    margin-left: 8px;
    transition: color 0.2s ease;
}

#clear-search:hover:not(:disabled) {
    color: #133156;
}

#clear-search:disabled {
    color: #b0b0b0;
    cursor: default;
}
#branch-search {
    width: 100%;
    padding: 12px 12px;
    background-color: #efefef;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    color: #133156;
    font-family: "Inter", sans-serif;
}
#branch-search::placeholder {
    color: #757575;
}
#branch-search:focus {
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 1);
}
.branch-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d48f #efefef00;
}
/* Location Container */
.location-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.use-location-btn {
    color: #007cba;
    background-color: transparent;
    padding: 0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
}

.use-location-btn:hover {
    color: #005a87;
}

.use-location-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* No Results Message */
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}
.branch-item {
    padding: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.branch-item:hover {
    background-color: #f8fafc;
}

.branch-item.active-branch {
    background-color: #f1f8ff;
    box-shadow: 0 0 0 1px #d5eaff inset;
    transition: background-color 0.2s ease;
}
.branch-item h2 {
    margin-bottom: -4px;
    font-size: 20px;
    padding: 0;
    color: #133156;
}
.branch-item p {
    height: 24px;
    overflow: clip;
    font-size: 14px;
    font-family: "Inter", sans-serif;
    color: #425466;
}

/* Branch Action Buttons */
.branch-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 12px;
}

.action-btn {
    display: inline-block;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.view-details-btn {
    color: #005a87;
    padding: 4px 4px;
}

.view-details-btn:hover {
    color: #005079;
    text-decoration: underline;
}

.call-btn {
    background-color: #ffffff;
    color: #005a8b;
    border: 1px solid #006dd23b;
}

.call-btn:hover {
    background-color: #eef9ff;
}

.directions-btn {
    background-color: #ffffff;
    color: #005a8b;
    border: 1px solid #006dd23b;
}

.directions-btn:hover {
    background-color: #eef9ff;
}
/* Branch Status Indicators */
.branch-status-compact {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.alert-indicator {
    color: #d10003;
    background-color: #feebeb;
    border-radius: 6px;
    margin-top: 4px;
    text-align: center;
    font-size: 14px;
    font-family: "Inter", sans-serif;
    line-height: 1.3;
    padding: 4px;
}

.status-indicators {
    display: flex;
    flex-direction: column;
    line-height: 1.7;
}

.lobby-status,
.drive-thru-status,
.atm-status {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-family: "Inter", sans-serif;
}

.lobby-status.open::before,
.drive-thru-status.open::before,
.atm-status.open::before {
    display: block;
    content: "";
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #238b00;
    border: 2px solid #ebfeed;
    margin-right: 4px;
}

.lobby-status.closed::before,
.drive-thru-status.closed::before,
.atm-status.closed::before {
    display: block;
    content: "";
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #d10003;
    border: 2px solid #fce4e4;
    margin-right: 4px;
}

/* Map Styling */

#branch-locations-map {
    border: none;
}
.gm-style .gm-style-iw-c {
    padding: 0;
}
.gm-style-iw-d {
    overflow: unset !important;
    margin-bottom: 12px;
}
.gm-style-iw-chr {
    position: absolute;
    right: 0;
}
/* Map Info Window Styling */
.map-info-window {
    width: 360px;
}

.info-window-photo img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.map-info-window h3 {
    padding: 16px 0 0 12px;
}

.map-info-window h3 a {
    color: #007cba;
    text-decoration: none;
}

.map-info-window h3 a:hover {
    text-decoration: underline;
}

.map-info-window p {
    padding: 0 0 0 12px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
}

.map-info-window .view-details-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85em;
    margin-top: 8px;
}

.map-info-window .view-details-link:hover {
    background: #005a87;
}

/* Info Window Alert Notice */
.info-window-alert {
    color: #d10003;
    background-color: #feebeb;
    border-radius: 6px;
    margin: 4px 12px 0 12px;
    padding: 8px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
}

/* Info Window Status Container */
.info-window-status {
    display: flex;
    flex-direction: column;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    padding: 4px 12px 0 12px;
    gap: 4px;
}

/* Info Window Status Badges */
.info-window-status-badge {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-family: "Inter", sans-serif;
}

.info-window-status-badge.open::before {
    display: block;
    content: "";
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #238b00;
    border: 2px solid #ebfeed;
    margin-right: 4px;
}

.info-window-status-badge.closed::before {
    display: block;
    content: "";
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #d10003;
    border: 2px solid #fce4e4;
    margin-right: 4px;
}

/* Branch Distance Display */
.branch-distance {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #666;
}

/* Branch Marker Styles */
.branch-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #008bd1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.marker-inner-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.marker-pointer {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #008bd1;
    transition: all 0.3s ease;
}

/* User Location Marker */
.user-location-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #007cba;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Search Location Marker */
.search-location-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffbc00;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Branch Hours Accordion Styles */
.branch-hours-accordion {
    margin-top: 12px;
}

.alert-banner {
    background-color: #feebeb;
    color: #d10003;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
    margin: 12px 0;
    border-radius: 6px;
    text-align: center;
}

.branch-hours-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.branch-hours-accordion-item {
    display: flex;
    align-items: stretch;
    height: fit-content;
    width: 100%;
}

.branch-hours-accordion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 8px;
    gap: 3px;
    border-radius: 6px;
    border: 1px solid #e4e9ed;
    background-color: #fff;
    transition: all 0.3s ease;
}

.branch-hours-accordion-content:hover {
    border: 1px solid #d5eaff;
    cursor: pointer;
}

.branch-hours-accordion-content h4 {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #133156;
}

.branch-hours-accordion-content h4::before {
    content: "";
    display: inline-block;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #238b00;
    border: 2px solid #ebfeed;
    margin-right: 6px;
}

.branch-hours-accordion-content h4::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23CECECE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    margin-left: auto;
}

.branch-hours-accordion-item.closed h4::before {
    background: #d10003;
    border: 2px solid #feebeb;
}

.branch-hours-accordion-item .hours {
    width: 100%;
    display: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #425466;
    padding-left: 18px;
}

.branch-hours-accordion-item .hours p {
    padding: 0;
}

.branch-hours-accordion-content.active {
    padding-bottom: 16px;
}

.branch-hours-accordion-content.active h4::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18 15L12 9L6 15' stroke='%23CECECE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    margin-left: auto;
}

.branch-hours-accordion-content.active .hours {
    display: flex;
    padding-right: 8px;
}

.branch-hours-accordion-content.active .hours p {
    line-height: 1.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .branch-archive {
        flex-direction: column-reverse;
        height: auto !important;
    }
    .map {
        width: 100%;
        height: 200px;
    }

    .search-list {
        width: 100%;
        margin-bottom: 2rem;
        height: 720px;
        min-width: 300px;
    }

    .search-container {
        margin: 12px;
    }
    h1 {
        display: none;
    }
    .branch-list {
        padding: 0px 4px;
    }
    .branch-item {
        padding: 12px 10px;
    }
    .branch-actions {
        flex-direction: row;
    }
    .action-btn {
        padding: 12px 10px;
        font-size: 12px;
    }
    .info-window-photo {
        display: none;
    }
    .gm-style .gm-style-iw-c {
        max-width: 320px !important;
    }
    .info-window-alert {
        max-width: 294px;
    }
    .map-info-window h3 {
        max-width: 80%;
        text-wrap: balance;
        text-decoration: underline;
        color: #008bd1;
    }
    .map-info-window p {
        max-width: 80%;
        text-wrap: balance;
    }
}
