/* Shared styling for the portal's "docs-style" pages: data policy, privacy
   policy, release notes, and documentation. Each of these templates owns
   its own page title (.docs-title + hr.docs) and links this stylesheet --
   the markdown/HTML rendered into .docs-content must start its own
   headings at h2, since the template supplies the single h1. */

.docs-title {
    color: var(--brand-teal);
    margin: 0;
}

hr.docs {
    border: 1px solid var(--brand-teal);
    opacity: 1;
    margin-top: 5px;
    margin-bottom: 1.5rem;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.95rem;
}

.docs-content th,
.docs-content td {
    border: 1px solid #dee2e6;
    padding: 10px 12px;
    vertical-align: top;
}

.docs-content th {
    background-color: var(--brand-teal);
    color: #ffffff;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.docs-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.docs-content h2,
.docs-content h3 {
    color: var(--brand-teal);
    margin-top: 2rem;
}

.docs-content .info-box {
    float: right;
    width: 260px;
    margin: 0 0 20px 24px;
    padding: 20px;
    background-color: var(--brand-teal);
    color: #ffffff;
    border-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.docs-content .info-box a {
    color: #ffffff;
}

.docs-content-footer {
    clear: both;
    background-color: var(--brand-teal);
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 5px;
}

.docs-content p,
.docs-content li {
    line-height: 1.7;
}

.docs-content li p {
    margin: 0;
}

/* documentation page (docs.html): sidebar + body grid layout, kept on a
   separate .docs-columns class so it doesn't turn the flat single-column
   .docs-content pages above into a grid -- the outer wrapper on docs.html
   carries both classes. */
.responsive-img {
    max-width: 100%;
    height: auto;
}

.docs-columns {
    --docs-sidebar-width: 280px;
    --docs-sidebar-max-width: 340px;
    --nilu-blue: #9FD2FE;
    --nilu-dark: #053F53;
    --nilu-mist: #E9FEFF;
    display: grid;
    grid-template-columns: minmax(var(--docs-sidebar-width), var(--docs-sidebar-max-width)) 1fr;
    gap: 40px;
    align-items: start;
}
.docs-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.docs-toc {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: var(--nilu-mist);
    border: 1px solid var(--nilu-blue);
    border-radius: 4px;
    padding: 1.2rem;
}
.docs-toc h3 {
    color: var(--nilu-dark);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--nilu-dark);
    padding-bottom: 0.5rem;
    margin: 0 0 0.8rem;
}
.docs-toc ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}
.docs-toc ul ul {
    padding-left: 0.9rem;
    border-left: 2px solid var(--nilu-blue);
    margin: 0.2rem 0 0.2rem 0.4rem;
}
.docs-toc li {
    margin: 0.2rem 0;
}
.docs-toc a {
    display: block;
    color: var(--nilu-dark);
    text-decoration: none;
    font-size: 0.98rem;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
}
.docs-toc a:hover {
    background: var(--nilu-blue);
}
.docs-toc summary {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    list-style: none;
}
.docs-toc summary::-webkit-details-marker {
    display: none;
}
.docs-toc summary::before {
    content: "\25B8";
    display: inline-block;
    width: 0.9em;
    color: var(--nilu-dark);
}
.docs-toc details[open] > summary::before {
    content: "\25BE";
}
.docs-toc-feedback {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--nilu-blue);
    font-size: 0.78rem;
}
.docs-toc-feedback a {
    font-size: 0.78rem;
}
.docs-toc-feedback h3 {
    font-size: 0.75rem;
}
.docs-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.3rem;
    padding-left: 0.6rem;
    border-left: 5px solid var(--nilu-blue);
}
.docs-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.docs-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}
.docs-body p,
.docs-body li {
    line-height: 1.7;
}
.docs-body {
    grid-column: 2;
    grid-row: 1;
}
.docs-body table {
    margin: 1.2rem 0 1.8rem;
}
@media (max-width: 900px) {
    .docs-columns {
        display: block;
    }
    .docs-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }
    .docs-toc {
        overflow-y: visible;
    }
}

.docs-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #E9FEFF;
    border: 1px solid #9FD2FE;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
}
.docs-search input {
    flex: 1 1 auto;
    min-width: 4.5rem;
    padding: 0.4rem 5rem 0.4rem 0.7rem;
    border: 1px solid #c8c9d1;
    border-radius: 10px;
    font-size: 0.95rem;
}
.docs-search button {
    border: 1px solid #c8c9d1;
    background: #ffffff;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    order: 2;
}
#docs-search-count {
    order: 1;
    text-align: right;
    /* Overlay the count inside the right end of the input, so the input spans the full width */
    position: relative;
    margin-left: -5rem;
    padding-right: 0.7rem;
    pointer-events: none;
    font-size: 0.9rem;
    color: #053F53;
    min-width: 4.5rem;
}
mark.docs-search-hit {
    background: #ffe58a;
    color: inherit;
    padding: 0;
}
mark.docs-search-hit-active {
    background: #ff9f43;
}
