:root {
  --map-bg: transparent;
  --state-fill: #e0e0e0;
  --state-hover: #3498db;
  --tooltip-bg: #d32f2f;
  --tooltip-text: #ffffff;
}

/* Search Container */
#state-linker-search-container {
  position: relative;
  margin: 0 0 15px 0;
}

#state-linker-search {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

#state-linker-search:focus {
  outline: none;
  border-color: var(--state-hover);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Search Icon */
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  pointer-events: none;
  opacity: 0.4;
  display: inline-block;
}

/* Highlighted state from search */
#us-map path.state-highlighted {
  fill: var(--state-hover) !important;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(52, 152, 219, 0.6));
}

/* Suggestions */
#state-linker-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #eee;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  z-index: 10001;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  gap: 14px;
}

.suggestion-item .si-shape {
  width: 44px;
  height: 36px;
  flex-shrink: 0;
  background: #f0f4f8;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

.suggestion-item .si-shape svg {
  width: 100%;
  height: 100%;
}

.suggestion-item .si-name {
  flex: 1;
  font-weight: 500;
}

.suggestion-item .si-arrow {
  color: #94a3b8;
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.2s;
}

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

.suggestion-item:hover {
  background: #f0f7ff;
  color: var(--state-hover);
}

.suggestion-item:hover .si-arrow {
  color: var(--state-hover);
}

/* Map Wrapper */
#map-wrapper {
  position: relative;
  background: transparent;
  overflow: hidden;
  margin: 0;
  padding: 0;
  line-height: 0;
}

/* SVG Styling */
#us-map {
  width: 100%;
  height: auto;
  display: block;
}

#us-map path {
  fill: var(--state-fill);
  stroke: #ffffff;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.3s ease;
}

/* Hover State */
#us-map path:hover {
  fill: var(--state-hover) !important;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.4));
}

.suggestion-not-found {
  padding: 15px 20px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
  font-style: italic;
}
.suggestion-branding {
    position: sticky;
    bottom: 0px;
    width: 100%;
}
.suggestion-branding {
  padding: 5px 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  background: #f8fafc;
}

.suggestion-branding a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.suggestion-branding a:hover {
  text-decoration: underline;
}

/* Tooltip */
#tooltip,
.map-tooltip {
  position: fixed;
  background: var(--tooltip-bg, #d32f2f);
  color: var(--tooltip-text, #fff);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  z-index: 10000;
  white-space: nowrap;
  border-radius: 6px;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
  #state-linker-search {
    font-size: 14px;
    padding: 12px 16px 12px 42px;
  }
  .search-icon {
    left: 14px;
    width: 16px;
    height: 16px;
  }
}
