/* docs/_static/custom_style.css
   Versão: restauradora do estilo de API + mantém seu tema
   Coloque este arquivo em docs/_static/custom_style.css
*/

/* ------------------- Fontes locais ------------------- */
@font-face {
    font-family: 'Rajdhani';
    font-weight: 500;
    src: url('fonts/Rajdhani-Light.woff2') format('woff2'),
         url('fonts/Rajdhani-Light.woff') format('woff');
}

@font-face {
    font-family: 'Rajdhani';
    font-weight: 700;
    src: url('fonts/Rajdhani-Bold.woff2') format('woff2'),
         url('fonts/Rajdhani-Bold.woff') format('woff');
}

@font-face {
    font-family: 'Roboto';
    font-weight: 400;
    src: url('fonts/Roboto-Regular.woff2') format('woff2'),
         url('fonts/Roboto-Regular.woff') format('woff');
}

/* ------------------- Fundo / Containers principais ------------------- */
body,
.wy-body-content,
.wy-nav-content,
.wy-nav-content-wrap,
.document,
.rst-content {
    background-color: #FFF0E7 !important;
}

/* ------------------- Estilo do corpo do texto ------------------- */
.rst-content p,
.rst-content li,
.rst-content span,
.rst-content div,
body {
    font-family: 'Lato', sans-serif;
    color: #333;
}

/* ------------------- Títulos ------------------- */
.rst-content h1,
.rst-content h2,
.rst-content h3 {
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 700 !important;
    color: #321F13 !important;
}

.rst-content h4,
.rst-content h5,
.rst-content h6 {
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 400 !important;
    color: #321F13 !important;
}

/* ------------------- Sidebar e navegação ------------------- */
.wy-nav-top,
.wy-side-nav-search,
.wy-nav-side {
    background-color: #001C39 !important;
    font-family: 'Roboto', sans-serif !important;
}

.wy-side-nav-search a,
.wy-menu-vertical a {
    color: #FFF0E7 !important;
}

.wy-menu-vertical a:hover {
    background-color: #036B9D !important;
}

.wy-menu-vertical li.current > a {
    color: #FFF0E7 !important;
    background-color: #21B1D9 !important;
}

.wy-menu-vertical li.current li.toctree-l2 a {
    color: #FFF0E7 !important;
    background-color: #004975 !important;
}

/* ------------------- Links no corpo do texto ------------------- */
.rst-content a {
    color: #004975 !important;
    text-decoration: none;
}

.rst-content a:hover {
    color: #036B9D !important;
}

/* ------------------- Garante cor marrom em títulos de seção ------------------- */
.rst-content .section h1,
.rst-content .section h2,
.rst-content .section h3,
.rst-content .section h4,
.rst-content .section h5,
.rst-content .section h6 {
    color: #321F13 !important;
}

/* ------------------- Blocos de destaque / code ------------------- */
.highlight,
.highlight-python,
.highlight-default {
    background-color: #f3f6f6 !important;
}

/* Faz a pagina recarregar com transição */
body {
    opacity: 0;
    animation: fadeIn 0.1s ease-in forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Links com linha animada */
a {
    position: relative;
    color: #569cd6;
    text-decoration: none;
}
a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 2px;
    right: 0;
    background: #569cd6;
    transition: width 0.3s ease;
}
a:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* Cabeçalhos com animação */
h1, h2, h3 {
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.6s ease forwards;
}
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Corrige captions do Sphinx (ex: "Indices and tables") */
.rst-content .toctree-wrapper p.caption,
.rst-content .caption-text {
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.4em;
    color: #321F13 !important;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

/* ------------------- DARK MODE ------------------- */
body.dark-mode,
html.dark-mode {
    background-color: #000E1C !important;
    color: #FFF0E7 !important;
}

/* Reset global para dark-mode (mantive o seu comportamento) */
body.dark-mode * {
    background-color: transparent !important;
    color: inherit !important;
}

/* Elementos que mantêm cor no dark mode */
body.dark-mode .wy-nav-side,
body.dark-mode .wy-nav-top {
    background-color: #001C39 !important;
}

body.dark-mode .highlight,
body.dark-mode pre,
body.dark-mode .literal-block {
    background-color: #0A2C4F !important;
    color: #E8E8E8 !important;
}

body.dark-mode code {
    background-color: #004975 !important;
    color: #f3f6f6 !important;
}

/* Títulos em dark mode */
body.dark-mode .rst-content h1,
body.dark-mode .rst-content h2,
body.dark-mode .rst-content h3,
body.dark-mode .rst-content h4,
body.dark-mode .rst-content h5,
body.dark-mode .rst-content h6,
body.dark-mode .rst-content p.caption,
body.dark-mode .rst-content .caption-text {
    color: #FFF0E7 !important;
}

/* Links in dark mode */
body.dark-mode .rst-content a {
    color: #21B1D9 !important;
}
body.dark-mode .rst-content a:hover {
    color: #569cd6 !important;
}

/* ------------------- Admonitions (notas/avisos) ------------------- */
.admonition.note {
    background-color: #F0F8FF;
    border-left: 5px solid #007BFF;
}
.admonition.caution {
    background-color: #FFF3CD;
    border-left: 5px solid #FFC107;
}
.admonition.note p,
.admonition.caution p {
    color: #333 !important;
}

/* Admonitions dark-mode */
body.dark-mode .admonition {
    background-color: transparent !important;
    border: none !important;
}
body.dark-mode .admonition.note {
    background-color: #0A3D73 !important;
    border-left: 5px solid #21B1D9 !important;
}
body.dark-mode .admonition.caution {
    background-color: #5C4F29 !important;
    border-left: 5px solid #F2C572 !important;
}
body.dark-mode .admonition p,
body.dark-mode .admonition.note p,
body.dark-mode .admonition.caution p {
    color: #E8E8E8 !important;
}
body.dark-mode .admonition code {
    background-color: #004975 !important;
    color: #F2C572 !important;
}

/* ===================================================================
   Seção: RESTAURA / GARANTE estilo para API docs (autodoc / napoleon)
   =================================================================== */

/* Blocos de assinatura (class / function signatures) */
.rst-content .desc .sig,
.rst-content .sig,
.rst-content dt .sig,
.rst-content .py.signatures .sig,
.rst-content .autoapi .sig {
    display: inline-block !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    font-family: "Roboto Mono", "Courier New", monospace !important;
    font-weight: 600 !important;
    background-color: #e8f7fb !important;   /* caixa azul-clara */
    color: #004975 !important;              /* texto azul escuro */
    border-left: 4px solid #21B1D9 !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.03) !important;
}

/* Nome da classe / função (maior destaque) */
.rst-content .sig .sig-name,
.rst-content .descclassname,
.rst-content .descname {
    color: #004975 !important;
    font-weight: 700 !important;
    font-family: "Rajdhani", "Roboto Mono", monospace !important;
}

/* Prefixos de módulo (ex: biguasim.) */
.rst-content .sig .sig-prename,
.rst-content .sig .sig-prefix {
    color: #6b9fb7 !important;
    font-weight: 600 !important;
    font-family: "Roboto Mono", monospace !important;
}

/* Parâmetros na assinatura */
.rst-content .sig .sig-param,
.rst-content .sig .sig-param .n,
.rst-content .sig .sig-params {
    color: #213a47 !important;
    font-family: "Roboto Mono", monospace !important;
    font-weight: 500 !important;
}

/* Caixas de método/alias (ex: pequenos botões cinza para métodos) */
.rst-content .autosummary, 
.rst-content .autosummary .toctree-wrapper,
.rst-content .method {
    /* mantemos natural; caso queira, pode estilizar aqui */
}

/* Field list (parâmetros, returns) — título e corpo */
.rst-content .field-list dt {
    font-weight: 700 !important;
    color: #321F13 !important;
    margin-top: 0.6em !important;
}
.rst-content .field-list dd {
    margin-left: 1.2em !important;
    color: #333 !important;
    font-family: 'Roboto', sans-serif !important;
}

/* Dentro do field-body: nomes/tipos */
.rst-content .field-body em,
.rst-content .field-body code,
.rst-content .field-body .xref,
.rst-content .field-body .sig-param {
    font-family: "Roboto Mono", monospace !important;
    color: #036B9D !important;
    font-weight: 600 !important;
}

/* Quando napoleon gera tabelas de parâmetros (numPy / google style) */
.rst-content .napoleon-params,
.rst-content .napoleon-params dt,
.rst-content .napoleon-params dd {
    /* força boa separação e cor */
}
.rst-content .napoleon-params dt {
    font-weight: 700 !important;
    color: #321F13 !important;
}
.rst-content .napoleon-params dd {
    color: #333 !important;
}

/* Highlight / code blocks dentro da API (assinaturas longas) */
.rst-content .highlight pre,
.rst-content pre.literal-block,
.rst-content pre.highlight {
    background-color: #f3f6f6 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    overflow: auto !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
}

/* Inline code e tags monoespaçadas */
.rst-content code,
.rst-content kbd,
.rst-content tt {
    font-family: "Roboto Mono", monospace !important;
    background-color: rgba(0,0,0,0.03) !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
}

/* Link "func" que aparece na assinatura (ex: [source]) */
.rst-content .viewcode-link {
    color: #036B9D !important;
}

/* Restaurar cores de texto dentro dos blocos de descrição (quando o global * setou tudo como inherit) */
.rst-content .desc,
.rst-content .section .desc {
    color: inherit !important;
}

/* Especificidade extra para garantir efeito mesmo com body.dark-mode * */
body.dark-mode .rst-content .desc .sig,
body.dark-mode .rst-content .sig,
body.dark-mode .rst-content dt .sig {
    background-color: #08314b !important;
    color: #dbeffd !important;
    border-left-color: #21B1D9 !important;
}

body.dark-mode .rst-content .field-body em,
body.dark-mode .rst-content .field-body code,
body.dark-mode .rst-content code {
    color: #A9D6EA !important;
}

/* Pequeno ajuste para tabelas geradas por autodoc/autosummary */
.rst-content .autosummary,
.rst-content .rubric,
.rst-content .toctree-wrapper ul {
    color: inherit !important;
}

/* ===================================================================
   Fim da seção de exceções para API docs
   =================================================================== */

/* ================== observações / dicas ==================
 - Se não ver mudança: limpe cache (Ctrl+F5) / abra aba anônima.
 - Se o seu conf.py não carrega o CSS, confirme:
     html_static_path = ['_static']
     html_css_files = ['custom_style.css']
 - Para melhor formatação do napoleon, escreva docstrings em
   Google-style ou NumPy-style (ex: "Args:", "Parameters:").
=========================================================== */
/* ---------------- Ajustes para blocos no modo noturno ---------------- */

/* Assinaturas (classes, funções, métodos) */
body.dark-mode .rst-content .desc .sig,
body.dark-mode .rst-content .sig,
body.dark-mode .rst-content dt .sig,
body.dark-mode .rst-content .py.signatures .sig {
    background-color: #0A2C4F !important;   /* fundo azul-escuro */
    color: #E8E8E8 !important;              /* texto claro */
    border-left-color: #21B1D9 !important;  /* azul vibrante */
}

/* Nome da classe / função */
body.dark-mode .rst-content .sig .sig-name,
body.dark-mode .rst-content .descclassname,
body.dark-mode .rst-content .descname {
    color: #21B1D9 !important;
}

/* Parâmetros */
body.dark-mode .rst-content .sig .sig-param,
body.dark-mode .rst-content .sig .sig-param .n,
body.dark-mode .rst-content .sig .sig-params {
    color: #C6E6F5 !important;
}

/* Tipos nos parâmetros (ex: str, list[float]) */
body.dark-mode .rst-content .field-body em,
body.dark-mode .rst-content .field-body code,
body.dark-mode .rst-content code {
    color: #A9D6EA !important;
    background-color: rgba(255,255,255,0.05) !important;
}

/* Blocos de código / highlight */
body.dark-mode .rst-content .highlight pre,
body.dark-mode .rst-content pre.literal-block,
body.dark-mode .rst-content pre.highlight {
    background-color: #0A2C4F !important;
    color: #E8E8E8 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

/* ----------------- Ajustes adicionais para dark mode ----------------- */

/* Blocos de assinatura (funções, métodos, propriedades) */
body.dark-mode .rst-content dl dt,
body.dark-mode .rst-content dl.method dt,
body.dark-mode .rst-content dl.attribute dt,
body.dark-mode .rst-content dl.class dt {
    background-color: #0A2C4F !important;
    border-left: 4px solid #21B1D9 !important;
    color: #E8E8E8 !important;
}

/* Nome do método/propriedade */
body.dark-mode .rst-content dl dt .sig-name,
body.dark-mode .rst-content .descname,
body.dark-mode .rst-content .descclassname {
    color: #21B1D9 !important;
    font-weight: bold !important;
}

/* Parâmetros na assinatura */
body.dark-mode .rst-content dl dt .sig-param,
body.dark-mode .rst-content dl dt .sig-param .n {
    color: #C6E6F5 !important;
}

/* Labels "Returns", "Return type", "Parameters" */
body.dark-mode .rst-content .field-list .field-name,
body.dark-mode .rst-content .field-list strong {
    color: #21B1D9 !important;
    font-weight: bold !important;
}

/* Texto do corpo das descrições */
body.dark-mode .rst-content .field-list .field-body,
body.dark-mode .rst-content .field-list p {
    color: #E8E8E8 !important;
}

/* ================= PATCH LEGIBILIDADE CÓDIGO ================= */

/* Código inline */
.rst-content code {
    font-family: "Roboto Mono", monospace !important;
    background-color: rgba(0, 0, 0, 0.07) !important;
    color: #1e1e1e !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
}

/* Código em blocos (light mode) */
.rst-content pre.literal-block,
.rst-content pre.highlight,
.rst-content .highlight pre {
    background-color: #f5f7fa !important;
    color: #1e1e1e !important;
    font-family: "Roboto Mono", monospace !important;
    font-size: 0.95em !important;
    line-height: 1.5 !important;
    padding: 12px 14px !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
}

/* Código em blocos (dark mode) */
body.dark-mode .rst-content pre.literal-block,
body.dark-mode .rst-content pre.highlight,
body.dark-mode .rst-content .highlight pre {
    background-color: #001c39 !important;   /* fundo escuro GitHub-like */
    color: #e6edf3 !important;              /* texto claro */
    border-radius: 6px !important;
    padding: 12px 14px !important;
    font-family: "Roboto Mono", monospace !important;
    font-size: 0.95em !important;
    line-height: 1.5 !important;
    overflow-x: auto !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35) !important;
}

/* Syntax highlight mínima no dark mode */
body.dark-mode .highlight .k { color: #ff7b72 !important; } /* keywords */
body.dark-mode .highlight .s { color: #a5d6ff !important; } /* strings */
body.dark-mode .highlight .n { color: #d2a8ff !important; } /* names */
body.dark-mode .highlight .c { color: #8b949e !important; font-style: italic !important; } /* comments */

/* ================= FIM DO PATCH ================= */

/* Garante que imagens centralizadas tenham respiro em cima e embaixo */
img.align-center {
    display: block;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
}

/* Dá um espaço extra entre parágrafos e imagens */
p {
    margin-bottom: 1.5em;
}

/* Para textos como `CaptureWidth` no meio da frase */
code.literal {
    background: #f0f0f0;
    color: #d63384; /* Cor rosa/vinho padrão de documentação técnica */
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 90%;
}

/* Melhora a lista de configurações */
.section ul li {
    margin-bottom: 15px;
    list-style: none; /* Tira a bolinha chata */
    padding-left: 10px;
    border-left: 3px solid #007bff; /* Adiciona uma barrinha azul lateral */
}

/* Deixa o nome da variável (bold) em destaque */
.section ul li strong {
    display: inline-block;
    color: #2c3e50;
    background: #eef2f7;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}