.new__modal {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(33, 45, 33, 0.7);
    z-index: 50;
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;

    @media (max-width: 959px) {
        z-index: 999;
    }
}

.new__modal__closed {
    display: none;
}

.new__modal__container {
    background: var(--interface-colors-white);
    display: flex;
    flex-direction: column;
    overflow-y: auto;

    &::-webkit-scrollbar {
        width: 6px;
        background-color: transparent;
    }

    &::-webkit-scrollbar-thumb {
        border-radius: 8px;
        background-color: rgba(0, 0, 0, 0.1);
    }

    @media (min-width: 430px) {
        gap: 20px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        gap: 16px;
    }
    @media (max-width: 319px) {
        gap: 8px;
    }

    @media (min-width: 430px) {
        padding: 24px 0;
    }
    @media (max-width: 429px) {
        padding: 20px 0;
    }

    @media (min-width: 430px) {
        max-height: calc(100dvh - 48px);
        min-width: 380px;
        max-width: calc(100% - 48px);
        border-radius: 24px;
        clip-path: inset(0 round 24px);
    }
    @media (max-width: 429px) {
        width: 100%;
        height: 100dvh;
        justify-content: space-between;
    }
}

.new__modal__container-wide {
    @media (min-width: 430px) {
        width: calc(100% - 48px);
        max-width: 1248px;
        min-width: 382px;
    }
}

.new__modal__header {
    display: flex;
    justify-content: space-between;
    gap: 24px;

    @media (min-width: 589px) {
        padding: 0 24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        padding: 0 16px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        padding: 0 12px;
    }
    @media (max-width: 319px) {
        padding: 0 8px;
    }
}

.new__modal__header.--has-border {
    border-bottom: 1px solid var(--interface-colors-border-gray);
    position: relative;
    justify-content: center;

    @media (min-width: 430px) {
        padding-bottom: 19px;
    }
    @media (max-width: 429px) {
        padding-bottom: 15px;
    }
}

.new__modal__header.--has-border .new__modal__close {
    position: absolute;

    @media (min-width: 589px) {
        right: 24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        right: 16px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        right: 12px;
    }
    @media (max-width: 319px) {
        right: 8px;
    }
}

.new__modal__title {
    font-weight: 700;
    color: var(--general-green);

    @media (min-width: 2100px) {
        font-size: 28px;
        line-height: 42px;
    }
    @media (min-width: 430px) and (max-width: 2099px) {
        font-size: 24px;
        line-height: 36px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        font-size: 18px;
        line-height: 27px;
    }
    @media (max-width: 319px) {
        font-size: 16px;
        line-height: 24px;
    }
}

.new__modal__controls-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;

    @media (min-width: 589px) {
        padding: 0 24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        padding: 0 16px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        padding: 0 12px;
    }
    @media (max-width: 319px) {
        padding: 0 8px;
    }
}

.new__modal__controls {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.new__modal__controls.--has-border {
    border-top: 1px solid var(--interface-colors-border-gray);

    @media (min-width: 589px) {
        margin: 0 -24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        margin: 0 -16px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        margin: 0 -12px;
    }
    @media (max-width: 319px) {
        margin: 0 -8px;
    }

    @media (min-width: 430px) {
        padding-top: 19px;
    }
    @media (max-width: 429px) {
        padding-top: 15px;
    }
}

.new__modal__close {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-left: auto;
    width: 16px;
    height: 16px;
}

.new__modal__close i {
    color:var(--interface-colors-grey-icons-color-deep-grey)
}

.new__modal__back {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all .2s ease-in-out;

    &:hover {
        color: var(--brand-colors-deep-green);
    }
}

.new__modal__back span {
    line-height: 150%;
    font-weight: 700;

    @media (min-width: 430px) {
        font-size: 14px;
    }
    @media (max-width: 429px) {
        font-size: 12px;
    }
}

.new__modal__back .icon {
    display: block;
    font-size: 20px;
    transform: rotate(180deg);
}

.new__modal__content-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.new__modal__icon {
    width: 85px;
    height: 68px;
    margin-bottom: 8px;
}

.new__modal__content--full {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.new__modal__content-spacing {
    @media (min-width: 590px) {
        padding-right: 24px;
        padding-left: 24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        padding-right: 16px;
        padding-left: 16px;
    }
    @media (min-width: 320px) and (max-width: 429px) {
        padding-right: 12px;
        padding-left: 12px;
    }
    @media (max-width: 319px) {
        padding-right: 8px;
        padding-left: 8px;
    }
}

.new__modal__container-spacing-y {
    padding: 44px 0;
    position: relative;
}
.new__modal__container-spacing-y .new__modal__header {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 0;
}

/*Modal with scrollable content*/
.new__modal__scrollable {
    background-color: var(--interface-colors-white);
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 48px);
    clip-path: inset(0 round 24px);

    @media (min-width: 590px) {
        padding: 48px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        padding: 24px;
    }
    @media (max-width: 429px) {
        padding: 20px 16px;
    }

    @media (min-width: 430px) {
        border-radius: 24px;
    }
    @media (max-width: 429px) {
        border-radius: 16px;
    }

    @media (min-width: 590px) {
        max-width: 550px;
        min-width: 500px;
    }
    @media (max-width: 589px) {
        max-width: calc(100% - 48px);
    }
}

.new__modal__scrollable--close {
    cursor: pointer;
    position: absolute;
    display: flex;

    @media (min-width: 430px) {
        top: 24px;
        right: 24px;
    }
    @media (max-width: 429px) {
        top: 16px;
        right: 16px;
    }
}

.new__modal__scrollable--close > svg {
    width: 24px;
    height: 24px;
}

.new__modal__scrollable--header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--brand-colors-dark-green);
    gap: 12px;
    border-bottom: 1px solid var(--interface-colors-grey-border);

    @media (min-width: 430px) {
        padding-bottom: 20px;
    }
    @media (max-width: 429px) {
        padding-bottom: 16px;
    }
}

.new__modal__scrollable--title {
    line-height: 150%;

    @media (min-width: 590px) {
        font-size: 24px;
    }
    @media (min-width: 430px) and (max-width: 589px) {
        font-size: 20px;
    }
    @media (max-width: 429px) {
        font-size: 18px;
    }
}

.new__modal__scrollable--subtitle {
    line-height: 150%;

    @media (min-width: 430px) {
        font-size: 14px;
    }
    @media (max-width: 429px) {
        font-size: 12px;
    }
}

.new__modal__scrollable--content {
    flex-grow: 1;
    overflow: auto;
    min-height: 0;

    &::-webkit-scrollbar {
        width: 16px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--interface-colors-grey-border);
        border-left: 10px solid rgba(255, 255, 255, 1);
    }

    &::-webkit-scrollbar-thumb:hover {
        background: var(--interface-colors-grey-icons-color-deep-grey);
    }

    &::-webkit-scrollbar-track {
        background: transparent;
    }

    @media (min-width: 430px) {
        margin: 20px 0;
    }
    @media (max-width: 429px) {
        margin: 16px 0;
    }
}

.new__modal__scrollable--footer {
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--interface-colors-grey-border);

    @media (min-width: 430px) {
        padding-top: 20px;
    }
    @media (max-width: 429px) {
        padding-top: 16px;
    }
}

.new__modal__scrollable.internal-spacing {
    padding: 0;
    width: 100%;

    @media (min-width: 590px) {
        max-width: 500px;
    }
}

.new__modal__scrollable.internal-spacing .new__modal__scrollable--header {
    @media (min-width: 430px) {
        padding: 24px 24px 19px;
    }
    @media (max-width: 429px) {
        padding: 20px 20px 15px;
    }
}

.new__modal__scrollable.internal-spacing .new__modal__scrollable--content {
    @media (min-width: 430px) {
        margin: 20px 24px 24px;
    }
    @media (max-width: 429px) {
        margin: 16px 16px 20px;
    }
}

.new__modal__scrollable.internal-spacing .new__modal__scrollable--footer {
    @media (min-width: 430px) {
        padding: 19px 24px 24px;
    }
    @media (max-width: 429px) {
        padding: 15px 20px 20px;
    }
}
