/*
 * Testinator Dojo — modular stylesheets configuration.
 * Base layout styles are kept here, and page-specific styles are split into
 * modular scenario stylesheets.
 */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  color: #1a1a1a;
  background: #fafafa;
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: #1f2937;
  color: #f9fafb;
}

.site-header a { color: inherit; text-decoration: none; }
.site-title { font-weight: 600; font-size: 1.1rem; }
.back-link { font-size: 0.9rem; opacity: 0.85; }
.back-link:hover { opacity: 1; text-decoration: underline; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-link {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  opacity: 0.9;
}

.header-link:hover { opacity: 1; background: rgba(255, 255, 255, 0.2); }

.site-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.lead { color: #4b5563; max-width: 60ch; }

.catalog h1 { margin-top: 0; }

.scenario-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.scenario-card a {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s, box-shadow 0.1s;
}

.scenario-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.scenario-card h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.scenario-card p { margin: 0 0 0.5rem; color: #4b5563; font-size: 0.92rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  margin-right: 0.5rem;
}

.tag--filter {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tag--filter:hover { background: #e0e7ff; }

.tag--filter.tag--active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.tag--clear {
  background: transparent;
  color: #6b7280;
  border-color: transparent;
  text-decoration: underline;
}

.empty-state {
  margin-top: 2rem;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.scenario h1 { margin-top: 0; }

.scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.scenario-header h1 { margin: 0; }

.goal-panel {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.goal-panel ol { margin: 0.5rem 0 0 1.25rem; }

#playground-widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.state-label {
  margin: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  font: inherit;
  padding: 0.4rem 0.9rem;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn:hover { background: #111827; }

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.status-badge.success::before {
  content: "\2713";
  font-size: 0.95rem;
}

.status-badge.benchmark {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

/*
 * Benchmark fixtures (accessibility / localization).
 * These pages render realistic UI with intentionally seeded defects; the
 * ground-truth oracle is served as the route's `.json` representation.
 */
.benchmark-note {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-left: 4px solid #7c3aed;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.benchmark-note code { font-size: 0.82rem; }

.fixture-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.fixture-card + .fixture-card { margin-top: 1.25rem; }

.fixture-card h2 { margin-top: 0; font-size: 1.05rem; }

.fixture-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e5e7eb;
}

.fixture-row:last-child { border-bottom: none; }

.fixture-form label { display: block; font-weight: 600; margin: 0.9rem 0 0.25rem; }

.fixture-form input,
.fixture-form select,
.fixture-form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.fixture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

/* RTL fixture wrapper (localization). */
.rtl-region { direction: rtl; text-align: right; }

/* Localization locale switcher. */
.locale-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.locale-link {
  padding: 0.2rem 0.7rem;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  text-decoration: none;
}

.locale-link:hover { background: #e0e7ff; }

.locale-link--active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.l10n-root .submit { margin: 0 0.35rem 0.35rem 0; }

