gppopup {
    display: flex;
    height: 0;
    width: 0;
    position: absolute;
}

gppopup[modal] {
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.6);
    background-color: rgba(var(--dark-primary),0.6);
}

gppopup-container {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    top: 0;
}

gppopup-titlebar {
    display: flex;
    flex-direction: row-reverse;
    background-color: rgb(var(--light-theme-primary));
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
    border-right: solid 0.2rem rgb(var(--dark-tertiary));
    border-left: solid 0.2rem rgb(var(--dark-tertiary));
    border-top: solid 0.2rem rgb(var(--dark-tertiary));
    padding: 0.3rem;
    cursor: move;
}

gppopup-title {
    display: flex;
    font-size: 1.3rem;
    font-weight: bold;
    flex: 2;
}

gppopup-close {
    display: flex;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

gppopup-close.Clickable icon:hover {
    background-color: rgb(var(--light-primary));
}

gppopup-content {
    display: flex;
    flex-direction: column;
    padding: 0.2rem;
    border-right: solid 0.2rem rgb(var(--dark-tertiary));
    border-left: solid 0.2rem rgb(var(--dark-tertiary));
    border-bottom: solid 0.2rem rgb(var(--dark-tertiary));
    border-top: solid 0.2rem rgb(var(--dark-theme-secondary));
    border-bottom-right-radius: 0.3rem;
    border-bottom-left-radius: 0.3rem;
    background-color: rgb(var(--light-primary));

    /* Prevent the content from overflowing the window.
        2.4rem is the combined height of the gppopup title height,
        padding, and border.
    */
    max-height: calc(100vh - 2.4rem);
    max-width: 100vw;
    overflow: auto;
    box-sizing: border-box;
}