.ab-footer {
    display: grid;
    justify-items: center;
    gap: .7rem;
    padding: 1rem .875rem;
    border-top: 1px solid var(--ab-border);
    background: var(--ab-background);
    text-align: center;
    line-height: 1.5;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: .35rem .6rem;
}
.footer-links a { color: inherit; }
.footer-operator {
    display: grid;
    gap: .1rem;
    min-width: 0;
    margin: 0;
    font-style: normal;
    overflow-wrap: anywhere;
}
.footer-operator a { color: inherit; white-space: nowrap; }

/* As the last element, the sticky card leaves all footer links reachable. */
.ab-workspace > .cookie-choice {
    position: sticky;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    z-index: 1001;
    box-sizing: border-box;
    width: min(26rem, calc(100% - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
    overflow: auto;
    margin: .75rem .75rem .75rem auto;
    padding: 1rem;
    border: 1px solid #cbd1da;
    border-radius: .875rem;
    background: #fff;
    box-shadow: 0 4px 24px #0004;
    color: #17212e;
    font-size: .875rem;
    line-height: 1.4;
}
.cookie-choice h2 { margin: 0 0 .3rem; color: inherit; font-size: 1.1rem; }
.cookie-choice p { margin: 0 0 .7rem; color: inherit; }
.cookie-choice .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin: 0 0 .45rem;
}
.cookie-choice .actions .button.secondary {
    min-width: 0;
    min-height: 44px;
    height: 100%;
    padding: .45rem;
    border: 1px solid #515e6e;
    background: #f3f5f8;
    color: #17212e;
    font: inherit;
    font-weight: 650;
    line-height: 1.2;
    white-space: normal;
}
.cookie-choice .actions .button:hover { background: #e4e9ef; }
.cookie-choice > a { color: #223a58; text-decoration: underline; }

.ab-top:has(.user-menu[open]) { position: relative; z-index: 1010; }
.ab-top .user-menu { position: relative; max-width: 100%; }
.ab-top .user-menu > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .4rem .7rem;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.ab-top .user-menu[open] > .user-menu-content {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1;
    border-radius: .65rem;
    display: grid;
    gap: .15rem;
    width: min(17rem, calc(100vw - 2rem));
    min-width: 0;
    max-height: min(60dvh, 26rem);
    overflow: auto;
    padding: .35rem;
    border: 1px solid #495568;
    background: #171e29;
    box-shadow: 0 6px 22px #0006;
}
.ab-top .user-menu-content form { margin: 0; }
.ab-top .user-menu-content a, .ab-top .user-menu-content button.link {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: .6rem .8rem;
    border: 0;
    border-radius: .4rem;
    background: transparent;
    color: #f4f6fa;
    font: inherit;
    text-decoration: none;
    white-space: normal;
}
.ab-top .user-menu-content :is(a, button):is(:hover, :focus-visible) {
    background: #303d50;
    color: #fff;
}
@media (max-width: 600px) {
    .ab-top:has(.user-menu[open]) .user-menu { position: static; }
    .ab-top .user-menu[open] > .user-menu-content { right: .75rem; top: 100%; }
}
