/* Scoped CSS for Synonym & Antonym Finder */
.syaf-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  line-height: 1.5;
}

.syaf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.syaf-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.syaf-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 12px;
}

.syaf-header-row h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.syaf-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.syaf-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.15s ease;
}

.syaf-input:focus {
  border-color: #3b82f6;
}

.syaf-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.syaf-btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.syaf-btn-secondary:hover {
  background-color: #e5e7eb;
}

.syaf-btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.syaf-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.syaf-sug-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
}

.syaf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.syaf-chip {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.syaf-chip:hover {
  background-color: #e5e7eb;
  color: #111827;
}

.syaf-filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.syaf-filter-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.syaf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.syaf-pill {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  color: #4b5563;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.syaf-pill:hover {
  background-color: #f3f4f6;
}

.syaf-pill.active {
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  border-color: #2563eb;
}

/* Word display card */
.syaf-display-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  margin-bottom: 2rem;
}

.syaf-word-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.syaf-word-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.syaf-word-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: capitalize;
}

.syaf-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background-color: #dbeafe;
  color: #1e40af;
}

.syaf-badge-adjective {
  background-color: #e0e7ff;
  color: #4338ca;
}

.syaf-badge-noun {
  background-color: #dcfce7;
  color: #15803d;
}

.syaf-badge-verb {
  background-color: #fef3c7;
  color: #b45309;
}

.syaf-def {
  font-size: 1.05rem;
  color: #334155;
  margin: 0 0 1rem;
}

.syaf-example-box {
  background-color: #ffffff;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 1.5rem;
}

.syaf-lexical-section {
  margin-top: 1.25rem;
}

.syaf-lexical-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.65rem;
}

.syaf-lexical-title h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.syaf-count-hint {
  font-size: 0.85rem;
  color: #64748b;
}

.syaf-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.syaf-tag {
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.syaf-syn-tag {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.syaf-syn-tag:hover {
  background-color: #dbeafe;
  transform: translateY(-1px);
}

.syaf-ant-tag {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.syaf-ant-tag:hover {
  background-color: #fee2e2;
  transform: translateY(-1px);
}

.syaf-toast {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #10b981;
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: syafFade 2s ease forwards;
}

@keyframes syafFade {
  0% { opacity: 0; transform: translateY(-6px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* Catalog index */
.syaf-catalog-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.syaf-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.syaf-catalog-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.syaf-catalog-count {
  font-size: 0.85rem;
  color: #6b7280;
}

.syaf-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.syaf-catalog-item {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
  text-align: center;
  text-transform: capitalize;
  transition: all 0.15s ease;
}

.syaf-catalog-item:hover {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

