.modal {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 0.15s;
}

.modal--show {
    animation: fadeIn 0.3s;
}

.modal--show .modal__card,
.modal--show [data-modal-card] {
    animation: fadeInUp 0.3s;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__card {
    animation-duration: 0.3s;
    background-color: white;
    border-radius: 4px;
    padding: 24px 20px;
    max-width: 600px;
    animation: fadeOutDown 0.15s;
}

.modal__footer {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: end;

    & > *:only-child {
        margin: auto;
    }
}

.modal__title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

.modal__content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.modal__content-img {
    align-self: center;
}

/* Welcome modal */
.welcome-modal {
    position: relative;
    background-color: var(--color-background);
    border-radius: 4px;
    padding: 48px 64px;
    max-width: 540px;
    width: 90vw;
    box-shadow: 5px 8px 9px rgba(48, 38, 36, 0.1);
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-end;
    animation: fadeOutDown 0.15s;
}

.welcome-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-modal__close img {
    display: block;
    width: 100%;
    height: 100%;
}

.welcome-modal__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    text-align: center;
}

.welcome-modal__title {
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-burn-earth);
    margin: 0;
}

.welcome-modal__text {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-burn-earth);
}

.welcome-modal__text p {
    margin: 0;
}

.welcome-modal__text p + p {
    margin-top: 1em;
}

.welcome-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
}

.welcome-modal__btn {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    width: 100%;
    border: none;
    background-color: var(--color-garnet-light);
    color: var(--color-linen);
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.welcome-modal__link {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-burn-earth, #302624);
    text-decoration: underline;
    cursor: pointer;
}

/* Redeem modal */
.redeem-modal {
    position: relative;
    background-color: var(--color-background);
    border-radius: 4px;
    padding: 48px 64px;
    max-width: 540px;
    width: 90vw;
    box-shadow: 5px 8px 9px rgba(48, 38, 36, 0.1);
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-end;
    animation: fadeOutDown 0.15s;
}

.redeem-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.redeem-modal__close img {
    display: block;
    width: 100%;
    height: 100%;
}

.redeem-modal__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
    text-align: center;
}

.redeem-modal__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.redeem-modal__icon img {
    display: block;
    width: 100%;
    height: 100%;
}

.redeem-modal__title {
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-burn-earth);
    margin: 0;
}

.redeem-modal__text {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-burn-earth);
}

.redeem-modal__text p {
    margin: 0;
}

.redeem-modal__text p + p {
    margin-top: 1em;
}

.redeem-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
}

.redeem-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    width: 100%;
    border: none;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.redeem-modal__btn--primary {
    background-color: var(--color-garnet-light);
    color: var(--color-linen);
}

.redeem-modal__btn--secondary {
    background: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-burn-earth);
    text-decoration: underline;
}

.circle-loading {
    display: inline-block;
    position: relative;
    width: 20px;
    aspect-ratio: 1;
    color: white;

    &>* {
        box-sizing: border-box;
        display: block;
        position: absolute;
        width: 120%;
        height: 120%;
        margin: 10%;
        border: 1px solid currentColor;
        border-radius: 50%;
        animation: rotate-full 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
        border-color: currentColor transparent transparent transparent;
    }

    &>*:nth-child(1) {
        animation-delay: -0.45s;
    }

    &>*:nth-child(2) {
        animation-delay: -0.3s;
    }

    &>*:nth-child(3) {
        animation-delay: -0.15s;
    }
}
