/* Styles specific to compare.html (multi-company trend comparison).
   Reuses .trend-controls / .trend-metric-picker / .trend-chart-wrapper
   styling from company.css; this file only covers the per-slot search
   boxes that company.css doesn't already provide. */

.compare-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
}

.compare-slot {
  flex: 1 1 220px;
  min-width: 220px;
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 3px 18px rgba(65, 100, 145, 0.09);
  padding: 1rem;
}

.compare-slot-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.compare-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
}

.compare-search-icon {
  pointer-events: none;
  margin-right: 0.4rem;
}

.compare-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  min-width: 0;
}

.compare-suggestions {
  animation: compare-fade-in 0.2s;
  position: absolute;
  left: 0;
  right: 0;
  top: 110%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 6px;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: none;
}

@keyframes compare-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.suggestion-item {
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.95rem;
}

.suggestion-item:hover, .suggestion-item.active {
  background: var(--color-surface-tint);
}

.compare-slot-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-blue-soft);
  border-radius: 2rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
}

.compare-slot-name {
  font-weight: 600;
  color: var(--brand-ink);
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-slot-error {
  font-weight: 500;
  color: var(--color-negative);
  font-size: 0.92rem;
}

.compare-slot-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--color-text-secondary);
  padding: 0.2rem 0.5rem;
}

.compare-slot-clear:hover {
  color: var(--brand-blue);
}

@media (max-width: 700px) {
  .compare-slots {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  /* In a column the 220px flex-basis became each slot's height, leaving
     a tall empty box under every search input. */
  .compare-slot {
    flex: 0 0 auto;
    min-width: 0;
  }
}

.compare-intro {
  color: var(--color-text-muted);
  margin: 0 0 16px 0;
  max-width: 760px;
}
