/** modules.css */
/* Processing */
.processing {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 10;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    & .processing-content {
        padding: 2rem;
        background-color: rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        text-align: center;

        & img {
            height: 36px;
            width: auto;
            margin: 0 auto;
        }
    }
}

/* Notifications (toast) */
.toast {
    position: fixed;
    background: #ffffff;
    padding: 0.75rem;
    font-size: 0.825rem;
    font-weight: 500;
    border: 1px solid #f2f2f2;
    width: 300px;
    right: 1.125rem;
    bottom: 1.125rem;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);

    &::first-letter {
        text-transform: capitalize;
    }

    &:first-child {
        z-index: 12;
    }

    &:nth-child(2) {
        z-index: 11;
    }

    &:nth-child(3) {
        z-index: 10;
    }

    &.success {
        background-color: hsl(143, 85%, 96%);
        border-color: hsl(145, 92%, 87%);
        color: hsl(140, 100%, 27%);
    }

    &.error {
        background-color: hsl(359, 100%, 97%);
        border-color: hsl(359, 100%, 94%);
        color: hsl(360, 100%, 45%);
    }

    &.info {
        background-color: hsl(208, 100%, 97%);
        border-color: hsl(221, 91%, 93%);
        color: hsl(210, 92%, 45%);
    }

    &.warning {
        background-color: hsl(49, 100%, 97%);
        border-color: hsl(49, 91%, 84%);
        color: hsl(31, 92%, 45%);
    }

    @media (max-width: 400px) {
        width: 88%;
        right: 6%;
    }
}

/** Modal */
.modal {
    backdrop-filter: blur(8px);
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    visibility: hidden;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 10;

    & .modal-container {
        position: relative;
        width: calc(100% - 2rem);
        max-height: calc(100% - 4rem);
        margin: 1rem auto;
        min-height: 20%;
        max-width: 640px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;

        & .modal-close {
            position: absolute;
            right: 0.375rem;
            top: 0;

            & img {
                max-width: 16px;
            }
        }

        & .modal-content {
            position: relative;
            margin: 1.5rem auto;
            height: calc(100% - 3rem);
            width: calc(100% - 0.5rem);
            background-color: #ffffff;
            border-radius: 8px;
            border: 1px solid #d0d0d0;
            box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.02);

            /* Modal content specific styling */
            & .modal-qrcode {
                margin: 0.125rem;

                & img {
                    max-width: 100%;
                    border-radius: 8px;
                }

                & .download {
                    padding: 0.75rem 1rem;
                    text-align: center;

                    & a {
                        display: inline-block;
                        padding: 0.25rem 0.5rem;
                        background: #f0f0f0;
                        border-radius: 4px;
                        font-weight: 500;
                    }
                }
            }
        }
    }
}

/** Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translate(-50%, 100%);
	}

	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
		transform: translate(-50%, 100%);
	}
}

/* Additional Styling */
.profile {
	width: 225px;
	height: 225px;
	margin: 0 auto;

	& img {
		max-width: 100%;
	}
}
