.store-locator-container {
  display: flex;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  position: relative;
}

.store-locator-sidebar {
  width: 300px;
  background: white;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  max-height: 600px;
  z-index: 2;
}

.search-controls {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.location-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.location-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.spinner, .loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.filter-controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.tag-filter-select {
  flex: 2;
  min-width: 0;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-filter-select {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tag-filter-select:focus, .range-filter-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.locations-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.locations-list::-webkit-scrollbar {
  width: 8px;
}

.locations-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.locations-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.locations-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.location-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s;
}

.location-item:hover {
  background-color: #f9fafb;
}

.location-item:last-child {
  border-bottom: none;
}

.location-item.selected {
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.location-name {
  font-weight: 600;
  font-size: 16px;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.3;
}

.location-address {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
  line-height: 1.4;
}

.location-phone {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.location-phone a {
  color: inherit;
  text-decoration: none;
}

.location-phone a:hover {
  text-decoration: underline;
}

.location-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 12px;
  background-color: #e5e7eb;
  color: #374151;
  font-weight: 500;
}

.badge.distance {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge.tag {
  background-color: #f0f9ff;
  color: #0369a1;
}

.search-tip {
  padding: 16px 20px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  line-height: 1.4;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.map-container {
  flex: 1;
  position: relative;
  min-height: 600px;
}

.google-map {
  width: 100%;
  height: 100%;
}

.map-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
}

.loading-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-text {
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
}

.no-locations {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
}

.search-info {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 5;
  max-width: 300px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
}

.search-info strong {
  color: #111827;
}

.error-message {
  padding: 20px;
  text-align: center;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  margin: 20px;
}

.gm-style .custom-popup {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
}

.gm-style .popup-header {
  text-align: center;
  margin-bottom: 12px;
}

.gm-style .popup-logo {
  height: 40px;
  margin-bottom: 8px;
  object-fit: contain;
}

.gm-style .popup-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.gm-style .popup-address {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
  white-space: pre-line;
}

.gm-style .popup-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.gm-style .popup-contact a {
  color: inherit;
  text-decoration: none;
}

.gm-style .popup-contact a:hover {
  text-decoration: underline;
}

.gm-style .popup-hours {
  margin: 12px 0;
}

.gm-style .popup-hours table {
  width: 100%;
  font-size: 12px;
}

.gm-style .popup-hours td {
  padding: 2px 4px;
  vertical-align: top;
}

.gm-style .popup-hours td:first-child {
  font-weight: 500;
  width: 35px;
}

.gm-style .popup-socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.gm-style .social-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.2s;
  text-decoration: none;
  font-size: 16px;
}

.gm-style .social-icon:hover {
  opacity: 1;
}

.loading-skeleton {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton-text {
  background: #e5e7eb;
  border-radius: 4px;
  height: 1em;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

@media (max-width: 768px) {
  .store-locator-container {
    flex-direction: column-reverse;
    margin: 10px 0;
    height: auto !important;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .google-map {
    height: inherit;
  }

  .store-locator-sidebar {
    width: 100% !important;
    border-right: none;
    border-bottom: none;
    display: flex;
    flex-direction: column;
  }
  
  .search-controls {
    order: 1;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .map-container {
    order: 2;
    height: 400px;
    min-height: 400px;
    width: 100%;
  }
  
  .locations-list {
    order: 3;
    max-height: 300px;
    padding: 1rem;
  }
  
  .search-tip {
    order: 4;
  }
  
  .search-controls {
    padding: 15px;
  }
  
  .filter-controls {
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }
  
  .tag-filter-select {
    flex: 2;
    max-width: 60%;
  }
  
  .range-filter-select {
    flex: 1;
    max-width: 40%;
    min-width: 90px;
  }
  
  .location-item {
    padding: 14px 15px;
  }
  
  .location-name {
    font-size: 15px;
  }
  
  .search-info {
    position: relative;
    top: auto;
    left: auto;
    margin: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .store-locator-container {
    margin: 5px 0;
    border-radius: 8px;
  }
  
  .search-controls {
    padding: 12px;
  }
  
  .location-item {
    padding: 12px;
  }
  
  .location-name {
    font-size: 14px;
  }
  
  .location-address, .location-phone {
    font-size: 13px;
  }
  
  .badge {
    font-size: 11px;
    padding: 1px 6px;
  }
}

@media (prefers-contrast: high) {
  .location-item:hover {
    background-color: #f3f4f6;
  }
  
  .location-item.selected {
    background-color: #e0e7ff;
    border-left-color: #1d4ed8;
  }
  
  .badge {
    border: 1px solid currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .loading-spinner {
    animation: none;
  }

  .location-item {
    transition: none;
  }

  .location-search-input, .tag-filter-select, .range-filter-select {
    transition: none;
  }
}

.gm-style .gm-style-iw-c {
  top: -25px !important;
  max-width: 500px !important;
  max-height: 500px !important;
}

.gm-style .gm-style-iw-d {
  max-width: 500px !important;
  max-height: 500px !important;
}

.gm-style .gm-style-iw-tc {
  top: -25px !important;
}