/* ═══════════════════════════════════════════════════════════════════════════
   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 24px;
    background: var(--bg-body);
}

.info-inner {
    max-width: 800px;
    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: #111424; /* Um azul super escuro para o terminal */
    border-bottom: 1px solid var(--border);
}

.code-editor-header {
    background: #f1f3f5; /* Barra de topo do terminal macOS clara */
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .code-editor-header {
    background: #1e2130;
    border-bottom: 1px solid #2d3040;
}

.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; /* centraliza um pouco o texto */
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #868e96;
}

[data-theme="dark"] .code-filename {
    color: #6c7086;
}

.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: #64748b; font-style: italic; }
.hl-attr { color: #38bdf8; }
.hl-val { color: #34d399; }

/* ── 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: var(--accent);
    color: var(--text-on-accent);
    padding: 16px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.3s var(--ease);
}

.api-docs-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: var(--text-on-accent);
}

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