/* ==========================================================================
   Amarula Solutions Brand — Custom Styles for Sphinx RTD Theme
   Palette: #faf7f4 background, #554948 text, #ce3a0d accent,
            #fdcb0e gold, #ffc107 secondary gold, #212529 dark
   ========================================================================== */

/* ---- Logo ---- */
.wy-side-nav-search > a img.logo,
.wy-side-nav-search .wy-side-nav-search > a img.logo {
    max-width: 100%;
    padding: 10px 15px;
    background: transparent;
}

/* ---- Sidebar & Top Navigation ---- */
.wy-side-nav-search {
    background-color: #222222;
}
.wy-side-nav-search input[type="text"] {
    border-color: #444444;
}

.wy-nav-top {
    background: #222222;
}

/* Sidebar background */
.wy-nav-side {
    background: #1a1a1a;
}

/* Sidebar menu links */
.wy-menu-vertical,
.wy-menu-vertical ul,
.wy-menu-vertical li,
.wy-menu-vertical li.current,
.wy-menu-vertical li.current > ul {
    background: #1a1a1a;
}
.wy-menu-vertical a {
    color: #e6ded7;
}
.wy-menu-vertical a:hover {
    background-color: #2f3337;
    color: #ffffff;
}
/* RTD paints the current branch light grey; keep it dark and use white text
   with a gold marker instead of gold-on-grey. */
/* RTD adds level-specific #c9c9c9 backgrounds for nested current items;
   these need !important to keep the sidebar readable. */
.wy-menu-vertical li.current a {
    background: #1a1a1a !important;
    color: #e6ded7;
    border-right: none;
}
.wy-menu-vertical li.current a:hover {
    background: #333333 !important;
    color: #ffffff;
}
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on a,
.wy-menu-vertical a.current {
    background: #2f3337 !important;
    color: #ffffff;
    border-right: none;
    box-shadow: inset 4px 0 0 #fdcb0e;
}
.wy-menu-vertical li.current > a:hover,
.wy-menu-vertical li.on a:hover,
.wy-menu-vertical a.current:hover {
    color: #ffffff;
    background-color: #3a3f44 !important;
}

/* Sidebar toctree caption */
.wy-menu-vertical p.caption {
    color: #fdcb0e;
}

/* Keep the wiki sidebar focused on the documentation tree. The corporate
   links (Company, Clients & partners, Contact, ...) are already in the top
   navigation and footer. */
.wy-menu-vertical > p.caption:first-of-type,
.wy-menu-vertical > p.caption:first-of-type + ul,
.wy-menu-vertical > ul:not(.current) {
    display: none;
}

/* ---- Content Links ---- */
.rst-content a,
.rst-content a:link {
    color: #a92e09;  /* Darker accent, readable on the off-white background */
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rst-content a:visited {
    color: #8a2607;
}
.rst-content a:hover {
    color: #ce3a0d;
}

/* Links in admonitions, tables, and reference lists */
.rst-content .admonition a,
.rst-content table a,
.rst-content .toctree-wrapper a,
.rst-content .contents a {
    color: #a92e09;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rst-content .admonition a:visited,
.rst-content table a:visited,
.rst-content .toctree-wrapper a:visited,
.rst-content .contents a:visited {
    color: #8a2607;
}
.rst-content .admonition a:hover,
.rst-content table a:hover,
.rst-content .toctree-wrapper a:hover,
.rst-content .contents a:hover {
    color: #ce3a0d;
}

/* ---- Headings ---- */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
    color: #222222;
}

/* ---- Admonition / Note boxes ---- */
.rst-content .admonition.note,
.rst-content .admonition.tip,
.rst-content .admonition.warning,
.rst-content .admonition.attention,
.rst-content .admonition.important {
    border-left: 4px solid #fdcb0e;
}
.rst-content .admonition.note,
.rst-content .admonition.tip {
    background: #fef9e7;
}
.rst-content .admonition.note .admonition-title,
.rst-content .admonition.tip .admonition-title {
    background: #fef9e7;
    color: #222222;
}
.rst-content .admonition.warning .admonition-title {
    background: #fdebd0;
    color: #935116;
}

/* ---- Tables ---- */
.rst-content table.docutils thead th {
    background-color: #222222;
    color: #ffffff;
    border-color: #222222;
}
.rst-content table.docutils tbody tr:nth-child(even) {
    background-color: #fdf6e3;
}

/* Tables marked with ":class: fit-table" stay inside the content column.
   Constraining the width is what makes long cell text wrap: the row simply
   grows vertically instead of the table spilling past the page edge. */
.rst-content table.fit-table {
    width: 100%;
    max-width: 100%;
}
/* The theme keeps header cells on one line; allow them to wrap so long
   column titles do not spill into the next column. */
.rst-content table.fit-table thead,
.rst-content table.fit-table thead th {
    white-space: normal;
}

/* ---- Buttons ---- */
.btn-neutral {
    background-color: #f5f5f5 !important;
    color: #222222 !important;
}
.btn-neutral:hover,
.btn-neutral:focus {
    background-color: #fdcb0e !important;
    color: #222222 !important;
}
.btn-neutral:visited {
    color: #222222 !important;
}

/* ---- Code blocks ---- */
.rst-content code,
.rst-content tt {
    color: #222222;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}
.rst-content pre {
    background: #f5f5f5;
}

/* ---- Footer ---- */
footer {
    color: #666;
}

/* ---- Section subtitles / captions ---- */
span.caption-text {
    color: #fdcb0e;
}

/* ---- Highlight/Selection ---- */
::selection {
    background: #fdcb0e;
    color: #222222;
}
::-moz-selection {
    background: #fdcb0e;
    color: #222222;
}

/* ---- Version / revision indicator ---- */
.rst-content .versionmodified {
    color: #c9a200;
}

/* ---- Breadcrumbs ---- */
.wy-breadcrumbs {
    color: #999;
}
.wy-breadcrumbs a {
    color: #a92e09;
}

/* ---- Search results ---- */
.rst-content .highlighted {
    background-color: #fdf6e3;
    box-shadow: 0 0 0 2px #fdcb0e;
}

/* ---- Responsive fixes ---- */
@media screen and (max-width: 768px) {
    .wy-nav-top {
        background: #222222;
    }
}
