/* Scoped CSS for Trademark Search Tool */
.tmst-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.tmst-main {
  padding: 1.5rem 1rem 3rem;
}

.tmst-container {
  max-width: 1100px;
  margin: 0 auto;
}

.tmst-app-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.tmst-search-section {
  margin-bottom: 1.5rem;
}

.tmst-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.tmst-input-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tmst-input {
  flex: 1;
  min-width: 240px;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.tmst-input:focus {
  border-color: #2563eb;
}

.tmst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-decoration: none;
}

.tmst-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.tmst-btn-primary:hover {
  background: #1d4ed8;
}

.tmst-filters-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.tmst-filter-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tmst-filter-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
}

.tmst-select {
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  outline: none;
}

.tmst-select:focus {
  border-color: #2563eb;
}

.tmst-presets-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tmst-preset-label {
  font-size: 0.825rem;
  color: #64748b;
  font-weight: 500;
}

.tmst-preset-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tmst-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tmst-chip-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Results Panel */
.tmst-results-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.tmst-scorecards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.tmst-scorecard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tmst-scorecard-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.tmst-scorecard-val {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.tmst-text-emerald {
  color: #16a34a;
}

.tmst-text-amber {
  color: #d97706;
}

.tmst-text-blue {
  color: #2563eb;
}

.tmst-text-red {
  color: #dc2626;
}

.tmst-scorecard-desc {
  font-size: 0.825rem;
  color: #475569;
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* Registry Deep Links Card */
.tmst-registry-card, .tmst-spectrum-card, .tmst-collision-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.tmst-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.tmst-card-desc {
  font-size: 0.875rem;
  color: #475569;
  margin: 0 0 1rem;
}

.tmst-echo-mark {
  font-weight: 700;
  color: #0f172a;
}

.tmst-registry-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.tmst-reg-btn {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
  background: #f8fafc;
}

.tmst-reg-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tmst-reg-btn strong {
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.tmst-reg-btn span {
  font-size: 0.75rem;
  color: #64748b;
}

.tmst-reg-uspto:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.tmst-reg-wipo:hover {
  border-color: #059669;
  background: #ecfdf5;
}

.tmst-reg-euipo:hover {
  border-color: #d97706;
  background: #fffbeb;
}

.tmst-reg-ukipo:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
}

/* Abercrombie Spectrum Track */
.tmst-spectrum-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.tmst-spectrum-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  background: #f1f5f9;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.tmst-tier-generic {
  border-left: 3px solid #ef4444;
}

.tmst-tier-descriptive {
  border-left: 3px solid #f59e0b;
}

.tmst-tier-suggestive {
  border-left: 3px solid #3b82f6;
}

.tmst-tier-arbitrary {
  border-left: 3px solid #10b981;
}

.tmst-tier-fanciful {
  border-left: 3px solid #8b5cf6;
}

.tmst-tier-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1e293b;
}

.tmst-tier-score {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.2rem 0;
}

.tmst-tier-sub {
  font-size: 0.7rem;
  color: #475569;
}

.tmst-tier-active {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15);
}

.tmst-tier-active .tmst-tier-name {
  color: #1d4ed8;
}

/* Collision & Proximity */
.tmst-collision-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.tmst-collision-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.tmst-collision-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.tmst-badge-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.tmst-badge-warn {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tmst-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.tmst-collision-text {
  font-size: 0.85rem;
  color: #334155;
  flex: 1;
}

/* Guide Section */
.tmst-guide-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.tmst-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.tmst-lead-text {
  color: #475569;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.tmst-table-wrap {
  overflow-x: auto;
}

.tmst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tmst-table th {
  background: #f8fafc;
  color: #334155;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
}

.tmst-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.tmst-table tr:hover {
  background: #f8fafc;
}

@media (max-width: 768px) {
  .tmst-spectrum-track {
    grid-template-columns: 1fr;
  }
}
