.app-navbar {
    --rf-navbar-item-height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.app-navbar__brand,
.app-navbar__actions {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    align-self: center;
    min-height: var(--rf-navbar-item-height);
}

.app-navbar__brand {
    flex: 0 0 auto;
}

.app-navbar__actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    column-gap: 0.6rem;
    row-gap: 0.45rem;
}

.app-navbar__brand > li,
.app-navbar__actions > li {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    min-height: var(--rf-navbar-item-height);
}

.app-navbar__brand strong,
.app-navbar__brand a {
    display: inline-flex;
    align-items: center;
    min-height: var(--rf-navbar-item-height);
}

.app-navbar__brand a {
    margin: 0;
    line-height: 1.1;
}

.app-navbar__actions > li > details,
.app-navbar__actions > li > a,
.app-navbar__actions > li > button {
    margin: 0;
}

.app-navbar__actions details.dropdown > summary {
    margin: 0;
    min-height: var(--rf-navbar-item-height);
    line-height: 1.2;
}

.theme-switch-nav fieldset {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    height: 100%;
}

.theme-switch-nav {
    display: flex;
    align-items: center;
    align-self: center;
    min-height: var(--rf-navbar-item-height);
    margin: 0;
    padding: 0;
}

.theme-switch-nav label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--pico-muted-color);
    white-space: nowrap;
    line-height: 1;
    height: 100%;
}

.theme-switch-nav input[role="switch"] {
    margin: 0;
    display: block;
    flex-shrink: 0;
}

.theme-switch-nav__label {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.theme-switch-nav__icons {
    position: relative;
    width: var(--rf-navbar-item-height);
    height: var(--rf-navbar-item-height);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pico-muted-border-color);
    background: var(--pico-card-background-color);
}

.theme-switch-nav__icon {
    position: absolute;
    width: 1rem;
    height: 1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.theme-switch-nav__icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-switch-nav__icon--sun {
    opacity: 0;
    transform: scale(0.75) rotate(-25deg);
}

.theme-switch-nav input[role="switch"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-switch-nav input[role="switch"]:focus-visible + .theme-switch-nav__icons {
    outline: 2px solid var(--pico-primary);
    outline-offset: 2px;
}

.theme-switch-nav input[role="switch"]:checked + .theme-switch-nav__icons .theme-switch-nav__icon--moon {
    opacity: 0;
    transform: scale(0.75) rotate(25deg);
}

.theme-switch-nav input[role="switch"]:checked + .theme-switch-nav__icons .theme-switch-nav__icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.auth-nav-icon-link {
    width: var(--rf-navbar-item-height);
    height: var(--rf-navbar-item-height);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pico-muted-border-color);
    background: var(--pico-card-background-color);
    color: var(--pico-color);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-nav-icon-link:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--pico-primary) 45%, var(--pico-muted-border-color));
    background: color-mix(in srgb, var(--pico-card-background-color) 86%, var(--pico-primary) 14%);
}

.auth-nav-icon-link:focus-visible {
    outline: 2px solid var(--pico-primary);
    outline-offset: 2px;
}

.auth-nav-icon {
    width: 1rem;
    height: 1rem;
    display: block;
}

@media (max-width: 768px) {
    .app-navbar__actions {
        width: 100%;
        justify-content: flex-start;
    }
}
