.c-popup {
    display: flex;
    position: fixed;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 14rem;
    padding: 1rem;
    bottom: 0;
    color: #fff;
    text-align: center;
    border: 1px solid #fff;
    border-bottom: 0;
    transform: translateY(100%);
    z-index: 9;

    h3 {
        padding-top: .5rem;
        color: #fff;
        font-size: 1.5rem;
        font-weight: bold;
    }

    p {
        margin-top: 1rem;
    }

    .c-button {
        margin-top: 1rem;
        border: 2px solid #fff;
        background: none;

        &:hover,
        &:focus {
            background: none;
            color: #fff;
            opacity: .6;
        }
    }

    &[data-state=inactive] {
        transform: translateY(100%);
    }

    &[data-state=active] {
        transform: translateY(0);
        transition: transform $transition-time ease-in-out;
    }
}

.c-popup--right {
    right: 1rem;
}

.c-popup--left {
    left: 1rem;
}

.c-popup__close {
    align-self: end;
}

.c-popup--primary {
    background-color: theme('colors.primary.500');

    .c-button {
        &:hover,
        &:focus {
            color: theme('colors.primary.200');
        }
    }
}

.c-popup--secondary {
    background-color: theme('colors.secondary.500');
}

.c-popup--cta {
    background-color: theme('colors.cta.500');
}

.c-popup--accent {
    background-color: theme('colors.accent.500');
}

.c-popup--ambient {
    background-color: theme('colors.ambient.500');
}
