// Cookie Consent

.vp-cookie-consent {
    position: fixed;
    z-index: 900001;
    opacity: 1;
    transition: opacity 0.25s linear, transform 0.25s linear;
}

.vp-cookie-consent-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    width: 400px;
    color: var(--template-cookie-consent-color, var(--body-color));
    background-color: var(--template-cookie-consent-bg, #f3f3f3);
    border: 1px solid var(--template-cookie-consent-border-color, #ddd);
    box-shadow: 0 6px 13px 0 rgba(0, 0, 0, 0.23);
    
    a {
        color: var(--template-cookie-consent-link-color, var(--template-link-color));

        &:active,
        &:visited {
            color: var(--template-cookie-consent-link-color, var(--template-link-color));
        }

        &:hover {
            color: var(--template-cookie-consent-link-hover-color, var(--template-link-hover-color));
        }
    }
}

.vp-cookie-consent {
    &.top {
        left: 0;
        right: 0;
        top: 0;
    }

    &.top-left {
        left: 2.5rem;
        top: 2.5rem;
    }

    &.top-right {
        right: 2.5rem;
        top: 2.5rem;
    }

    &.bottom {
        left: 0;
        right: 0;
        bottom: 0;
    }

    &.bottom-left {
        left: 2.5rem;
        bottom: 2.5rem;
    }

    &.bottom-right {
        right: 2.5rem;
        bottom: 2.5rem;
    }

    &.center {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    &.top,
    &.top-left,
    &.top-right,
    &.bottom,
    &.bottom-left,
    &.bottom-right {
        transform: translate(0, 0);
    }

    &.top,
    &.bottom {
        .vp-cookie-consent-inner {
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            text-align: start;
            box-shadow: none;
            width: auto;
        }
    }
}

.vp-cookie-consent {
    &.vp-hide {
        display: none !important;
    }

    &.vp-fade {
        opacity: 0;

        &.top,
        &.top-left,
        &.top-right{
            transform: translate(0, -50%);
        }

        &.bottom,
        &.bottom-left,
        &.bottom-right {
            transform: translate(0, 50%);
        }
    }
}

.vp-cookie-consent-button {
    --btn-padding-x: 2rem;
    text-wrap: nowrap;
}

@include media-breakpoint-down(md) {
    .vp-cookie-consent {
        &.top-left,
        &.top-right,
        &.bottom-left,
        &.bottom-right,
        &.center {
            left: 1.5rem;
            right: 1.5rem;
        }

        &.center {
            transform: translate(0, -50%);
        }

        &.top-left,
        &.top-right {
            top: 1.5rem;
        }

        &.bottom-left,
        &.bottom-right {
            bottom: 1.5rem;
        }

        &.top,
        &.bottom {
            .vp-cookie-consent-button {
                width: 100%;
            }
        }

        .vp-cookie-consent-inner {
            width: auto;
        }

        &.bottom,
        &.top {
            .vp-cookie-consent-inner {
                text-align: center;
            }
        }
    }
}