/* TermBlade API reference styles */

.api-page .components-hero .hero-description {
  max-width: 760px;
}

.api-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.api-stats span {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 0.65rem 0.9rem;
}

.api-stats strong {
  color: var(--text-primary);
}

.api-content .api-assembly {
  margin-bottom: 3rem;
  max-width: 100%;
  min-width: 0;
}

.api-content {
  max-width: 100%;
  width: 100%;
}

.api-content .api-assembly > h2 {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}

.api-content .api-assembly > p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.api-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.api-guidance-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.api-guidance-grid p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.api-type {
  border-top: 1px solid var(--border);
  max-width: 100%;
  min-width: 0;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.api-type:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.api-type-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.api-type-header h3 {
  font-size: 1.15rem;
  margin: 0;
}

.api-kind {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(63, 185, 80, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
}

.api-signature {
  margin-bottom: 0.8rem;
  padding: 0.8rem 1rem;
  white-space: pre-wrap;
}

.api-signature code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.api-type > p {
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.api-crosslink {
  font-size: 0.88rem;
}

.api-empty {
  color: var(--text-muted) !important;
  font-style: italic;
}

.api-members-table {
  table-layout: fixed;
  min-width: 760px;
}

.api-members-table th:nth-child(1),
.api-members-table td:nth-child(1) {
  width: 19%;
}

.api-members-table th:nth-child(2),
.api-members-table td:nth-child(2) {
  width: 12%;
}

.api-members-table th:nth-child(3),
.api-members-table td:nth-child(3) {
  width: 34%;
}

.api-members-table td:nth-child(3) code {
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 900px) {
  .api-guidance-grid {
    grid-template-columns: 1fr;
  }

  .api-namespace,
  .api-overview {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .api-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .api-type-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .api-members-table {
    min-width: 0;
  }

  .api-members-table,
  .api-members-table thead,
  .api-members-table tbody,
  .api-members-table tr,
  .api-members-table th,
  .api-members-table td {
    display: block;
    width: 100% !important;
  }

  .api-members-table thead {
    display: none;
  }

  .api-members-table tr {
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0;
  }

  .api-members-table td {
    border-bottom: 0;
    padding: 0.25rem 0;
  }

  .api-members-table td::before {
    color: var(--text-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
  }

  .api-members-table td:nth-child(1)::before { content: "Member"; }
  .api-members-table td:nth-child(2)::before { content: "Kind"; }
  .api-members-table td:nth-child(3)::before { content: "Signature"; }
  .api-members-table td:nth-child(4)::before { content: "Description"; }
}
