.modalContent {
  padding: 1.5rem;
}

.warning {
  background: var(--status-below-bg);
  border: 1px solid var(--status-below);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.searchContainer {
  position: relative;
  margin-bottom: 1.5rem;
}

.searchInput {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.searchInput::placeholder {
  color: var(--text-muted);
}

.searchInput:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
}

.searchSpinner {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(var(--brand-rgb), 0.3);
  border-radius: 50%;
  border-top-color: var(--brand);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.results {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Scrollbar styles */
.results::-webkit-scrollbar {
  width: 8px;
}

.results::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.results::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.results::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.resultItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.resultItem:hover {
  background: var(--bg-card);
  border-color: var(--brand);
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(var(--shadow-rgb), 0.06));
}

.schoolInfo {
  flex: 1;
  min-width: 0;
}

.schoolName {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resultButton {
  flex: 0 0 auto;
}

.schoolMeta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.schoolMeta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}


.noResults {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.hint {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 768px) {
  .modalContent {
    padding: 1rem;
  }

  /* One scroll container on mobile: the modal content itself scrolls, so the
     results list must not add its own inner scroll (double scrollbars, and
     the input would be trapped above a short 400px window when the keyboard
     shrinks the sheet). */
  .results {
    max-height: none;
    overflow: visible;
  }

  /* Compact stacked card: name + meta, then a full-width action so the tap
     target is obvious and the card doesn't waste vertical space. */
  .resultItem {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    padding: 0.875rem;
  }

  .resultButton {
    width: 100%;
  }

  .schoolMeta {
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }
}
