.happ-explore-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.happ-explore-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.happ-explore-logo h1 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.happ-explore-logo p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.875rem;
}

.connect66-link {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.connect66-link:hover {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.connect66-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.connect66-icon {
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connect66-icon svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
}

.connect66-main {
  font-weight: 600;
  font-size: 0.875rem;
}

.connect66-sub {
  font-size: 0.75rem;
  opacity: 0.8;
}

.connect66-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.connect66-link:hover .connect66-arrow {
  transform: translateX(0.25rem);
}

.happ-explore-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.happ-explore-sidebar {
  width: 400px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.happ-explore-filters {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-section {
  margin-bottom: 1rem;
}

.filter-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
}

.search-container {
  display: flex;
  gap: 0.5rem;
}

.location-search-input,
.filter-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.location-search-input {
  flex: 1;
}

.location-search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.reset-button {
  padding: 0.5rem 0.75rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.reset-button:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.reset-button svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.reset-button:hover svg {
  transform: rotate(45deg);
}

.reset-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.advanced-toggle {
  width: 100%;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.advanced-toggle:hover {
  background: #f3f4f6;
}

.advanced-toggle.active {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.advanced-toggle.active .chevron {
  transform: rotate(180deg);
}

.advanced-content {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-height: 8rem;
  overflow-y: auto;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

.checkbox-item label {
  font-weight: normal;
  margin: 0;
  font-size: 0.875rem;
}

.happ-explore-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.results-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-count {
  font-weight: 600;
  color: #dc2626;
  font-size: 1.125rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6b7280;
}

.locations-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem;
}

.location-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.location-item:hover {
  background: rgba(220, 38, 38, 0.05);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.location-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #111827;
}

.location-address {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.location-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.location-tag {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.pagination-controls {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #b91c1c;
}

.pagination-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.happ-explore-map-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.happ-explore-map {
  width: 100%;
  height: 100%;
}

.map-stats {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 4rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: bold;
  color: #dc2626;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.zoom-controls {
  position: absolute;
  top: 6rem;
  right: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.zoom-btn {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #6b7280;
}

.zoom-btn:hover {
  background: #f9fafb;
  color: #dc2626;
}

.zoom-btn:first-child {
  border-bottom: 1px solid #e5e7eb;
}

.zoom-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.map-legend {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 240px;
}

.map-legend h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-marker {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Marker colors are now dynamically set via inline styles from taxonomy terms */

.legend-item span {
  font-size: 0.75rem;
  color: #6b7280;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-content p {
  color: #6b7280;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .happ-explore-sidebar {
    width: 350px;
  }
  
  .connect66-link {
    padding: 0.5rem 0.75rem;
  }
  
  .connect66-main,
  .connect66-sub {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .happ-explore-content {
    flex-direction: column;
  }
  
  .happ-explore-sidebar {
    width: 100%;
    height: 40vh;
  }
  
  .happ-explore-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .connect66-link {
    align-self: stretch;
    justify-content: center;
  }
  
  .reset-text {
    display: none;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .map-legend {
    display: none;
  }
}

/* Mapbox popup styling */
.mapboxgl-popup-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0;
  max-width: 20rem;
}

.location-popup {
  font-family: inherit;
}

.popup-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.popup-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  color: #6b7280;
}

.popup-content {
  padding: 1rem;
}

.popup-description {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
}

.popup-address {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

.popup-details {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.popup-photos {
  margin-bottom: 1rem;
}

.popup-actions {
  display: flex;
  gap: 0.5rem;
}

.popup-directions,
.popup-details-link {
  flex: 1;
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.popup-details-link {
  background: #dc2626;
  color: white;
}

.popup-details-link:hover {
  background: #b91c1c;
  color: white;
}

.popup-directions {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.popup-directions:hover {
  background: #e5e7eb;
  color: #374151;
}

.mapboxgl-popup-close-button {
  font-size: 18px;
  padding: 0 6px 2px;
  right: 18px;
  top: 12px;
}