/* reading-mode.css
   Переключатель Wide/Boxed режима чтения (см. reading-mode.js) - только
   десктоп, на планшете и мобильном (до 1024px) настройки нет вовсе. */

.reading-mode-toggle {
    position: fixed;
    top: calc((var(--header-row-height, 72px) - 40px) / 2);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-main, #40484F);
    cursor: pointer;
    transition: background-color .15s ease;
}

.reading-mode-toggle:hover,
.reading-mode-toggle:focus-visible {
    background: rgba(var(--color-text-main-rgb, 64, 72, 79), .08);
}

.reading-mode-toggle.is-boxed {
    background: rgba(var(--color-text-main-rgb, 64, 72, 79), .1);
}

.reading-mode-toggle svg {
    width: 20px;
    height: 20px;
}

/* Ограничивает только .wy-nav-content (текст документа) - полоса крошек
   остаётся во всю ширину. */
html.reading-boxed .wy-nav-content {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Явно нейтрализует boxed на этих ширинах, а не полагается на то, что
   эффекта и так не будет. */
@media screen and (max-width: 1024px) {
    .reading-mode-toggle {
        display: none;
    }

    html.reading-boxed .wy-nav-content {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}
