/* Stable Schematic Search UI layer */

/* Never let old helper patches dim or lock result cards. */
body.sch-search-working .sch-old-result-card,
.sch-old-result-card {
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}

.sch-results-quiet-note,
.sch-results-cleared-note {
  display: none !important;
}

/* One clean top progress panel. */
.sch-stable-work-panel {
  display: none;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, .35);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .91)),
    rgba(15, 23, 42, .95);
  color: #e5e7eb;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.sch-stable-work-panel.is-visible {
  display: block;
}

.sch-stable-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 7px;
}

.sch-stable-title {
  font-weight: 950;
  font-size: 14px;
}

.sch-stable-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .14);
  border: 1px solid rgba(59, 130, 246, .35);
}

.sch-stable-subtitle {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 9px;
}

.sch-stable-progress-shell {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, .85);
  border: 1px solid rgba(148, 163, 184, .24);
}

.sch-stable-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #60a5fa, #a78bfa);
  transition: width .24s ease;
}

.sch-stable-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.sch-stable-step {
  border-radius: 9px;
  padding: 6px 7px;
  font-size: 11px;
  color: #94a3b8;
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(148, 163, 184, .16);
}

.sch-stable-step.is-active {
  color: #e0f2fe;
  border-color: rgba(96, 165, 250, .38);
  background: rgba(59, 130, 246, .13);
}

.sch-stable-step.is-done {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .30);
  background: rgba(34, 197, 94, .10);
}

/* Hide old duplicate lower training card. */
.sch-legacy-training-hidden,
.sch-duplicate-training-panel,
.sch-work-panel,
.sch-work-panel.is-visible {
  display: none !important;
}

/* Hide tag chip cloud and Tags rows. */
.tag-cloud,
.tags-cloud,
.popular-tags,
.keyword-cloud,
.keyword-tags,
.search-tags,
.suggestion-tags,
.tag-list,
.tags-list,
.tag-row,
.result-tags,
.source-tags,
.tags,
[data-tags],
[data-tag-list],
[data-role="tags"],
[data-role="tag-cloud"],
.sch-hidden-tags-row,
.sch-stable-hidden-tags {
  display: none !important;
}

.tag:not(.sch-badge),
.badge:not(.sch-badge):not(.sch-stable-badge),
.chip:not(.sch-badge),
.pill:not(.sch-badge),
.tag-chip:not(.sch-badge),
.tag-pill:not(.sch-badge),
.keyword-chip:not(.sch-badge),
.filter-chip:not(.sch-badge) {
  display: none !important;
}

/* Disable embedded previews that cause X-Frame-Options errors. */
iframe,
details iframe,
.preview iframe,
.preview-page iframe {
  display: none !important;
}

.sch-preview-disabled-note {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 720px) {
  .sch-stable-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sch-stable-steps {
    grid-template-columns: 1fr 1fr;
  }
}
