@import "../variables";
@import "../mixins";

.hdeng-cookie-consent-critical-generate() {
    .cookie-consent {
        display: none;
    }
}

.hdeng-cookie-consent-generate() {
    .cookie-consent {
        border-top: 1px solid @hdeng-body-font-default-color;

        :last-child {
            margin-bottom: 0;
        }

        > * {
            border-radius: 0;
        }

        position: fixed;
        z-index: 999999;
        width: 100%;

        bottom: 0;
        left: 0;
        transform: translate3d(0, 100%, 0);
        .hdeng-ease-out(@property: transform; @duration: 350ms);

        .no-csstransforms3d & {
            // Reset transform in case Modernizr reports that 3d transforms are
            // not supported (eg. if the implementation is buggy) but the
            // browser _does_ support it (at least partially).
            transform: translate3d(0, 0, 0);
            bottom: -100%;
            .hdeng-ease-out(@property: bottom; @duration: 350ms);
        }

        &--active {
            display: block !important; // Overwrite possible style="display:none"
        }

        &--open {
            transform: translate3d(0, 0, 0);

            .no-csstransforms3d & {
                // Reset transform in case Modernizr reports that 3d transforms are
                // not supported (eg. if the implementation is buggy) but the
                // browser _does_ support it (at least partially).
                transform: translate3d(0, 0, 0);
                bottom: 0;
            }
        }
    }

    .cookie-consent__content {
       padding-right: 100px;

        @media (max-width: @hdeng-breakpoint-default) {
            padding-right: 0;
        }

        > * {
            margin: 0;
        }
    }

    .cookie-consent__dismiss {
        position: absolute;
        right: @hdeng-spacing;
        top: 50%;
        transform: translateY(-50%);

        @media (max-width: @hdeng-breakpoint-default) {
            position: static;
            display: block;
            margin: @hdeng-content-padding-mobile 0 0 0;
            transform: translateY(0);
        }
    }
}
