
/* ── API Keys / Portal Desarrolladores ─────────────────────── */

/* Estado de credenciales */
.tz-creds-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    gap: 16px;
    flex-wrap: wrap;
}
.tz-creds-status-empty {
    gap: 10px;
    color: var(--text-muted);
}
.tz-creds-status-left  { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.tz-creds-status-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }

.tz-cred-code {
    font-family: monospace;
    font-size: 11px;
    color: var(--color-primary);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: 3px 8px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.tz-copy-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 3px 5px;
    border-radius: 3px; font-size: 12px;
}
.tz-copy-btn:hover { color: var(--color-primary); background: var(--color-primary-soft); }

/* Drawer de credenciales */
.tz-cred-drawer-field { margin-bottom: 16px; }
.tz-cred-drawer-label {
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); margin-bottom: 4px;
}
.tz-cred-drawer-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.tz-cred-drawer-value {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}
.tz-cred-drawer-value code {
    flex: 1; font-family: monospace; font-size: 11px;
    color: var(--color-primary); word-break: break-all;
}
.tz-cred-drawer-secret { border-color: rgba(26,127,90,0.3); background: rgba(26,127,90,0.04); }
.tz-cred-drawer-secret code { color: var(--color-success); font-weight: 700; }

/* Docs */
.tz-docs-header { margin-bottom: 16px; }
.tz-docs-title  { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; display:flex;align-items:center;gap:8px; }
.tz-docs-subtitle { font-size: 12px; color: var(--text-muted); }
.tz-docs-subtitle code {
    background: var(--bg-surface-2); padding: 2px 6px;
    border-radius: 3px; font-size: 11px;
}
.tz-docs-section-label {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    margin: 22px 0 8px;
    padding-bottom: 6px; border-bottom: 2px solid var(--color-primary-border);
}

/* Endpoint accordion */
.tz-endpoint {
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    margin-bottom: 8px; overflow: hidden; background: var(--bg-surface);
}
.tz-endpoint-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; cursor: pointer;
    background: var(--bg-surface-2); transition: filter 0.15s;
}
.tz-endpoint-header:hover { filter: brightness(0.97); }
.tz-endpoint-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tz-method-badge {
    font-size: 10px; font-weight: 800; padding: 2px 8px;
    border-radius: 3px; color: white; letter-spacing: 0.06em; flex-shrink: 0;
}
.tz-endpoint-path  { font-size: 12px; color: var(--text-primary); font-weight: 600; }
.tz-endpoint-title { font-size: 12px; color: var(--text-muted); }
.tz-endpoint-body  { display: none; padding: 16px; border-top: 1px solid var(--border-subtle); background: var(--bg-surface-2); }
.tz-endpoint.open .tz-endpoint-body   { display: block; }
.tz-endpoint.open .tz-accordion-chevron { transform: rotate(180deg); }
.tz-endpoint-section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--color-primary);
    margin: 14px 0 6px;
}
.tz-endpoint-section-label:first-child { margin-top: 0; }

/* Code block */
.tz-code-block {
    position: relative; background: #1e2433;
    border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto;
}
.tz-code-block code {
    font-family: 'Fira Code','Cascadia Code',monospace; font-size: 11px;
    color: #e2e8f0; white-space: pre; display: block;
}
.tz-code-copy {
    position: absolute; top: 8px; right: 8px;
    background: rgba(255,255,255,0.1); border: none;
    color: rgba(255,255,255,0.6); cursor: pointer;
    padding: 4px 7px; border-radius: 4px; font-size: 12px;
}
.tz-code-copy:hover { background: rgba(255,255,255,0.2); color: white; }

/* Lang tabs */
.tz-lang-tabs { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.tz-lang-tab {
    padding: 4px 12px; font-size: 11px; font-weight: 600;
    border: 1px solid var(--border-default); border-radius: 4px;
    background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
    transition: all 0.15s;
}
.tz-lang-tab.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Misc */
.tz-btn-danger-hover:hover { background: rgba(185,28,28,0.06); color: var(--color-danger); border-color: rgba(185,28,28,0.2); }
.tz-btn-xs { padding: 4px 10px; font-size: 11px; }

/* ── Secciones de docs con card blanca ──────────────────────── */
.tz-docs-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.tz-docs-section .tz-docs-section-label {
    margin-top: 0;
    margin-bottom: 12px;
}

.tz-docs-section .tz-endpoint {
    box-shadow: none;
    border-color: var(--border-subtle);
}
.tz-docs-section .tz-endpoint:last-child {
    margin-bottom: 0;
}

/* ── API status bar ─────────────────────────────────────────── */
.tz-api-status-bar {
    margin-bottom: 20px;
}
.tz-api-status-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid;
}
.tz-api-status-item i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.tz-api-status-item > div { display: flex; flex-direction: column; gap: 2px; }
.tz-api-status-item strong { font-weight: 700; font-size: 13px; }
.tz-api-status-item span { color: var(--text-secondary); }
.tz-api-status-item code {
    background: rgba(0,0,0,0.06); padding: 1px 5px;
    border-radius: 3px; font-size: 11px;
}

.tz-api-status-dev {
    background: rgba(146,97,10,0.06);
    border-color: rgba(146,97,10,0.25);
    color: #7a5c00;
}
.tz-api-status-dev i { color: #b07d0a; }

/* Tablas dentro del endpoint body con fondo blanco */
.tz-endpoint-body .tz-table {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.tz-endpoint-body .tz-table thead tr {
    background: var(--bg-surface-2);
}
.tz-endpoint-body .tz-table tbody tr {
    background: var(--bg-surface);
}
.tz-endpoint-body .tz-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

/* Sección label dentro del endpoint */
.tz-endpoint-section-label {
    background: var(--bg-surface);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
    margin: 14px 0 8px;
}
.tz-endpoint-section-label:first-child { margin-top: 0; }
