: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;

    & > span {
        padding-inline: 0.5rem;
        padding-block: 0.185rem;
        background: #f49420;
        border-radius: 5px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04rem;
        transform: translateY(0.075rem);
        color: #ffffff;
    }
}

.flexRow:not(:first-child) {
    flex: 1;
    justify-content: flex-end;
}

.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: 0px 1px 0px rgba(0, 0, 0, 0.25);

    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: 1rem;
    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;
    }
}

.tryNewFormBuilderBtnContainer {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
}

.migratedForm {
    display: flex;
    align-items: center;

    .tooltipContainer {
        position: relative;
        display: flex;
        align-items: center;

        svg {
            margin-right: 5px;
            fill: #3A21D9;
        }
    }

    .tooltip {
        display: none;
        width: 230px;
        bottom: 25px;
        left: -10px;
    }

    .tooltip::after {
        top: 100%;
        left: 14px;
    }

    .tooltipContainer:hover .tooltip {
        display: unset;
    }
}

.upgradedForm {
    width: max(7.5rem, 120px);
    position: relative;

    .tooltip {
        width: 18rem;
        bottom: calc(100% + 10px);
        right: 0;
    }

    .tooltip::after {
        top: 100%;
        right: 55px;
    }

    .tooltipContainer {
        position: relative;
    }
}

.migratedForm,
.upgradedForm {
    .tooltip {
        position: absolute;
        background-color: #19661c;
        color: #fff;
        padding: 1rem;
        border-radius: 4px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05);
        font-size: 0.75rem;
        font-weight: 500;
    }

    .tooltip::after {
        content: " ";
        position: absolute;
        border-width: 5px;
        border-style: solid;
        border-color: #19661c transparent transparent transparent;
    }

    .link {
        cursor: pointer;
        margin-top: 2rem;
        margin-bottom: -0.4rem;
        font-weight: bold;
        float: right;
    }
}

#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;
    }
}
