/**
 * --------------------------------------------------------------------
 * docmd : the zero-config documentation engine.
 *
 * @package     @docmd/core (and ecosystem)
 * @website     https://docmd.io
 * @repository  https://github.com/docmd-io/docmd
 * @license     MIT
 * @copyright   Copyright (c) 2025-present docmd.io
 *
 * [docmd-source] - Please do not remove this header.
 * --------------------------------------------------------------------
 */

.oa-spec {
  margin: 2rem 0;
  font-family: var(--font-family-sans, system-ui, -apple-system, sans-serif);
}

.oa-spec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--border-color, #eee);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.oa-spec-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading, #111);
}

.oa-spec-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.oa-spec-version {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted, #666);
  background: var(--code-bg, #f3f4f6);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.oa-download-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--link-color, #3b82f6);
  text-decoration: none;
  border: 1px solid var(--link-color, #3b82f6);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.oa-download-link:hover {
  background: var(--link-color, #3b82f6);
  color: #fff;
}

.oa-spec-description {
  color: var(--text-muted, #666);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.oa-operation {
  margin-bottom: 2rem;
  border: 1px solid var(--border-color, #eee);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-color, #fff);
}

.oa-operation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--code-bg, #f9fafb);
  border-bottom: 1px solid var(--border-color, #eee);
}

.oa-method {
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 65px;
  text-align: center;
}

.oa-path {
  font-weight: 600;
  font-family: var(--font-family-mono, monospace);
  color: var(--text-heading, #111);
}

.oa-deprecated {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.05em;
}

.oa-summary {
  padding: 1rem 1rem 0;
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.oa-description {
  padding: 0.5rem 1rem 1rem;
  margin: 0;
  color: var(--text-muted, #4b5563);
  font-size: 0.95rem;
  line-height: 1.5;
}

.oa-operation h5 {
  margin: 1.5rem 1rem 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #6b7280);
  font-weight: 700;
}

.oa-content-type {
  padding: 0 1rem;
  margin: 0.5rem 0;
}

.oa-content-type code {
  font-size: 0.8rem;
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.oa-schema-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0; /* Margin top only as requested */
  font-size: 0.9rem;
}

.oa-schema-table th, .oa-schema-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #eee);
}

.oa-schema-table th {
  background: var(--code-bg, #f9fafb);
  font-weight: 600;
  color: var(--text-muted, #4b5563);
}

.oa-required {
  color: #ef4444;
  margin-left: 0.25rem;
}

.oa-type {
  color: #0891b2;
  font-family: var(--font-family-mono, monospace);
  font-size: 0.85rem;
}

.oa-param-in {
  font-size: 0.75rem;
  background: var(--code-bg, #f3f4f6);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  color: var(--text-muted, #4b5563);
}

.oa-status-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
}

.oa-status-ok { background: #d1fae5; color: #065f46; }
.oa-status-err { background: #fee2e2; color: #991b1b; }
.oa-status-other { background: #f3f4f6; color: #4b5563; }

/* Dark Mode Overrides */
:root[data-theme=dark] .oa-type {
  color: #22d3ee;
}

:root[data-theme=dark] .oa-status-ok { background: #065f4633; color: #34d399; }
:root[data-theme=dark] .oa-status-err { background: #991b1b33; color: #f87171; }
:root[data-theme=dark] .oa-status-other { background: #27272a; color: #a1a1aa; }

.oa-error {
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  margin: 1rem 0;
}

:root[data-theme=dark] .oa-error {
  background: #991b1b22;
  border-color: #991b1b44;
  color: #f87171;
}