.c-mobile-sidebar[hidden] {
    display: none;
}

.c-mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 140;
    pointer-events: none;
}

.c-mobile-sidebar__backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: var(--color-overlay-backdrop);
    cursor: pointer;
    opacity: 0;
    transition: opacity linear 0.2s;
}

.c-mobile-sidebar__panel {
    position: absolute;
    inset: 0;
    background: var(--color-surface-primary);
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-24px);
    transition: transform linear 0.2s;
}

.c-mobile-sidebar[data-mobile-sidebar-state="opening"],
.c-mobile-sidebar[data-mobile-sidebar-state="opened"],
.c-mobile-sidebar[data-mobile-sidebar-state="closing"] {
    pointer-events: auto;
}

.c-mobile-sidebar[data-mobile-sidebar-state="opening"] .c-mobile-sidebar__backdrop,
.c-mobile-sidebar[data-mobile-sidebar-state="opened"] .c-mobile-sidebar__backdrop {
    opacity: 1;
}

.c-mobile-sidebar[data-mobile-sidebar-state="opening"] .c-mobile-sidebar__panel,
.c-mobile-sidebar[data-mobile-sidebar-state="opened"] .c-mobile-sidebar__panel {
    transform: translateX(0);
}

.c-mobile-sidebar__content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.c-mobile-sidebar__header {
    min-height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.c-mobile-sidebar__logo {
    width: 30px;
    height: 20px;
    display: block;
}

.c-mobile-sidebar__close {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.c-mobile-sidebar__close:focus-visible,
.c-mobile-sidebar__group-trigger:focus-visible,
.c-mobile-sidebar__child-link:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.c-mobile-sidebar__close-icon {
    width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.c-mobile-sidebar__close-icon svg {
    width: 10px;
    height: 10px;
    display: block;
}

.c-mobile-sidebar__close-icon path {
    fill: currentColor;
}

.c-mobile-sidebar__divider {
    height: 1px;
    background: var(--color-border-primary);
}

.c-mobile-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.c-mobile-sidebar__group {
    display: flex;
    flex-direction: column;
}

.c-mobile-sidebar__group-trigger {
    width: 100%;
    min-height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: var(--color-surface-primary);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: background linear 0.15s, color linear 0.15s;
}

.c-mobile-sidebar__group-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.c-mobile-sidebar__group-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
}

.c-mobile-sidebar__group-icon svg,
.c-mobile-sidebar__group-arrow svg,
.c-mobile-sidebar__child-icon svg {
    display: block;
}

.c-mobile-sidebar__group-icon svg {
    width: 16px;
    height: 16px;
}

.c-mobile-sidebar__group-icon svg path,
.c-mobile-sidebar__child-icon svg path {
    fill: currentColor;
}

.c-mobile-sidebar__group-label,
.c-mobile-sidebar__child-label {
    min-width: 0;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-mobile-sidebar__group-label {
    font-weight: 500;
}

.c-mobile-sidebar__group-arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transform: rotate(90deg);
    transition: transform linear 0.15s;
}

.c-mobile-sidebar__group-arrow path {
    fill: currentColor;
}

.c-mobile-sidebar__group.is-expanded .c-mobile-sidebar__group-arrow {
    transform: rotate(-90deg);
}

.c-mobile-sidebar__children {
    height: 0;
    overflow: hidden;
    transition: height linear 0.2s;
}

.c-mobile-sidebar__children[hidden] {
    display: none;
}

.c-mobile-sidebar__children-inner {
    padding: 6px 0 10px;
    display: flex;
    flex-direction: column;
}

.c-mobile-sidebar__child-link {
    min-height: 34px;
    margin-left: 16px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: 6px;
}

.c-mobile-sidebar__child-link.is-active {
    background: var(--color-surface-secondary);
    color: var(--color-text-primary);
}

.c-mobile-sidebar__child-link.is-active .c-mobile-sidebar__child-label {
    font-weight: 500;
}

.c-mobile-sidebar__child-icon {
    flex: 0 0 auto;
    width: var(--mobile-sidebar-child-icon-w, 16px);
    height: var(--mobile-sidebar-child-icon-h, 16px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.c-mobile-sidebar__child-icon svg {
    width: 100%;
    height: 100%;
}

@media (min-width: 769px) {
    .c-mobile-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .c-mobile-sidebar__panel {
        inset: 0;
    }
}
