:host .sidebar__background {
    z-index: 10;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    transition: width 0ms 0ms, height 0ms 0ms, opacity 144ms 366ms;
}
:host([state="hidden"]) .sidebar__background {
    width: 0;
    height: 0;
}
:host .sidebar {
    z-index: 11;
    overflow: auto;
    opacity: 0;
    box-sizing: border-box;
    padding: 0 24px;
    position: fixed;
    right: 0;
    bottom: -100%;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    display: grid;
    grid-auto-rows: min-content;
    background-color: var(--white);
    border-radius: 16px 16px 0 0;
    transition: opacity 100ms 444ms linear, bottom 380ms 0ms;
}
:host([state="hidden"]) .sidebar {
    display: none;
}
:host([loading]) .sidebar:after {
    content: "Идет загрузка...";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--white);
}
:host(:not([state="closing"])) .sidebar__background {
    opacity: 1;
    transition: width 0ms 0ms, height 0ms 0ms, opacity 244ms 0ms;
}
:host(:not([state="closing"], [state="open"])) .sidebar {
    opacity: 1;
    bottom: 0;
    transition: opacity 300ms linear, bottom 366ms;
}
:host .sidebar__headline {
    padding: 24px 0 16px 0;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    background-color: var(--white);
}
:host .ui-btn.sidebar__control-item {
    padding: 0;
    height: min-content;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--green-600);
}
:host([hide-headline]) .sidebar__headline {
    display: none;
}
:host .sidebar__headline .back {
    display: none;
}
:host .sidebar__body {
    padding: var(--fg-sidebar-body-padding, 0 0 16px 0);
}
@media (max-width: 767px) {
    :host .sidebar__control-item span {
        display: none;
    }
}
@media (min-width: 768px) {
    :host .sidebar {
        max-width: var(--fg-sidebar-max-width, 400px);
        max-height: 100vh;
        height: 100vh;
        border-radius: 16px 0 0 16px;
    }
    :host .sidebar {
        padding: var(--fg-sidebar-padding, 0 40px);
        right: -100%;
        bottom: 0;
        transition: opacity 100ms 444ms linear, right 444ms 0ms;
    }
    :host .sidebar__headline {
        padding: 40px 0 40px 0;
    }
    :host(:not([state="closing"], [state="open"])) .sidebar {
        right: 0;
        bottom: 0;
        transition: opacity 300ms linear, right 444ms;
    }
}
