/* Keep cookie actions and Back to Top fully inside narrow mobile viewports. */
@media (max-width: 767px) {
    .cookie-consent,
    .js-cookie-consent {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
    }

    .cookie-consent .cookie-consent-body,
    .js-cookie-consent .cookie-consent-body {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 0 !important;
    }

    .cookie-consent .cookie-consent__inner,
    .js-cookie-consent .cookie-consent__inner {
        width: 100% !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .cookie-consent .cookie-consent__message,
    .js-cookie-consent .cookie-consent__message {
        width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
    }

    .cookie-consent .cookie-consent__actions,
    .js-cookie-consent .cookie-consent__actions {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: 1fr !important;
        margin: 0 !important;
    }

    .cookie-consent .cookie-consent__actions button,
    .js-cookie-consent .cookie-consent__actions button,
    .cookie-consent .cookie-consent__agree,
    .js-cookie-consent .cookie-consent__agree {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 46px !important;
        padding: 12px 16px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
    }

    #back2top,
    #back2top.active {
        display: flex !important;
        right: max(14px, env(safe-area-inset-right, 0px)) !important;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
        left: auto !important;
        width: 44px !important;
        height: 44px !important;
        border-color: rgba(0, 125, 116, .28) !important;
        background: #ffffff !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .18) !important;
    }

    body:has(.cookie-consent.cookie-consent--visible) #back2top,
    body:has(.js-cookie-consent.cookie-consent--visible) #back2top {
        bottom: calc(180px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #back2top,
    #back2top.active {
        display: flex !important;
        right: max(20px, env(safe-area-inset-right, 0px)) !important;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
        left: auto !important;
        width: 44px !important;
        height: 44px !important;
        border-color: rgba(0, 125, 116, .28) !important;
        background: #ffffff !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .18) !important;
    }

    body:has(.cookie-consent.cookie-consent--visible) #back2top,
    body:has(.js-cookie-consent.cookie-consent--visible) #back2top {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
