:root {
    --header-height: 40px;
    --footer-height: 60px;
    --sidebar-width: 400px;

    --content-padding: 20px;

    --background-color: #2D2C33;
    --background-color-alt: #25252a;

    --text-color: #ffffffd9;
    --border-color: #4C4B51;
}

body {
    box-sizing: border-box;
    margin: 0;
    font-family: Arial, sans-serif;

    color: var(--text-color);
}

.wiki {
    display: grid;

    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar actuality"
        "sidebar content"
        "sidebar footer";
    min-height: 100vh;

    background-color: var(--background-color);
}

.header {
    grid-area: header;

    display: flex;
    justify-content: center; /* Центрирует по горизонтали */
    align-items: center;
    position: relative;

    top: 0;
    height: var(--header-height);

    border-bottom: 1px solid var(--border-color);

    box-sizing: border-box;
}

.wiki .content {
    grid-area: content;

    overflow-x: auto;
    overflow-y: scroll;


    padding: var(--content-padding);

    height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
    width: calc(100vw - var(--sidebar-width) - 40px);

    z-index: 1;
}

.footer {
    grid-area: footer;
    display: flex;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--footer-height);

    border-top: 1px solid var(--border-color);

    box-sizing: border-box;
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner {
    background: var(--background-color);        /* цвет дорожки */
}
*::-webkit-scrollbar-thumb {
    background-color: var(--border-color);    /* цвет плашки */
}

/* Индикатор загрузки */
.htmx-request .htmx-indicator{
    opacity:1
}
.htmx-request.htmx-indicator{
    opacity:1
}
.htmx-indicator {
    opacity:0;
    transition: opacity 0.5s ease; /* Добавьте это свойство для плавного перехода */
    margin-top: var(--header-height);
    position: absolute;

    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    text-align: center;

    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.page {
    position: relative;
}

.page-info-div {
    margin-top: 10px;
    display: flex;
}

.page-info {
    flex: 1;
}

.page-info-date {
    text-align: right;
}

.sidebar-list-wrapper {
    display: flex;
    flex-direction: column; /* Располагаем элементы в столбец */
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

a {
    text-decoration: none;
    color: inherit
}

.copyable {
    cursor: pointer;
}
.copyable::before {
    content: '📄';
}

.popup-content {
    display: none;
    position: absolute;
    padding: 10px;
    z-index: 1000;
    bottom: 100%;

    border: 1px solid var(--border-color);
    border-radius: var(--search-rad);
    box-shadow: 0 0 10px 0 #bfbfbf33;
    margin-bottom: 10px;
}

.popup-button {
    position: relative;
    left: 0;
    top: 0;
    margin: 0;

    width: var(--footer-height);
    height: var(--footer-height);

    font-size: 2em;
    text-align: center;
    background-color: var(--background-color);
    border: 0;

    cursor: pointer;
}

.footer-info {
    padding: 10px;
}

.popup-content {
    margin: 10px;

    background-color: var(--background-color);
}