/* ============================================================
   docs.css — Estilos compartidos del Centro de Documentación
   Raimundo AI · Complementa Tailwind CDN (no lo sustituye)
   ============================================================ */

/* ---------- Sidebar de índice ---------- */
.docs-sidebar-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: #334155;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.docs-sidebar-link:hover { background-color: #f1f5f9; color: #0f172a; }
.docs-sidebar-link.active {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    border-left: 3px solid #b45309;
}

/* ---------- Navegación "Anterior / Siguiente" ---------- */
.docs-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    margin-top: 3rem;
}
.docs-pager a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    max-width: 48%;
}
.docs-pager a:hover { border-color: #b45309; color: #92400e; box-shadow: 0 4px 12px rgba(180,83,9,0.12); }
.docs-pager .docs-pager-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* ---------- Bloques de contenido ---------- */
.docs-callout {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #1e3a5f;
}
.docs-callout.warn  { border-color: #f59e0b; background: #fffbeb; color: #78350f; }
.docs-callout.ok    { border-color: #10b981; background: #ecfdf5; color: #064e3b; }
.docs-callout.danger { border-color: #ef4444; background: #fef2f2; color: #7f1d1d; }
.docs-callout strong { color: inherit; }

/* ---------- Tarjetas de pasos numeradas ---------- */
.docs-step {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}
.docs-step-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #b45309;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ---------- Tablas comparativas ---------- */
.docs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.8125rem; }
.docs-table th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.docs-table th:first-child { border-top-left-radius: 0.5rem; }
.docs-table th:last-child  { border-top-right-radius: 0.5rem; }
.docs-table td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    vertical-align: top;
}
.docs-table tr:nth-child(even) td { background: #f8fafc; }

/* ---------- Maquetas de UI (mockups) ---------- */
.docs-mock {
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15,23,42,0.1);
    background: #fff;
    text-align: left;
}
.docs-mock-bar {
    height: 2.25rem;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.875rem;
    border-bottom: 1px solid #1e293b;
}
.docs-mock-dot { width: 0.625rem; height: 0.625rem; border-radius: 9999px; }
.docs-mock-caption {
    font-size: 0.6875rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---------- Chips / badges de maquetas ---------- */
.docs-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.docs-chip-blue   { background: #dbeafe; color: #1e40af; }
.docs-chip-amber  { background: #fef3c7; color: #92400e; }
.docs-chip-purple { background: #ede9fe; color: #5b21b6; }
.docs-chip-green  { background: #d1fae5; color: #065f46; }
.docs-chip-red    { background: #fee2e2; color: #991b1b; }
.docs-chip-slate  { background: #e2e8f0; color: #334155; }
.docs-chip-teal   { background: #ccfbf1; color: #115e59; }

/* ---------- Acordeones ---------- */
.docs-accordion-btn { cursor: pointer; }
.docs-accordion-body { display: none; }
.docs-accordion-btn.open + .docs-accordion-body { display: block; }
.docs-accordion-btn.open .docs-accordion-chevron { transform: rotate(180deg); }
.docs-accordion-chevron { transition: transform 0.25s ease; }

/* ---------- Scrollbar discreto en paneles ---------- */
.docs-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.docs-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.docs-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---------- Navegación entre capítulos (inyectada vía docs.js) ---------- */
.docs-chapter-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.6875rem;
    line-height: 1.05rem;
    color: #475569;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.docs-chapter-link:hover { background-color: #f1f5f9; color: #0f172a; }
.docs-chapter-num {
    width: 1.3rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    color: #94a3b8;
    flex-shrink: 0;
}
.docs-chapter-link:hover .docs-chapter-num { color: #b45309; }
.docs-chapter-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.docs-chapter-link.current {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    cursor: default;
}
.docs-chapter-link.current .docs-chapter-num { color: #b45309; }