/*
 * consent.css - cookie banner (templates/inc/consentBanner.tpl.php) and the
 * "Cookie-Einstellungen" link in the footer.
 *
 * Plain CSS on purpose, no LESS source: the file is self-contained and uses
 * the custom properties of common/css_variables.less. Registered as its own
 * stylesheet in FrontendConfig ('css'), loaded on every page for all devices.
 */

.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* above the chat widget (9999) and the contact panel */
    z-index: 10001;
    max-height: 100vh;
    overflow-y: auto;
    padding: 1.25em 4% calc(1.25em + env(safe-area-inset-bottom, 0px));
    background-color: var(--brown-seco-color, #faf7f5);
    border-top: 2px solid var(--brown-prim-color, #7f5830);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
    color: var(--secondary-color, #000);
    font-size: 16px;
    line-height: 1.5;
}

/* the hidden attribute must win over the display rules below */
.consent-banner[hidden],
.consent-banner [hidden] {
    display: none !important;
}

.consent-banner:focus {
    outline: none;
}

.consent-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-width: var(--max-window-width, 1500px);
    margin: 0 auto;
}

.consent-banner h2 {
    margin: 0 0 .35em;
    font-size: 1.125em;
    line-height: 1.3;
    color: var(--brown-prim-color, #7f5830);
}

.consent-banner p {
    margin: 0;
    font-size: .9375em;
}

.consent-banner a {
    color: var(--brown-prim-color, #7f5830);
    text-decoration: underline;
}

.consent-banner__settings {
    display: grid;
    gap: .6em;
    margin-top: 1em;
}

.consent-banner__option {
    display: flex;
    align-items: flex-start;
    gap: .6em;
    font-size: .9375em;
    cursor: pointer;
}

.consent-banner__option input {
    flex: none;
    width: 1.15em;
    height: 1.15em;
    margin: .2em 0 0;
    accent-color: var(--brown-prim-color, #7f5830);
}

.consent-banner__option strong {
    display: block;
}

.consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6em;
}

/* "Ablehnen" and "Akzeptieren" share one look: neither choice is favoured */
.consent-banner__btn {
    flex: 1 1 8em;
    min-height: 44px;
    padding: .5em 1.25em;
    border: 1px solid var(--brown-prim-color, #7f5830);
    border-radius: 2px;
    background-color: var(--brown-prim-color, #7f5830);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.consent-banner__btn:hover {
    background-color: #fff;
    color: var(--brown-prim-color, #7f5830);
}

.consent-banner__link {
    flex: 1 1 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brown-prim-color, #7f5830);
    font: inherit;
    font-size: .9375em;
    text-decoration: underline;
    cursor: pointer;
}

.consent-banner__btn:focus-visible,
.consent-banner__link:focus-visible,
.consent-banner__option input:focus-visible,
.consent-settings-link:focus-visible {
    outline: 2px solid var(--secondary-color, #000);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .consent-banner__inner {
        flex-direction: row;
        align-items: flex-end;
        gap: 2.5em;
    }

    .consent-banner__text {
        flex: 1;
    }

    .consent-banner__actions {
        flex: none;
        width: 22em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .consent-banner__btn {
        transition: none;
    }
}

/* Footer: reopens the settings (data-consent-open) */
.consent-settings-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}

.consent-settings-link:hover {
    text-decoration: underline;
}
