﻿/* Sending Email*/
.sending-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255,255,255,.9);
}

    .sending-overlay.show {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column; /* Important */
    }

.formBtnSubmit:focus ~ .sending-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: rgba(255,255,255,.95);
    pointer-events: fill;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #e5e7eb;
    border-top: 5px solid #103175;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    z-index: 20;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/*New background animation*/
.loader-animation {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

/*Glow behind spinner*/
.glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient( circle, rgba(16,49,117,.35) 0%, rgba(66,165,245,.15) 45%, transparent 75% );
    filter: blur(15px);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {

    0%,100% {
        transform: scale(1);
        opacity: .6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/*Documents orbiting behind loader*/ 
.doc {
    position: absolute;
    width: 54px;
    height: 70px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
    z-index: 5;
}

.doc::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 12px;
    width: 24px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255,255,255,.85);
    box-shadow: 0 10px rgba(255,255,255,.7), 0 20px rgba(255,255,255,.5);
}

.doc1 {
    background: linear-gradient(135deg,#0667d3,#7f85f6);
    animation: orbit1 4s infinite linear;
}

.doc2 {
    background: linear-gradient(135deg,#06b6d4,#67e8f9);
    animation: orbit2 4s infinite linear;
}

.doc3 {
    background: linear-gradient(135deg,#8b5cf6,#d8b4fe);
    animation: orbit3 4s infinite linear;
}

.doc4 {
    background: linear-gradient(135deg,#ec4899,#f9a8d4);
    animation: orbit4 4s infinite linear;
}

/*Document movement*/
@keyframes orbit1 {
    from {
        transform: rotate(0deg) translateX(90px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(90px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    from {
        transform: rotate(90deg) translateX(90px) rotate(-90deg);
    }

    to {
        transform: rotate(450deg) translateX(90px) rotate(-450deg);
    }
}

@keyframes orbit3 {
    from {
        transform: rotate(180deg) translateX(90px) rotate(-180deg);
    }

    to {
        transform: rotate(540deg) translateX(90px) rotate(-540deg);
    }
}

@keyframes orbit4 {
    from {
        transform: rotate(270deg) translateX(90px) rotate(-270deg);
    }

    to {
        transform: rotate(630deg) translateX(90px) rotate(-630deg);
    }
}

/*Floating particles*/
.ring {
    position: absolute;
    border: 2px solid rgba(16,49,117,.12);
    border-radius: 50%;
    pointer-events: none;
}

.ring1 {
    width: 80px;
    height: 80px;
    animation: pulseRing 2.5s infinite;
}

.ring2 {
    width: 80px;
    height: 80px;
    animation: pulseRing 2.5s .8s infinite;
}

.ring3 {
    width: 80px;
    height: 80px;
    animation: pulseRing 2.5s 1.6s infinite;
}

@keyframes pulseRing {

    0% {
        opacity: 0;
        transform: scale(1);
    }

    30% {
        opacity: .4;
    }

    100% {
        opacity: 0;
        transform: scale(2.2);
    }
}

/* Microsoft Style */
.sending-text {
    margin-top: 20px;
    font-family: "Segoe UI", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #103175;
    text-align: center;
    animation: fadePulse 2s ease-in-out infinite;
}

@keyframes fadePulse {
    0%,100% {
        opacity: .6;
    }

    50% {
        opacity: 1;
    }
}
