/* Store Locator Styles */

/* Main container styles */
#store-locator-container {
    border-radius: 5px;
    /* overflow: hidden; */
}

#store-details-container {
    /* border: 1px solid #ddd;
    border-radius: 5px; */
    overflow: hidden;
}

/* Controls section */
#store-controls {
    padding: 15px;
}

#geolocation-btn {
    display: flex;
    align-items: center;
}

.control-group {
    display: flex;
    margin-right: 15px;
    margin-bottom: 10px;
    vertical-align: top;
    gap: 10px
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
}

.control-group input[type="text"],
.control-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.control-group input[type="text"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

#services-filter {
    min-width: 150px;
    /* height: 80px; */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#location-search,
#radius-filter {
    max-width: 250px;
    border-radius: 9px;
}

.button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.button:hover {
    background: #005a87;
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.button-primary {
    background: #0073aa;
}

.button-primary:hover {
    background: #005177;
}

.search.control-group .button {
    background-color: #ec8e39 !important;
    border: 1px solid #fff;
    color: #fff;
    font-weight: 600;
    border-radius: 9px !important;
}

#store-count {
    float: right;
    margin-top: 10px;
    color: #666;
    /* font-size: 14px; */
    display: flex;
}

/* Map container */
#map-container {
    height: calc(100% - 100px);
    position: relative;
    min-height: 400px;
}

#store-map {
    width: 70%;
    height: 100%;
    float: left;
}

/* Sidebar styles */
#store-sidebar {
    width: 28%;
    height: 100%;
    float: right;
    overflow-y: auto;
    /* padding: 15px; */
    /* background: #f9f9f9; */
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

#store-sidebar h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.service-option {
    /* display: inline-block; */
    display: flex;
    padding: 8px 12px;
    margin: 4px;
    gap: 5px;
    border: 1px solid #ccc;
    border-radius: 9px;
    cursor: pointer;
    background-color: #f9f9f9;
    user-select: none;
}

.service-option img {
    margin: 0 !important;
}

.service-option.selected {
    background-color: #DF8636;
    color: white;
    border-color: #DF8636;
}

.service-option.selected img {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}


/* Store list styles */
.stores-list {
    /* max-height: 400px; */
    overflow-y: auto;
}

.store-item {
    padding: 12px;
    border-bottom: 1px solid #8F8F8F;
    cursor: pointer;
    transition: all 0.3s ease;
    /* border-radius: 4px; */
    margin-bottom: 5px;
    /* background: white; */
}

.store-item:hover {
    background: #E5ECFA;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.store-item.selected {
    background: #E5ECFA;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.store-item .store-hours {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#sidebar-content > p{
    padding: 10px 0;
}
#geolocation-btn img{
    margin: 0 !important;
}
.store-item .store-hours div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.store-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-name span:first-child {
    font-weight: bold;
    color: #333;
    gap: 10px;
}

.store-name span:last-child {
    display: flex;
    gap: 10px;
}

.store-name img, .store-hours img {
  margin: 0 !important;
}

.store-location {
    color: #666;
    /* font-size: 14px;
    margin-bottom: 8px; */
}

.store-distance {
    color: #007cba;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

/* Service tags */
.store-services {
    margin-top: 8px;
}

.service-tag {
    display: inline-block;
    /* background: #007cba;
    color: white; */
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 5px;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
    border: 1px solid #030303;
}

.service-tag:nth-child(2n) {
    background: #28a745;
}

.service-tag:nth-child(3n) {
    background: #ffc107;
    color: #333;
}

.service-tag:nth-child(4n) {
    background: #dc3545;
}

/* Popup styles */
.store-popup {
    min-width: 200px;
}

.store-popup h4 {
    margin: 0 0 10px 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.store-popup p {
    /* margin: 5px 0;
    font-size: 14px; */
    padding: 0;
    margin: 0;
}

.leaflet-popup-content {
    margin: 10px;
}

.popup-services {
    margin: 10px 0;
}

.popup-services .service-tag {
    margin-right: 3px;
    font-size: 10px;
}

#all-stores-list-container {
    color: #fff;
}

/* Selected store styles */
.selected-store {
    background: white;
    padding: 15px;
    /* border-radius: 5px; */
    border-left: 4px solid #ec8e39;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.selected-store h4 {
    margin: 0 0 10px 0;
    color: #007cba;
}

.selected-store p {
    padding: 0;
}

.all-stores-section h4 {
    color: #333;
    border-bottom: 1px solid #ddd;
    padding: 5px;
}

/* Store details map styles */
#store-details-map {
    width: 60%;
    height: 100%;
    float: left;
    border-radius: 16px;
}

#store-details-panel {
    width: 38%;
    height: 100%;
    float: right;
    padding: 20px;
    background: #026858;
    /* border-left: 1px solid #ddd; */
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 16px;
}

#selected-store-name {
    margin: 0 0 15px 0;
    color: #fff;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

#selected-store-details {
    color: #fff;
}

.store-details p {
    padding: 0;
    /* margin: 8px 0;
    font-size: 14px; */
}

.store-details h4 {
    margin: 20px 0 10px 0;
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.service-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.service-icon {
    margin-right: 10px;
    font-size: 20px;
}

.service-name {
    text-transform: capitalize;
    font-weight: 500;
    color: #333;
}

.store-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.store-actions .button {
    margin-right: 10px;
    margin-bottom: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    #store-controls {
        padding: 10px;
    }

    #store-controls .control-group:not(:last-child) {
        margin-bottom: 10px;
    }

    .control-group {
        display: flex;
        margin-bottom: 15px;
        width: 100%;
    }

    .control-group input[type="text"],
    .control-group select {
        width: 100%;
        box-sizing: border-box;
    }

    #store-count {
        display: flex;
        gap: 10px;
        margin-top: 10px;
        text-align: center;
    }

    #store-map {
        width: 100% !important;
        height: 300px;
        float: none;
    }

    #store-sidebar {
        width: 100%;
        height: 200px;
        float: none;
        border-left: none;
        border-top: 1px solid #ddd;
        border-right: 1px solid #ddd;
        display: none;
    }

    #store-details-map {
        width: 100% !important;
        height: 250px;
        float: none;
    }

    #store-details-panel {
        width: 100%;
        height: 300px;
        float: none;
        /* border-left: none;
        border-top: 1px solid #ddd; */
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .control-group {
        margin-bottom: 10px;
    }

    .store-item {
        padding: 10px;
    }

    .service-tag {
        font-size: 10px;
        padding: 2px 6px;
    }

    #store-sidebar {
        /* height: 150px; */
        display: none;
    }

    #store-details-panel {
        height: 250px;
        padding: 15px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar for webkit browsers */
.stores-list::-webkit-scrollbar,
#store-sidebar::-webkit-scrollbar,
#store-details-panel::-webkit-scrollbar {
    width: 8px;
}

.stores-list::-webkit-scrollbar-track,
#store-sidebar::-webkit-scrollbar-track,
#store-details-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.stores-list::-webkit-scrollbar-thumb,
#store-sidebar::-webkit-scrollbar-thumb,
#store-details-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.stores-list::-webkit-scrollbar-thumb:hover,
#store-sidebar::-webkit-scrollbar-thumb:hover,
#store-details-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

