/* cookie-anaplast-1 — cookie consent bar. Tokens: instances/anaplast/static/fonts/style.css,
   rules: instances/anaplast/DESIGN_MANUAL.md (§3, §4, §4a). It is an overlay, so
   --apl-shadow-lg is allowed (§3). z-index sits above the navigation (100/101) and below
   the gallery lightbox / product popup (1000). */

.cookie-anaplast-1 {
    position: fixed;
    inset: auto 0 0;
    z-index: 200;
    box-sizing: border-box;
    width: 100%;
    padding: var(--apl-space-3) 0;
    color: var(--apl-on-invert);
    background-color: var(--apl-surface-invert);
    box-shadow: var(--apl-shadow-lg);
    border-top: 3px solid var(--apl-amber);
    container-type: inline-size;
}
.cookie-anaplast-1[hidden] {
    display: none;
}
.cookie-anaplast-1 .content-wrapper {
    box-sizing: border-box;
    max-width: var(--apl-container);
    margin: 0 auto;
    padding-inline: var(--apl-gutter);
    display: flex;
    flex-direction: column;
    gap: var(--apl-space-2);
}

/* In the editor the bar stays in the page flow (sticky at the viewport bottom), so it is
   always visible but never permanently covers the footer being edited. */
.cookie-anaplast-1--editor {
    position: sticky;
}

/* --- Bottom-left card --- */
.cookie-anaplast-1--bottom-left {
    inset: auto auto var(--apl-space-3) var(--apl-space-3);
    width: calc(100% - 2 * var(--apl-space-3));
    max-width: 28rem;
    padding: var(--apl-space-3) 0;
    border-top: none;
    border-left: 3px solid var(--apl-amber);
    border-radius: var(--apl-radius-md);
}

/* --- Content --- */
.cookie-anaplast-1__body {
    display: flex;
    flex-direction: column;
    gap: var(--apl-space-1);
}
.cookie-anaplast-1__text {
    margin: 0;
    font-size: var(--apl-text-sm);
    line-height: var(--apl-leading-normal);
    color: var(--apl-on-invert);
}
.cookie-anaplast-1__text a {
    color: #fff;
}
.cookie-anaplast-1__link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: var(--apl-control-min);
    font-size: var(--apl-text-sm);
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--apl-amber);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    transition: color var(--apl-transition);
}
.cookie-anaplast-1__link:hover {
    color: var(--apl-amber);
}
.cookie-anaplast-1__link:focus-visible {
    outline: var(--apl-focus);
    outline-color: var(--apl-amber);
    outline-offset: var(--apl-focus-offset);
}

/* --- Buttons (primary + Light recipe) --- */
.cookie-anaplast-1__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--apl-space-2);
}
.cookie-anaplast-1__btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--apl-control-min);
    padding: 0.85rem 2rem;
    font-size: var(--apl-text-sm);
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: var(--apl-radius-sm);
    cursor: pointer;
    transition:
        background-color var(--apl-transition),
        border-color var(--apl-transition),
        color var(--apl-transition);
}
.cookie-anaplast-1__btn:focus-visible {
    outline: var(--apl-focus);
    outline-color: var(--apl-amber);
    outline-offset: var(--apl-focus-offset);
}
.cookie-anaplast-1__btn--accept {
    color: var(--apl-on-accent);
    background-color: var(--apl-accent);
}
.cookie-anaplast-1__btn--accept:hover {
    background-color: var(--apl-accent-hover);
}
.cookie-anaplast-1__btn--decline {
    color: #fff;
    background-color: transparent;
    border-color: #fff;
}
.cookie-anaplast-1__btn--decline:hover {
    color: var(--apl-amber);
    border-color: var(--apl-amber);
}
/* Editor: buttons are inert but keep their real look. */
.cookie-anaplast-1--editor .cookie-anaplast-1__btn {
    cursor: default;
}

/* --- Slide-in (motion only when the visitor allows it) --- */
@media (prefers-reduced-motion: no-preference) {
    .cookie-anaplast-1:not(.cookie-anaplast-1--editor) {
        animation: cookie-anaplast-1-in 0.25s ease-out;
    }
}
@keyframes cookie-anaplast-1-in {
    from {
        opacity: 0;
        translate: 0 1rem;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

/* --- Wide: text and buttons side by side (full-width bar only) --- */
@container (width >= 48rem) {
    .cookie-anaplast-1--bottom .content-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--apl-space-4);
    }
    .cookie-anaplast-1--bottom .cookie-anaplast-1__body {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        column-gap: var(--apl-space-2);
        max-width: var(--apl-measure);
    }
    .cookie-anaplast-1--bottom .cookie-anaplast-1__actions {
        flex: none;
        flex-wrap: nowrap;
    }
    .cookie-anaplast-1--bottom .cookie-anaplast-1__btn {
        flex: none;
    }
}
