.container {
    margin-top: 3rem;
    padding: 3rem;
}

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

    .post-type-give_forms #wpbody {
        -webkit-font-smoothing: antialiased;
        box-sizing: border-box;
        background-color: #f9fafb;
        min-height: calc(100vh - 32px);

        & > 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: Inter, system-ui, sans-serif;
    font-size: 1rem;

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

.pageHeader {
    background-color: var(--givewp-shades-white);
    border-bottom: 0.0625rem solid #dbdbdb;
    padding-block: 1rem 0;
    padding-inline: 1.5rem;
    position: sticky;
    top: 2rem;
    z-index: 100;
}

.flexContainer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: var(--givewp-spacing-2);

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

.flexRow {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: var(--givewp-spacing-2);
    margin-top: auto;
}

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

.justifyContentEnd {
    flex: 1;
    justify-content: flex-end;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.125rem;
    font-size: 0.75rem;

    & > span {
        font-weight: bold;
        color: var(--givewp-neutral-900);
    }

    & > a {
        text-decoration: none;
        color: var(--givewp-neutral-500);
        font-weight: 400;
    }

    & > a:hover {
        text-decoration: underline;
    }
}

.pageTitle {
    color: var(--givewp-neutral-900);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 2.25rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    margin-top: 1rem;
}

.tabs [data-reach-tab],
.tabs [role='tab'] {
    position: relative;
    appearance: none;
    padding: var(--givewp-spacing-2) var(--givewp-spacing-4);
    border: 0;
    background-color: transparent;
    color: var(--givewp-neutral-700);
    font-size: 0.8rem;
    line-height: 1.5rem;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    &:before {
        content: attr(data-text);
        font-weight: 600;
        height: 0;
        visibility: hidden;
        overflow: hidden;
        user-select: none;
        pointer-events: none;
        speak: none;
    }
}

@media screen and (min-width: 48rem) {

    .tabs [data-reach-tab],
    .tabs [role='tab'] {
        font-size: 1rem;
    }
}

.tabs [data-reach-tab]::after,
.tabs [role='tab']:after {
    content: '';
    display: block;
    position: absolute;
    top: calc(100% - 0.1875em);
    left: 0;
    right: 0;
    height: 0.1875rem;
    background-color: transparent;
    transition: background-color 100ms ease-in-out;
}

.tabs [role='tab']:hover,
.tabs [data-reach-tab]:hover {
    color: var(--givewp-neutral-900);
    background-color: var(--givewp-neutral-50);
}

.tabs [data-reach-tab][aria-selected='true'],
.tabs [role='tab'][aria-selected='true'] {
    color: var(--givewp-neutral-900);
    font-weight: 600;
}

.tabs [data-reach-tab][aria-selected='true']::after,
.tabs [role='tab'][aria-selected='true']::after {
    background-color: #66bb6a;
}

.confirmationDialogContent {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--givewp-neutral-700);
}

.confirmationDialogButtons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--givewp-spacing-2);
    margin-top: var(--givewp-spacing-6);

    button {
        cursor: pointer;
        display: flex;
        flex: 1;
        justify-content: center;
        border-radius: 4px;
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.5;
        padding: var(--givewp-spacing-3) var(--givewp-spacing-6);
        border: none;
    }

    .cancelButton {
        border: 1px solid var(--givewp-neutral-300);
        background-color: var(--givewp-shades-white);
        color: var(--givewp-neutral-900);

        &:hover {
            background-color: var(--givewp-neutral-50);
        }
    }

    .confirmButton {
        border: 1px solid #2271b1;
        background-color: #2271b1;
        color: var(--givewp-shades-white);

        &:hover {
            border: 1px solid #135e96;
            background-color: #135e96;
        }
    }

    .confirmButton--syncing {
        border: 1px solid #135e96;
        background-color: #135e96;
    }




    .confirmButton--error {
        border: 1px solid var(--givewp-red-500);
        background-color: var(--givewp-red-500);
        color: var(--givewp-shades-white);

        &:hover {
            border: 1px solid var(--givewp-red-400);
            background-color: var(--givewp-red-400);
        }
    }

    .confirmButton--regular {
        border: 1px solid var(--wp-admin-theme-color);
        background-color: var(--wp-admin-theme-color);
        color: var(--givewp-shades-white);

        &:hover {
            border: 1px solid var(--wp-admin-theme-color-darker-10);
            background-color: var(--wp-admin-theme-color-darker-10);
        }
    }
}

.pageContent {
    padding: var(--givewp-spacing-4) var(--givewp-spacing-6);
    position: relative;

    &.fullWidth {
        padding: var(--givewp-spacing-4) 0;
    }

    section {
        position: relative;

        h2 {
            font-size: 1.125rem;
            line-height: 1.56;
            margin: 0 0 var(--givewp-spacing-2);
        }
    }

    .sections {
        display: flex;
        flex-direction: column;
        gap: var(--givewp-spacing-6);

        .section {
            display: flex;
            align-content: flex-start;
            flex-direction: row;
            flex-wrap: wrap;
            background-color: var(--givewp-shades-white);
            padding: var(--givewp-spacing-9) var(--givewp-spacing-6);
            border-radius: var(--givewp-spacing-2);

            @media (max-width: 1100px) {
                flex-direction: column;
            }

            .leftColumn {
                flex: 1;
                padding-right: var(--givewp-spacing-6);

                @media (max-width: 1100px) {
                    width: 100%;
                    margin-bottom: var(--givewp-spacing-4);
                }
            }

            .rightColumn {
                flex: 2;
            }
        }
    }

    .sectionTitle {
        font-size: 18px;
        font-weight: 600;
        line-height: 1.56;
        color: var(--givewp-neutral-900);
        padding: 0;
        margin: 0 0 var(--givewp-spacing-1);
    }

    .sectionDescription {
        color: var(--givewp-neutral-500);
        font-size: 14px;
        line-height: 1.43;
        margin: 0;
    }

    .sectionSubtitle {
        color: var(--givewp-neutral-700);
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.5;
        margin: 0;
    }

    .sectionField {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--givewp-spacing-1);
        margin-bottom: var(--givewp-spacing-6);

        label,
        legend {
            color: var(--givewp-neutral-700);
            font-size: 1rem;
            font-weight: 500;
            line-height: 1.5;
            + p {
                color: var(--givewp-neutral-500);
                font-size: 0.875rem;
                line-height: 1.43;
                margin: 0 0 var(--givewp-spacing-1);
            }
        }

        legend {
            margin-bottom: var(--givewp-spacing-2);
        }

        input,
        textarea,
        select,
        .upload {
            color: var(--givewp-neutral-900);
            font-weight: 500;
        }

        input, textarea, select {
            border-radius: var(--givewp-rounded-4);
            border: 1px solid #9ca0af;
            display: block;
            font-size: 1rem;
            line-height: 1.5;
            max-width: 100%;
            padding: var(--givewp-spacing-4);
            width: 100%;

            &:not([type="checkbox"]) {
                height: auto;
            }

            &::-webkit-datetime-edit {
                line-height: inherit;
            }

            &:focus {
                border-color: rgb(34, 113, 177);
                outline: none;
                box-shadow: rgb(34, 113, 177) 0px 0px 0px 1px;
            }

            &:disabled {
                cursor: not-allowed;

                &:not([type="checkbox"]) {
                    background-color: #f6f7f7;
                    box-shadow: none;
                    border-color: #9ca0af;
                    opacity: 0.7;
                    text-shadow: 0 1px 0 #fff;
                    transform: none;
                }
            }
        }

        input[type="radio"],
        input[type="checkbox"] {
            --transition: 0.2s ease;

            appearance: none;
            background-color: transparent;
            border: solid 1px var(--givewp-grey-400);
            color: var(--wp-admin-theme-color);
            cursor: pointer;
            flex-shrink: 0;
            font-size: inherit;
            height: 1.25rem;
            margin: 0;
            transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
            vertical-align: middle;
            width: 1.25rem;

            &::before {
                content: none;
            }

            &:focus {
                border-color: transparent;
                box-shadow: var(--wp-admin-theme-color) 0px 0px 0px 0.125rem;
                outline: none;
            }

            &[aria-invalid="false"] {
                border-color: var(--givewp-green-500);
            }

            &[aria-invalid="true"] {
                border-color: var(--givewp-red-400);
            }
        }

        input[type="checkbox"] {
            border-radius: var(--givewp-rounded-1, 0.25rem);

            &:checked,
            &:checked:active,
            &:checked:focus {
                background-color: var(--wp-admin-theme-color);
                background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27rgb%28255, 255, 255%29%27 stroke-width=%274%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%2720 6 9 17 4 12%27%3E%3C/polyline%3E%3C/svg%3E");
                background-position: center;
                background-size: 0.75em auto;
                background-repeat: no-repeat;
                border-color: var(--wp-admin-theme-color);
            }

        }

        input[type="radio"] {
            border-radius: 50%;
            transform: translateY(-0.075em);
            display: grid;
            place-content: center;

            &::before {
                content: "";
                width: 0.75rem;
                height: 0.75rem;
                border-radius: 50%;
                transform: scale(0);
                transition: 120ms transform ease-in-out;
                box-shadow: inset 1em 1em var(--wp-admin-theme-color);
                vertical-align: middle;
                cursor: pointer;
            }

            &:checked,
            &:checked:active,
            &:checked:focus {
                &::before {
                    transform: scale(1);
                }
            }
        }

        select {
            background-position: right var(--givewp-spacing-4) top 50%;
        }
    }

    .sectionField:last-child {
        margin: 0;

        .sectionFieldCurrencyControl {
            div {
                margin: 0;
            }
        }
    }

    .sectionFieldDescription {
        font-size: 14px;
        line-height: 1.43;
        color: var(--givewp-neutral-500);
    }

    .sectionFieldHelpText {
        font-size: 0.875rem;
        line-height: 1.43;
        margin: var(--givewp-spacing-1) 0 0;
        font-weight: 400;
        color: var(--givewp-neutral-500);
    }

    .errorMsg {
        font-size: 14px;
        padding: var(--givewp-spacing-2) 0;
        color: #ff0000;
    }

    .toggle {
        margin-top: var(--givewp-spacing-3);

        span:is(:global(.components-form-toggle)) {
            height: 24px;
        }

        & > div {
            margin-bottom: 0;
        }

        span:is(:global(.components-form-toggle .components-form-toggle__track)) {
            width: 48px;
            height: 24px;
            border-radius: 133.3px;
        }

        span:is(:global(.components-form-toggle .components-form-toggle__thumb)) {
            width: 1rem;
            height: 1rem;
            top: 4px;
            left: 4px;
        }

        span:is(:global(.components-form-toggle.is-checked .components-form-toggle__thumb)) {
            left: 12px;
        }

        span:is(:global(.components-form-toggle.is-checked .components-form-toggle__track)) {
            background-color: #007cba;
        }

        span:is(:global(.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track)) {
            box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff, 0 0 0 calc(var(--wp-admin-border-width-focus) * 2) #007cba;
        }

        label {
            font-family: Inter, system-ui, sans-serif;
            font-size: 1rem;
            font-weight: 500;
            line-height: 1.5;
            color: #1f2937;
            padding: var(--givewp-spacing-2) 0;
            margin-left: 0.5rem;
        }

        p {
            font-family: Inter, system-ui, sans-serif;
            font-size: .875rem;
            color: #4b5563;
            margin-top: -0.1rem;
            margin-left: 1.5rem;
        }
    }

    .warningNotice {
        display: flex;
        gap: 0.3rem;
        margin-top: var(--givewp-spacing-2);
        padding: 0 0.5rem 0 0.5rem;
        background-color: #fffaf2;
        border-radius: 4px;
        border: 1px solid var(--givewp-orange-400);
        border-left-width: 4px;
        font-size: 0.875rem;
        font-weight: 500;
        color: #1a0f00;

        svg {
            margin: 0.8rem 0.3rem;
            height: 1.25rem;
            width: 1.25rem;
        }
    }

    .colorControl {
        margin-top: var(--givewp-spacing-3);
    }
}

.loadingContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;

    .loadingContainerContent {
        display: flex;
        background-color: #fff;
        padding: var(--givewp-spacing-6);
        border-radius: var(--givewp-spacing-2);
        margin-bottom: var(--givewp-spacing-4);
        align-items: center;
        flex-direction: column;
    }

    .loadingContainerContentText {
        padding: var(--givewp-spacing-4);
        font-size: 1rem;
    }
}

:global(#givewp-details-form) {
    .primaryActionButton,
    .secondaryActionButton {
        display: flex;
        align-content: center;
        border-radius: var(--givewp-rounded-4);
        font-size: 0.875rem;
        font-weight: 500;
        line-height: 1.5;
        text-align: center;
        padding: var(--givewp-spacing-2) var(--givewp-spacing-4);

        svg {
            margin: 3px 0 0 8px !important;
        }
    }

    .secondaryActionButton {
        color: #060c1a;
        background-color: var(--givewp-neutral-100);
        border-color: var(--givewp-neutral-100);

        &:hover {
            background-color: var(--givewp-neutral-200);
            border-color: var(--givewp-neutral-200);
        }
    }

    .contextMenuButton {
        background-color: var(--givewp-neutral-100);
        border-color: var(--givewp-neutral-100);
        border-radius: var(--givewp-rounded-4);
        line-height: 0;
        padding: var(--givewp-spacing-2);

        &:hover, &:active, &:focus {
            background-color: var(--givewp-neutral-200);
            border-color: var(--givewp-neutral-200);
        }
    }

    .contextMenu {
        position: absolute;
        display: flex;
        flex-direction: column;
        gap: var(--givewp-spacing-1);
        z-index: 9999;
        padding: var(--givewp-spacing-1);
        top: 50px;
        width: 203px;
        border-radius: 4px;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        border: solid 1px var(--givewp-neutral-50);
        background-color: var(--givewp-shades-white);

        .contextMenuItem {
            text-decoration: none;
            gap: 4px;
            display: flex;
            align-items: center;
            padding: var(--givewp-spacing-2);
            font-size: .875rem;
            font-weight: 500;
            line-height: 1.43;
            color: var(--contextMenuItemColor, var(--givewp-neutral-700));

            &:hover {
                background-color: #f3f4f6;
            }
        }
    }
}

:global {
    body.admin-color-fresh{
        --wp-admin-theme-color:#2271b1;
        --wp-admin-theme-color--rgb:34, 113, 177;
        --wp-admin-theme-color-darker-10: #135e96;
        --wp-admin-theme-color-darker-10--rgb:19, 94, 150;
        --wp-admin-theme-color-darker-20: #0a4b78;
        --wp-admin-theme-color-darker-20--rgb:10, 75, 120;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-fresh{
          --wp-admin-border-width-focus:1.5px;
        }
      }

    body.admin-color-light{
        --wp-admin-theme-color:#0085ba;
        --wp-admin-theme-color--rgb:0, 133, 186;
        --wp-admin-theme-color-darker-10:#0073a1;
        --wp-admin-theme-color-darker-10--rgb:0, 115, 161;
        --wp-admin-theme-color-darker-20:#006187;
        --wp-admin-theme-color-darker-20--rgb:0, 97, 135;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-light{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-modern{
        --wp-admin-theme-color:#3858e9;
        --wp-admin-theme-color--rgb:56, 88, 233;
        --wp-admin-theme-color-darker-10:#2145e6;
        --wp-admin-theme-color-darker-10--rgb:33, 69, 230;
        --wp-admin-theme-color-darker-20:#183ad6;
        --wp-admin-theme-color-darker-20--rgb:24, 58, 214;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-modern{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-blue{
        --wp-admin-theme-color:#096484;
        --wp-admin-theme-color--rgb:9, 100, 132;
        --wp-admin-theme-color-darker-10:#07526c;
        --wp-admin-theme-color-darker-10--rgb:7, 82, 108;
        --wp-admin-theme-color-darker-20:#064054;
        --wp-admin-theme-color-darker-20--rgb:6, 64, 84;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-blue{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-coffee{
        --wp-admin-theme-color:#46403c;
        --wp-admin-theme-color--rgb:70, 64, 60;
        --wp-admin-theme-color-darker-10:#383330;
        --wp-admin-theme-color-darker-10--rgb:56, 51, 48;
        --wp-admin-theme-color-darker-20:#2b2724;
        --wp-admin-theme-color-darker-20--rgb:43, 39, 36;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-coffee{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-ectoplasm{
        --wp-admin-theme-color:#523f6d;
        --wp-admin-theme-color--rgb:82, 63, 109;
        --wp-admin-theme-color-darker-10:#46365d;
        --wp-admin-theme-color-darker-10--rgb:70, 54, 93;
        --wp-admin-theme-color-darker-20:#3a2c4d;
        --wp-admin-theme-color-darker-20--rgb:58, 44, 77;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-ectoplasm{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-midnight{
        --wp-admin-theme-color:#e14d43;
        --wp-admin-theme-color--rgb:225, 77, 67;
        --wp-admin-theme-color-darker-10:#dd382d;
        --wp-admin-theme-color-darker-10--rgb:221, 56, 45;
        --wp-admin-theme-color-darker-20:#d02c21;
        --wp-admin-theme-color-darker-20--rgb:208, 44, 33;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-midnight{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-ocean{
        --wp-admin-theme-color:#627c83;
        --wp-admin-theme-color--rgb:98, 124, 131;
        --wp-admin-theme-color-darker-10:#576e74;
        --wp-admin-theme-color-darker-10--rgb:87, 110, 116;
        --wp-admin-theme-color-darker-20:#4c6066;
        --wp-admin-theme-color-darker-20--rgb:76, 96, 102;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-ocean{
          --wp-admin-border-width-focus:1.5px;
        }
      }

      body.admin-color-sunrise{
        --wp-admin-theme-color:#dd823b;
        --wp-admin-theme-color--rgb:221, 130, 59;
        --wp-admin-theme-color-darker-10:#d97426;
        --wp-admin-theme-color-darker-10--rgb:217, 116, 38;
        --wp-admin-theme-color-darker-20:#c36922;
        --wp-admin-theme-color-darker-20--rgb:195, 105, 34;
        --wp-admin-border-width-focus:2px;
      }
      @media (min-resolution:192dpi){
        body.admin-color-sunrise{
          --wp-admin-border-width-focus:1.5px;
        }
      }
}
