.drawer {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
}

.drawer-header {
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    height: 40px;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding-left: 16px;
    transition: width 0.4s ease;
    user-select: none;
}

.drawer-title {
    display: flex;
    height: 20px;
    box-sizing: border-box;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding-left: 16px;
    user-select: none;
    transition: width 0.4s ease;
}

.drawer-body {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    justify-content: safe center;
    align-items: safe flex-start;
    padding-bottom: 6px;
}

.drawer-chapter {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
}

.drawer-chapter-for-badges {
    padding-right: 10px;
    padding-left: 10px;
    gap: 2px;
}

.drawer-chapter-for-buttons {
    padding-right: 6px;
    padding-left: 6px;
}

.drawer-chapter-row {
    flex-direction: row !important;
    flex-wrap: wrap;
}


/* Составные элементы */

.drawer-header-text {
    color: rgb(160, 160, 160);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease, visibility 0.2s ease, max-width 0.2s ease , color 0.1s ease;
}

.drawer-header-icon-box {
    height: 40px;
    width: 40px;
    margin-left: auto;
    position: relative;
}

.drawer-header-icon {
    height: 20px;
    width: 20px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.drawer-title-text {
    color: rgb(100, 100, 100);
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease, max-width 0.2s ease, color 0.1s ease;
}

.drawer-title-divider {
    width: 100%;
    height: 1px;
    background-color: rgb(50, 50, 50);
    margin: 14px;
}


/* Визуальные стили */

.drawer-header-collapsed {
    width: 60px;
    padding-left: 0px;
}

.drawer-title-collapsed {
    width: 60px;
    padding-left: 0px;
}

.drawer-header-collapsed .drawer-header-text {
    opacity: 0;
    visibility: hidden;
    max-width: 0;
}

.drawer-header-collapsed .drawer-header-icon-box {
    margin-left: 0;
}

.drawer-title-collapsed .drawer-title-text {
    opacity: 0;
    visibility: hidden;
    max-width: 0;
    color: transparent; 
}

.drawer-chapters-name {
    display: flex;
    height: 24px;
    box-sizing: border-box;
    flex-direction: row;
    width: 100%;
    color: rgb(112, 112, 112);
    font-weight: bold;
    font-size: 14px;
    align-items: center;
    padding-left: 8px;
    user-select: none;
}

.drawer-chapters-link {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    color: rgb(196, 196, 196);
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    text-overflow: ellipsis;
    font-family: Arial, sans-serif;
    margin: 4px;
    line-height: 1.2;
    transition: background-color 0.3s ease;
    height: 40px;
    min-height: 40px;
    width: 100%;
    max-width: 220px;
    min-width: 140px;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.drawer-chapters-icon {
    width: 20px;
    height: 20px;
    fill: rgb(196, 196, 196);
    background-size: contain;
    background-repeat: no-repeat;
}

.drawer-chapters-link-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.drawer-chapters-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.drawer-chapter-stretch {
    height: 100%;
    width: 100%;
}

.home-icon {
    mask-image: url('/static/assets/chapters/home.svg?v={{ asset_version }}');
}


/* устаревшие стили */

/*

.drawer-left {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    
}

.drawer-right {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

*/