/*                                                 


    ____  ____  ____  __  ______   _______________
   / __ \/ __ \/ __ \/ / / / __ \ / ___/ ___/ ___/
  / /_/ / /_/ / /_/ / /_/ / /_/ // /__(__  |__  ) 
 / .___/\____/ .___/\__,_/ .___(_)___/____/____/  
/_/         /_/         /_/                       

 
 Version: 2.0.2
  Author: digiPublica
 Website: https://www.digipublica.de
    Desc: digiPublica Basic CSS for PopUp

*/

/* -----------------------------------------------
POPUP GENERAL
----------------------------------------------- */

.popup,
.popup * {
    box-sizing: border-box;
}
.popup {
    pointer-events: all;
}
.popup .popup-content {
    width: calc(100% - 2rem);
    max-width: 500px;
    max-height: 550px;
    margin: 0 1rem;
    padding-bottom: 3rem;
    position: fixed;
    top: 50%;
    left: calc(50% - 1rem);
    transition: ease-in-out .25s;
    transform: translate(-50%, -50%);
    z-index: 10008;
    text-shadow: none !important;
    box-shadow: 0px 0px 15px -5px #000;
    visibility: hidden;
    opacity: 0;
    background: #FFF;
    border-radius: 10px;
}
.popup .popup-content::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 25%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 35px solid transparent;
    border-top: 25px solid #FFF;
    transform: translateX(-50%);
}
.popup .popup-content::after {
    content: "";
    position: absolute;
    bottom: 3rem;
    left: 0;
    right: 0;
    background: rgb(255,255,255);
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    height: 1rem;
    display: block;
    pointer-events: none;
}
.popup .popup-content.opened {
    visibility: visible;
    opacity: 1;
}
.popup .popup-content > .popup-content-wrap {
    max-height: calc(550px - 6rem);
    padding-right: calc(3rem - 14px);
    padding-left: 3rem;
    overflow-y: auto;
}
.popup .popup-content > .popup-content-wrap > div:first-child {
    padding-top: 3rem;
}
.popup .popup-content > .popup-content-wrap::-webkit-scrollbar {
    width: 14px;
    height: 18px;
}
.popup .popup-content > .popup-content-wrap::-webkit-scrollbar-thumb {
    height: 6px;
    border: 4px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
    -webkit-border-radius: 7px;
    background-color: rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: inset -1px -1px 0px rgba(0, 0, 0, 0.05), inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}
.popup .popup-content > .popup-content-wrap::-webkit-scrollbar-thumb:hover {
    background-color: rgb(0 0 0 / 25%);
}
.popup .popup-content > .popup-content-wrap::-webkit-scrollbar-button {
    width: 0;
    height: 0;
    display: none;
}
.popup .popup-content > .popup-content-wrap::-webkit-scrollbar-corner {
    background-color: transparent;
}
.popup-shade {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    background: transparent;
    transition: all .25s;
    z-index: 10007;
}
.popup-shade.cover {
    visibility: visible;
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

/* -----------------------------------------------
MEDIA QUERIES
----------------------------------------------- */

@media screen and (max-width: 900px) {
    .popup .popup-content {
        padding-bottom: 2rem;
    }    
    .popup .popup-content::after {
        bottom: 2rem;
    }
    .popup .popup-content > .popup-content-wrap {
        padding-right: calc(2rem - 14px);
        padding-left: 2rem;
    }
    .popup .popup-content > .popup-content-wrap > div:first-child {
        padding-top: 2rem;
    }
}
@media screen and (max-width: 900px) and (orientation:landscape) {
    .popup .popup-content {
        max-height: 300px;
    }
    .popup .popup-content > .popup-content-wrap {
        max-height: calc(300px - 6rem);
    }
}

/* -----------------------------------------------
DARKMODE
----------------------------------------------- */

body.dark .popup .popup-content {
    background: #212121;
}
body.dark .popup .popup-content::before {
    border-top-color: #212121;
}
body.dark .popup .popup-content::after {
    background: #212121;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgb(33 33 33) 100%);
}