﻿/* Prevents the popup from being shown on load */
.popup-visible .popup {
    display: flex;
}

.popup {
    opacity: 0;
    display: none;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: ease-in-out 400ms opacity;
}

    .popup:target {
        opacity: 1;
        pointer-events: all;
    }

.popup__content {
    width: 800px;
    max-height: 70vh;
    max-width: calc(100vw - (var(--grid-gutter) * 2));
    position: relative;
    padding: 10px var(--grid-gutter) 25px;
    background-color: var(--color-white);
    border-radius: 4px;
    box-shadow: 0px 3px 25px rgba(190, 190, 190, 0.15);
    overflow-x: auto;
}

.popup__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .popup__video {
        margin: var(--grid-gutter) 0;
    }
}

.popup__video .rich-text {
    position: absolute;
}

.popup__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Close button */
.popup__close {
    position: relative;
    display: block;
}

    .popup__close::after {
        right: -17.5px;
        top: -17.5px;
        width: 35px;
        height: 35px;
        position: absolute;
        display: flex;
        z-index: var(--z-index-modal);
        align-items: center;
        justify-content: center;
        background-color: var(--color-primary);
        border-radius: 50%;
        color: var(--color-white);
        content: '×';
        cursor: pointer;
    }

    /* The overlay */
    .popup__close::before {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        position: fixed;
        background: rgba(var(--color-black-rgb), 0.3);
        content: '';
        cursor: default;
    }

/* Signering */
.popup__title {
    font-weight: var(--font-weight-bold);
    background-color: var(--color-secondary-6);
    margin: -10px calc(var(--grid-gutter) * -1) 0;
    padding: calc(var(--h2-font-size) * 1.5) var(--grid-gutter);
    font-size: var(--h2-font-size);
    line-height: var(--h2-line-height);
}
