/* Темная тема */
@media (prefers-color-scheme: dark) {
    :root {
        --theme-color: white;
        --base-background-color: rgb(23, 23, 23);
        --sidebar-background: rgb(26, 26, 26);
        --sidebar-border-color: rgb(26, 26, 26);
        --mono-saturation : 0%;
        --mono-lightness : 0%;
        --docsifytabs-tab-background: rgb(20, 20, 20);
        --table-row-odd-background: rgb(20, 20, 20);
        --table-cell-border-color: rgb(255,255,255,0);
        --docsifytabs-tab-color: rgb(180, 180, 180);
    }

    hr {
        opacity: 0.25;
    }
}

/* Светлая тема */
@media (prefers-color-scheme: light) {
    :root {
        --theme-color: #000000;
        --base-background-color: #f9f9f9;
        --sidebar-background: #f5f5f5;
        --sidebar-border-color: #f5f5f5;
        --mono-saturation: 0%;
        --mono-lightness: 0%;
        --docsifytabs-tab-background: #f8f9fa;
        --table-row-odd-background: #f8f9fa;
        --table-cell-border-color: rgba(0,0,0,0.1);
        --docsifytabs-tab-color: #6c757d;
    }

    aside.sidebar {
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    }
}

:root {
    --sidebar-width: 20rem;
    --content-max-width: 70rem;
    --sidebar-toggle-icon-color: var(--theme-color);
    --sidebar-nav-link-border-width: 0 3px 0 0;
}

/* Hide scrollbars */
aside.sidebar::-webkit-scrollbar {
    display: none;
}

aside.sidebar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Give more room for sidebar toggle button */
section.content article {
    padding-left: 85px;
    padding-top: 45px;
}

/* Prevent table cells from being too narrow */
table td {
    min-width: 120px;
}

/* Стили для таблиц в темной теме */
@media (prefers-color-scheme: dark) {
    table th {
        background-color: rgb(30, 30, 30);
    }
}

/* Стили для таблиц в светлой теме */
@media (prefers-color-scheme: light) {
    table th {
        background-color: #e9ecef;
        color: #2c3e50;
    }
}

/* Классы для светлой и темной темы */
@media (prefers-color-scheme: light) {
    img.light { display: block; }
    img.dark { display: none; }
}

@media (prefers-color-scheme: dark) {
    img.light { display: none; }
    img.dark { display: block; }
}

/* Remove text decoration on hover for headings */
h1:hover *, h2:hover *, h3:hover *, h4:hover *, h5:hover *, h6:hover * {
    text-decoration: none !important;
}

/* Larger margin for horizontal rules */
hr {
    margin: 3rem -5rem 2rem -5rem !important;
}

/* Full width images */
.full-width {
    width: 80%;
    max-width: 80%;
    height: auto;
}

@media (max-width: 768px) {
    .full-width {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    code {
        font-size: 0.8em !important;
    }
}

