:global {
    :root {
        --give-primary-color: #69b868;
    }

    .post-type-give_forms #wpbody {
        box-sizing: border-box;

        & > a {
            text-decoration: underline
        }
    }

    .post-type-give_forms #wpbody-content {
        box-sizing: border-box;
    }

    .post-type-give_forms #wpbody::after {
        all: revert;
    }

    .give-visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    #wpcontent {
        padding: 0;
    }
}

.page {
    box-sizing: border-box;
    color: #333;
    font-family: Open Sans, system-ui, sans-serif;
    font-size: 1rem;

    *, ::before, ::after {
        box-sizing: inherit;
    }
}

.pageHeader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: #fff;
    padding-block: 1em;
    padding-inline: 1.5em;
    border-bottom: 0.0625rem solid #dbdbdb;

    & > * {
        flex-shrink: 0;
    }
}

.flexRow {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 1rem;
}

.pageTitle {
    color: #424242;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;

}

.pageContent {
    padding: 0 1.5em 1.5em 1.5em;
}

.pageActions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-block-end: 0.5rem;
    margin-block-start: 0.5rem;
    column-gap: 2rem;

    & > * {
        flex-shrink: 0;
    }
}

.alignEnd {
    justify-content: flex-end;
}

.addFormButton {
    $depth: 0 0.125rem 0 #ddd;

    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 0.1875rem;
    box-shadow: $depth;
    color: #888;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    block-size: 2.5rem;
    padding-inline: 0.75rem;
    transition-property: filter, color, outline;
    transition-duration: 180ms;
    transition-timing-function: ease-in;
    cursor: pointer;

    &:is(a) {
        text-decoration: none;
    }

    &:is(:hover, :active, :focus) {
        color: #777;
    }

    &:hover {
        filter: contrast(110%);
    }

    &:active {
        filter: contrast(90%);
    }

    &:focus {
        box-shadow: $depth;
        outline: 0.125rem solid var(--give-primary-color);
        outline-offset: 0.25em;
    }
}

#searchContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    justify-content: flex-start;
    background-color: rgba(248, 248, 248);
    padding-inline: 1.5em;
    padding-block: 1em;
    border-bottom: 0.0625rem solid #dbdbdb;
}

.container,
.overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.container {
    z-index: 11;
    display: flex;
    opacity: 1;
    animation: appear 180ms ease-in 0s 1;
    font-family: "Open Sans", sans-serif;

    &[aria-hidden='true'] {
        display: none;
        opacity: 0;
    }
}

@keyframes appear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.overlay {
    background-color: rgba(43, 46, 56, 0.9);
}

#modalTitle {
    font-size: 1.25rem;
    font-weight: 700;
    padding-inline: 1rem;
}

.dialog {
    margin: auto;
    z-index: 2;
    position: relative;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-block-start-color: var(--give-primary-color);
    border-block-start-width: 0.25rem;
    box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
    max-width: 50vw;
    min-width: 20rem;

    &.warning {
        border-block-start-color: #dba617;
    }

    &.danger {
        border-block-start-color: #d63638;
    }

    & ul {
        max-height: 40vh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }

    & li {
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    & li+li {
        border-top: 1px solid rgba(196, 196, 196);
        padding-top: 0.75rem;
    }
}

.modalContent > * {
    padding-inline: 1rem;
    margin-block: 1rem;
}

.gutter {
    border-top: 1px solid #DFDFDF;
    background: rgba(245 245 245);
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    column-gap: 1em;
    box-sizing: border-box !important;
    padding-block: 1em;
    padding-inline: 2rem;
    overflow: hidden
}

$button-blue: rgba(8 120 176);

#cancel, #confirm {
    border-radius: 3px;
    padding-inline: 0.75em;
    padding-block: 0.5em;
    transition: all 0.15s;
    box-shadow: 0px 2px 0px #DDDDDD;
    cursor: pointer;

    &:hover, &:focus {
        border-color: black;
        background: white;
        color: $button-blue;
        box-shadow: none;
    }

    &:active {
        border-color: rgba(170 170 170);
        box-shadow: inset 0px 0px 3px rgba(170 170 170 / 0.8);
    }
}

#cancel {
    border: 1px solid $button-blue;
    color: $button-blue;
    background: rgba(247 247 247);
}

#confirm {
    border: 1px solid $button-blue;
    background: $button-blue;
    color: white;
}

@media (prefers-reduced-motion: reduce) {

    .container {
        animation: none;
    }
}
