/* Store Locator Plugin Styles */

#store-locator-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Search Section */
.store-search {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

#store-search-input {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-right: 10px;
  outline: none;
  transition: border-color 0.3s ease;
}

#store-search-input:focus {
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#store-search-btn {
  background: #007cba;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-left: 10px;
}

#store-search-btn:hover {
  background: #005a87;
}

/* Main Layout */
.store-locator-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Map Styles */
#map {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

/* Sidebar Styles */
.store-sidebar {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-height: 500px;
  overflow-y: auto;
}

/* Legend Styles */
.legend {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.legend h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 17px;
  color: #555;
  gap: 15px;
  font-weight: 600;
}

.marker-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

/* Store Listings */
.store-listings h4 {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
  text-transform: uppercase;
}

.store-listings h4:first-of-type {
  margin-top: 0;
}

/* Store Items */
.store-item {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.store-item:hover {
  background: #f0f8ff;
  border-color: #007cba;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}
.store-item.active {
  background: #f0f8ff;
  border-color: #007cba;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}

.store-item h5 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.store-item p {
  margin: 0 0 4px 0;
  font-size: 12px;
  line-height: 1.4;
  color: #666;
}

.store-item p:last-child {
  margin-bottom: 0;
}

/* Google Maps Info Window Styles */
.store-info {
  max-width: 250px;
  padding: 10px;
}

.store-info h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.store-info p {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.store-info p:last-child {
  margin-bottom: 0;
}

.store-info strong {
  color: #333;
}

/* Empty States */
.fourways-stores:empty::after {
  content: "No Fourways found in this area";
  color: #999;
  font-style: italic;
  font-size: 12px;
  display: block;
  text-align: center;
  padding: 20px;
}
.dealer-stores:empty::after {
  content: "No dealers found in this area";
  color: #999;
  font-style: italic;
  font-size: 12px;
  display: block;
  text-align: center;
  padding: 20px;
}

.wholesaler-stores:empty::after {
  content: "No wholesalers found in this area";
  color: #999;
  font-style: italic;
  font-size: 12px;
  display: block;
  text-align: center;
  padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-locator-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .store-sidebar {
    max-width: none;
    max-height: 300px;
    order: -1;
    max-width: 100% !important;
  }

  #map {
    height: 350px !important;
    width: 100%;
    flex: unset !important;
  }

  #store-search-input {
    margin-right: 0;
    margin-bottom: 10px;
  }

  #store-search-btn {
    margin-left: 0;
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  #store-locator-container {
    padding: 0 10px;
  }

  .store-search {
    padding: 15px;
  }

  .store-sidebar {
    padding: 15px;
  }

  #map {
    height: 300px !important;
  }
}

/* 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 #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Accessibility */
.store-item:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

#store-search-input:focus,
#store-search-btn:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .store-sidebar {
    box-shadow: none;
    border: 1px solid #000;
  }

  #map {
    display: none;
  }

  .store-locator-wrapper {
    flex-direction: column;
  }
}
