/* ===============================
   Kvantify QDK - RTD Theme Colors
   =============================== */

:root {
    --kfy-bg: #ffffff;
    --kfy-text: #202020;
    --kfy-color: #00392f;
    --kfy-color-light: #24a926;
    --kfy-color-medium: #00573f;
    --kfy-color-bg: #f5f8f6;
    --kfy-color-bg-alt: #d3ded7;
    --kfy-color-muted: #043F2Dc9;
    --kfy-color-more-muted: #043F2D98;
}


/* MAIN CONTENT AREA */
.wy-nav-content {
    background-color: var(--kfy-bg);
    color: var(--kfy-text);
    max-width: 1200px;
}



/* SIDEBAR */
.wy-side-nav-search,
.wy-nav-side {
    background-color: var(--kfy-color-bg);
    color: var(--kfy-color);
}
/* SEARCH BAR and PROJECT NAME */
.wy-side-nav-search > a,
.wy-side-nav-search > div.version {
    color: var(--kfy-color);
    font-size: 1.3em;
}
.wy-side-nav-search > a:hover {
    color: var(--kfy-color);
}
.wy-side-nav-search .wy-form input[type="text"],
.wy-side-nav-search input[type="text"] {
    border: 1px solid var(--kfy-color) !important;
    background: var(--kfy-bg);
    color: var(--kfy-color);
    box-shadow: none !important;
}
.wy-side-nav-search .wy-form input[type="text"]::placeholder {
    color: var(--kfy-color);
    opacity: 0.75;
}
.wy-side-nav-search .wy-form input[type="text"]:focus,
.wy-side-nav-search input[type="text"]:focus {
    border: 1px solid var(--kfy-color) !important;
    box-shadow: 0 0 0 1px var(--kfy-color) !important;
    outline: none;
}


/* SIDEBAR LINKS */
.wy-menu-vertical a {
    color: var(--kfy-color);
    border-top: none !important;
    border-bottom: none !important;
}

.wy-menu-vertical li[class*="toctree-l"] > a {
    background-color: var(--kfy-color-bg) !important;
    color: var(--kfy-color);
    border-right: none !important;
}
.wy-menu-vertical li[class*="toctree-l"] > a:hover {
    background-color: var(--kfy-color-bg-alt) !important;
    color: var(--kfy-color);

}
.wy-menu-vertical li[class*="toctree-l"] > a.current {
    background-color: var(--kfy-color-bg-alt) !important;
    color: var(--kfy-color);
    border-left: 4px solid var(--kfy-color);
}

/* Expandable TOC icons (+/-) in sidebar */
.wy-menu-vertical li button.toctree-expand {
    color: var(--kfy-color) !important;
}


/* TOP BAR (mobile / narrow screens) */
.wy-nav-top {
    background-color: var(--kfy-color-bg);
}
/* TOP BAR PROJECT NAME */
.wy-nav-top a,
.wy-nav-top .icon-home {
    color: var(--kfy-color);
    font-size: 1.3em;
}
.wy-nav-top a:hover {
    color: var(--kfy-color-light);
}


/* LINKS IN CONTENT */
a {
    color: var(--kfy-color);
}
a:visited {
    color: var(--kfy-color);
}
a:hover {
    color: var(--kfy-color-light);
}

.rst-content a,
.rst-content a:visited,
.rst-content a:hover {
    text-decoration: underline;
}

.toctree-wrapper a,
.toctree-wrapper a:hover,
.toctree-wrapper a:visited,
.wy-breadcrumbs > li:nth-child(1) > a:nth-child(1) {
    text-decoration: none !important;
}



/* TITLES */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
    color: var(--kfy-color) !important;
}

/* Ensure links within headers also get the correct color */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: var(--kfy-color) !important;
}

/*Table of content color*/
.rst-content .topic-title {
    color: var(--kfy-color) !important;
}


/* CODE BLOCKS */
div[class*="highlight"]:not(.math) {
    background: var(--kfy-color-bg);
    border: none !important;
    border-radius: 6px;
}
div[class*="highlight"]:not(.math) pre {
    background-color: transparent;
    color: var(--kfy-color);
    border: none;
}


/* COPY BUTTON STYLE (sphinx_copybutton) */
.copybtn {
    background-color: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-radius: 4px;
}

.copybtn:hover {
    background-color: var(--kfy-color) !important;
    color: var(--kfy-color-bg) !important;
}

/* Tab sets */
.sd-tab-content {
    border-top: 1.5px solid var(--kfy-color-more-muted);
    margin-top: -1.5px;
    border-bottom: 1.0px solid var(--kfy-color-more-muted);

}
.sd-tab-set > .sd-tab-label {
    background: var(--kfy-bg);
    color: var(--kfy-color-more-muted);
    border-bottom: 1.5px solid var(--kfy-color-more-muted);
    z-index: 1;
}
.sd-tab-set > input:not(:checked) + .sd-tab-label:hover {
    color: var(--kfy-color-muted) !important;
    border-bottom: 2px solid var(--kfy-color-muted) !important;
    z-index: 1;
}
.sd-tab-set > input:checked + .sd-tab-label,
.sd-tab-set > input:checked + .sd-tab-label:hover {
    color: var(--kfy-color);
    border-bottom: 4px solid var(--kfy-color);
    z-index: 1;
}


/* GRID ITEM CARDS (sphinx-design) */
.sd-card {
    background-color: var(--kfy-color-bg) !important;
    border: 1px solid var(--kfy-color) !important;
    border-radius: 6px !important;
    transition: all 0.2s ease-in-out;
}
.sd-card:hover {
    border-color: var(--kfy-color) !important;
    transform: scale(1.02);
    box-shadow: 0 6px 12px -3px rgba(0, 0, 0, 0.15);
}
.sd-card-title {
    color: var(--kfy-color) !important;
}
.sd-card-body {
    color: var(--kfy-color) !important;
}


/* NOTE AND TIP ADMONITIONS */
.rst-content .note,
.rst-content .tip {
    background: var(--kfy-bg);
    border-left: 4px solid var(--kfy-color);
    color: var(--kfy-color);
}
.rst-content .note > .admonition-title,
.rst-content .tip > .admonition-title {
    background: var(--kfy-color-bg-alt);
    color: var(--kfy-color);
}

/*REFERENCE MANUAL SECTION*/
/* General cross-reference links (in docstrings, tables, etc.) */
.rst-content a.reference.internal code,
.rst-content a.reference.external code {
    color: var(--kfy-color);
}

/* Visited state to prevent them from turning purple */
.rst-content a.reference.internal:visited code,
.rst-content a.reference.external:visited code {
    color: var(--kfy-color);
}

/* Hover state for cross-reference links */
.rst-content a.reference.internal:hover code,
.rst-content a.reference.external:hover code {
    color: var(--kfy-color-light);
}

/* Viewcode links in definition lists, i.e., the [source] button. */
.rst-content dt .viewcode-link {
    color: var(--kfy-color);
}
.rst-content dt .viewcode-link:hover {
    color: var(--kfy-color-light);
}

/*Color the methods in reference manual.*/
.rst-content dt.sig {
    background: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-left: solid 3px var(--kfy-color) !important;
}
/*Color classes in reference manual.*/
.rst-content .py.class > dt.sig {
    background: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-top: solid 3px var(--kfy-color) !important;
    border-left: none !important;
    padding: 0.5em 0.5em;
    margin-bottom: 1em;
}
/*Color functions in reference manual.*/
.rst-content .py.function > dt.sig {
    background: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-top: solid 3px var(--kfy-color) !important;
    border-left: none !important;
    padding: 0.5em 0.5em;
    margin-bottom: 1em;
}
/* Color for the actual name of the class, function, or method */
.rst-content dt.sig .sig-name.descname {
    color: var(--kfy-color) !important;
}


/* Style for the first button element */
.rst-content a.btn[rel="prev"],
.rst-content a.btn[rel="next"] {
    background-color: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-color: var(--kfy-color) !important;
    text-decoration: none !important;
}
.rst-content a.btn[rel="prev"]:hover,
.rst-content a.btn[rel="next"]:hover {
    background-color: var(--kfy-color-bg) !important;
    color: var(--kfy-color) !important;
    border-color: var(--kfy-color) !important;
    text-decoration: none !important;
}

/*Versions panel in the footer*/
.rst-current-version {
    background-color: var(--kfy-color) !important;
    color: var(--kfy-color-bg-alt) !important;
    border: none !important;
}
.qrunch-caret {
    color: var(--kfy-color-bg-alt) !important;
}
.rst-other-versions {
    background-color: var(--kfy-color-bg-alt) !important;
    border: none !important;
    color: var(--kfy-color) !important;
}


/* Custom corner contact link styling */
.custom-corner-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--kfy-color) !important;
    color: var(--kfy-bg) !important;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}
.custom-corner-link:hover {
    background: var(--kfy-color-light) !important;
    color: var(--kfy-bg) !important;
    text-decoration: none !important;
}
.custom-corner-link:visited {
    color: var(--kfy-bg) !important;
}

/* Load Epilogue locally */
@font-face {
    font-family: "Epilogue";
    src: url("fonts/Epilogue-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Epilogue";
    src: url("fonts/Epilogue-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

/* Apply to body */
body {
    font-family: "Epilogue", "Helvetica Neue", Arial, sans-serif;
}