.back-link {
  font-size: 0.9375rem;
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.back-link:hover {
  opacity: 0.8;
}

/* Top Section: Search + About side by side */
.top-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.search-tool {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 50%, #BBF7D0 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #22C55E;
}

.search-tool-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.search-country-flag {
  width: 28px;
  height: 21px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  object-fit: cover;
}

.search-tool-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #166534;
  margin: 0;
  line-height: 1.3;
}

.search-box {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 700;
  color: #166534;
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
}

.autocomplete-wrapper {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 40px;
  border: 2px solid #22C55E;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #22C55E;
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  box-shadow: var(--shadow-lg);
}

.suggestions-list.active {
  display: block;
}

.suggestion-item {
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.875rem;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background: #F0FDF4;
}

.show-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: white;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

.show-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.show-btn:disabled {
  background: #D1D5DB;
  color: #9CA3AF;
  cursor: not-allowed;
}

.about-tool {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #BFDBFE 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #3B82F6;
}

.about-title {
  font-size: 1.125rem;
  color: #1E3A8A;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.about-content p {
  margin-bottom: var(--space-xs);
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1E40AF;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Results Section */
.results-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  margin-bottom: var(--space-lg);
}

.results-section.showing,
.results-section[style*="block"] {
  opacity: 1;
  transform: translateY(0);
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.results-title {
  font-size: 1.125rem;
  color: #1E3A8A;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.postal-info {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #BFDBFE 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #3B82F6;
}

.postal-details {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #1E40AF;
}

.postal-code-display {
  font-family: 'Courier New', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1E3A8A;
  background: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  margin: var(--space-sm) 0;
  letter-spacing: 0.05em;
  border: 2px solid #3B82F6;
}

.map-container {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 50%, #BBF7D0 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #22C55E;
}

.map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-md);
  border: 2px solid #22C55E;
}

/* Custom Map Markers */
.custom-marker {
  background: transparent;
  border: none;
}

.marker-pin {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  background: #EF4444;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -20px 0 0 -20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin.nearby {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  background: #3B82F6;
}

.marker-pin span {
  transform: rotate(45deg);
  font-size: 18px;
}

.marker-pin.nearby span {
  font-size: 14px;
}

/* Layer Control */
.layer-control {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 6px;
  display: flex;
  gap: 4px;
}

.layer-btn {
  width: 36px;
  height: 36px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #F3F4F6;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.layer-btn:hover {
  background: #E5E7EB;
  transform: translateY(-1px);
}

.layer-btn.active {
  border-color: #3B82F6;
  background: #EFF6FF;
}

/* Street View Control */
.street-view-control {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 4px;
}

.street-view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.street-view-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Street View Link in Popup */
.street-view-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.street-view-link:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

/* Bottom Section: Cities + States */
.bottom-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.popular-cities {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 50%, #BBF7D0 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #22C55E;
}

.section-title {
  font-size: 0.9375rem;
  color: #166534;
  margin-bottom: var(--space-sm);
  font-weight: 700;
  line-height: 1.4;
}

.cities-note {
  font-size: 0.875rem;
  color: #166534;
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.cities-select-wrapper {
  margin-bottom: var(--space-md);
}

.cities-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid #22C55E;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: white;
  cursor: pointer;
}

.cities-select:focus {
  outline: none;
  border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.states-list {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid #E5E7EB;
}

.states-title {
  font-size: 1rem;
  color: #374151;
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.states-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-height: 400px;
  overflow-y: auto;
}

.state-link {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  color: #2563EB;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background var(--transition-fast);
  border-radius: var(--radius-sm);
}

.state-link:hover {
  background: #EFF6FF;
  text-decoration: underline;
}

.state-link.active {
  background: #1E40AF;
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}

.state-link.active:hover {
  background: #1E3A8A;
  text-decoration: none;
}

@media (max-width: 1023px) {
  .top-section,
  .bottom-section {
    grid-template-columns: 1fr;
  }

  .results-layout {
    grid-template-columns: 1fr;
  }
}

/* Enhanced Results Styles */
.location-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid #3B82F6;
}

.location-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: var(--space-xs);
}

.location-address {
  font-size: 0.9375rem;
  color: #3B82F6;
  margin: 0;
}

.postal-codes-section {
  margin-bottom: var(--space-md);
}

.postal-codes-section h4,
.nearby-section h4,
.location-details h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: var(--space-sm);
}

.postal-codes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.postal-code-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid #DBEAFE;
  transition: all var(--transition-fast);
}

.postal-code-item:hover {
  border-color: #3B82F6;
  box-shadow: var(--shadow-sm);
}

.postal-code-item.primary {
  border-color: #3B82F6;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.postal-code-number {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E3A8A;
  min-width: 100px;
}

.postal-code-area {
  flex: 1;
  font-size: 0.875rem;
  color: #1E40AF;
}

.copy-btn-small {
  padding: var(--space-xs);
  background: #3B82F6;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn-small:hover {
  background: #2563EB;
  transform: scale(1.05);
}

.nearby-section {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid #DBEAFE;
}

.nearby-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nearby-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  gap: var(--space-sm);
}

.nearby-item:hover {
  background: #EFF6FF;
}

.nearby-name {
  font-size: 0.875rem;
  color: #1E40AF;
  font-weight: 500;
  flex: 1;
}

.nearby-distance {
  font-size: 0.75rem;
  color: #6B7280;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nearby-postal {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: #3B82F6;
  font-weight: 600;
  white-space: nowrap;
}

.location-details {
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid #DBEAFE;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid #E5E7EB;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.detail-value {
  color: #1E40AF;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 767px) {
  .about-title {
    font-size: 1rem;
  }

  .map {
    height: 250px;
  }

  .postal-code-display {
    font-size: 1.25rem;
  }

  .location-name {
    font-size: 1.25rem;
  }

  .postal-code-number {
    font-size: 1rem;
    min-width: 80px;
  }
}
