/* ═══════════════════════════════════════════════════════════════════════════
   DevFix — api.css
   Estilos EXCLUSIVOS para a página de documentação da API pública.
   Depende de: tokens.css + layout.css
═══════════════════════════════════════════════════════════════════════════ */

.api-page {
    min-height: calc(100vh - 64px - 200px); /* Aproximando altura header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px var(--df-container-pad-x);
    background: var(--bg-body);
}

.info-inner {
    max-width: var(--df-content-max);
    margin: 0 auto;
    text-align: center;
}

.info-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* Sub-title style based on the design screenshot */
.info-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.api-example-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    text-align: left;
    overflow: hidden;
    position: relative;
}

/* ── Terminal Window ─────────────────────────────────────────────────────── */
.code-editor-wrap {
    background: var(--bg-code);
    border-bottom: 1px solid var(--border);
}

.code-editor-header {
    background: var(--bg-raised);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .code-editor-header {
    background: var(--bg-raised);
    border-bottom-color: var(--border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-filename {
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

[data-theme="dark"] .code-filename {
    color: var(--text-muted);
}

.code-editor {
    padding: 24px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
    color: #e2e8f0;
}

.hl-com { color: var(--text-muted); font-style: italic; }
.hl-attr { color: var(--accent); }
.hl-val { color: var(--text-secondary); }

/* ── Botões / Features (Features Grid 2x2) ─────────────────────────────── */
.api-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 32px 32px 16px; 
}

.api-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--r-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.api-feat span {
    font-size: 1.2rem;
}

/* ── CTA Container ─────────────────────────────────────────────────────── */
.api-cta-wrap {
    padding: 16px 32px 32px;
}

.api-docs-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    color: var(--text-secondary);
    padding: 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.api-docs-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.api-docs-btn-icon {
    vertical-align: -2px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .api-features-grid {
        grid-template-columns: 1fr;
        padding: 24px 20px 12px;
    }
    
    .api-cta-wrap {
        padding: 12px 20px 24px;
    }
}
