/* Branch Map Plugin Styles */
#branch-map-app-container {
    width: 100%;
    font-family: 'Inter', sans-serif;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 0 4px 0 rgb(0 0 0 / 10%);
}

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

.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, 32px);
    padding: 0;
    margin: 0;
}

/* Search Container */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    margin: 24px 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);
}

#search-status{
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
    color: #425466;
}

.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{
    font-size: 20px;
    padding: 0;
    margin: 0;
    color: #133156;
}

.branch-item p{
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #425466;
    margin: 0;    
}

/* 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;
}

.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;
    margin: 0;
}

.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;
    margin: 0 0 8px 0;
}

.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;
    padding: 0 0 6px 0;    
    font-size: 14px;
    color: #666;
}

/* Branch Marker Styles */
.branch-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 1;
    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;
}

/* Loading States */
.loading-branches,
.loading-map {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* 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;
    }
    
    .branch-archive h1{
        display: none;
    }
    
    #search-status{
        text-wrap: balance;
    }
    
    .branch-list{
        padding: 0;
    }
    
    .branch-item{
        padding: 12px;
    }
    
    .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;
    }
}
