/* AI4RA Prompt Library — extras */

/* Component filter table */
.component-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0 1.25rem;
  align-items: center;
}
.component-filter input,
.component-filter select {
  padding: .45rem .6rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 4px;
  font-size: .85rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
}
.component-filter input {
  flex: 1 1 16rem;
  min-width: 12rem;
}
.component-filter select {
  flex: 0 0 auto;
}
.component-filter .count {
  color: var(--md-default-fg-color--light);
  font-size: .85rem;
  margin-left: auto;
}

/* Card grid — used on the home page in place of a wide 7-column table */
.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}

a.component-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  background: var(--md-default-bg-color);
  color: inherit !important;
  text-decoration: none !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.component-card:hover,
a.component-card:focus-visible {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

a.component-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0;
}
a.component-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
}
a.component-card h3 code {
  background: transparent;
  padding: 0;
  font-size: 1rem;
  color: var(--md-typeset-a-color);
}
a.component-card:hover h3 code,
a.component-card:focus-visible h3 code {
  text-decoration: underline;
}

a.component-card .description {
  margin: 0;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
  /* Limit to ~4 lines to keep cards uniform; content still fully visible on the detail page */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a.component-card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--md-default-fg-color--light);
  margin-top: auto;  /* push meta/tags to the bottom for consistent card height */
}
a.component-card .meta .version {
  font-family: var(--md-code-font-family, monospace);
  background: var(--md-code-bg-color);
  padding: .05rem .4rem;
  border-radius: 10px;
}
a.component-card .meta .manifs {
  color: var(--md-default-fg-color--light);
  font-size: .72rem;
}

a.component-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}
a.component-card .tags .chip {
  font-size: .68rem;
  background: var(--md-code-bg-color);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.status-badge.stable       { background: #dcfce7; color: #14532d; }
.status-badge.experimental { background: #fef3c7; color: #713f12; }
.status-badge.deprecated   { background: #fee2e2; color: #7f1d1d; }

/* Category / domain chips */
.chip {
  display: inline-block;
  padding: .08rem .45rem;
  border-radius: 10px;
  background: var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color);
  font-size: .72rem;
  margin-right: .25rem;
}

/* Fact grid on component pages */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: .6rem 1rem;
  margin: .5rem 0 1.25rem;
  padding: .75rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  background: var(--md-code-bg-color);
}
.fact-grid .fact { display: flex; flex-direction: column; gap: .15rem; }
.fact-grid .fact .label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--md-default-fg-color--light);
}
.fact-grid .fact .value { font-size: .9rem; }

/* Hidden row helper for filter */
.component-row.hidden { display: none; }

/* Dark mode adjustments for chips/badges */
[data-md-color-scheme="slate"] .status-badge.stable       { background: #14532d; color: #dcfce7; }
[data-md-color-scheme="slate"] .status-badge.experimental { background: #713f12; color: #fef3c7; }
[data-md-color-scheme="slate"] .status-badge.deprecated   { background: #7f1d1d; color: #fee2e2; }
