.cookiebanner-container button {
    font-size: initial;
}

@layer components {
    .zhaw-btn {
        --button-radius: 9999px;

        --button-padding-y: 16px;
        --button-padding-x: 16px;

        --button-line-height: 28px;
        --button-font-size: 24px;

        &.zhaw-btn-sm {
            --button-padding-y: 8px;
            --button-padding-x: 16px;

            --button-line-height: 1.25;
            --button-font-size: 16px;

            --hover-shadow-y: 6px;
        }

        @media (min-width: 768px) {
            --button-line-height: 28px;
            --button-font-size: 24px;

            &.zhaw-btn-md {
                --button-line-height: 24px;
                --button-font-size: var(--fs-base);
            }
        }

        background-color: #ffffff !important;
        color: #333333;
        border-radius: 999999px !important;
        border: 1px solid #333333 !important;
        padding: var(--button-padding-y) var(--button-padding-x);
        line-height: var(--button-line-height);
        font-size: var(--button-font-size);
        display: block;
        transition: background-color .2s ease, outline .2s ease;
        position: relative;
        cursor: pointer;

        &[disabled] {
            opacity: 0.8;
            pointer-events: none;
        }

        &::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: -2px;
            bottom: -2px;
            border-radius: inherit;
            background-color: transparent;
            pointer-events: none;
            transition: background-color .2s ease, outline .2s ease;
            z-index: -1;

            @media (forced-colors: active) {
                content: none;
            }
        }

        &::after {
            content: "";
            position: absolute;
            top: 9px;
            left: 7px;
            right: calc(-1 * 7px);
            bottom: calc(-1 * 9px);
            border-radius: inherit;
            background-color: transparent;
            pointer-events: none;
            transition: background-color .2s ease, outline .2s ease;
            z-index: -2;

            @media (forced-colors: active) {
                content: none;
            }
        }

        &:hover::before {
            background-color: #333333;
        }
        &:hover::after {
            background-color: #333333;
        }

        &:focus,
        &:focus-visible {
            box-shadow: none;
            outline: 3px solid #333333;
            outline-offset: 0px;
        }

        span {
            display: block;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    }

    .zhaw-btn:where(:has(svg)) {
        display: flex;
        justify-content: center;
        gap: 0.5em;
        align-items: center;

        span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    }

    .zhaw-btn:where(:not(:has(.icon))) {
        text-align: center;
        min-inline-size: 10ch;
    }
}
