/* Animações avançadas para a página de vendas */

/* Animação de shake para validação de campos */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Animação para processamento de formulário */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Classes de animação */
.animate-progress {
    animation: progress 3s ease-in-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-fadeOut {
    animation: fadeOut 0.5s ease-out;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Animações para o overlay de processamento */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.processing-overlay.active {
    opacity: 1;
    visibility: visible;
}

.processing-content {
    width: 80%;
    max-width: 500px;
    background: rgba(11, 34, 57, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(1, 186, 239, 0.3);
    border: 1px solid rgba(1, 186, 239, 0.2);
}

.processing-step {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.5;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.processing-step.active {
    opacity: 1;
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--secondary-blue);
}

.processing-step.completed {
    opacity: 0.8;
    background: rgba(4, 222, 173, 0.1);
    border-left: 3px solid var(--secondary-green);
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--secondary-blue), var(--secondary-green));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.approval-message {
    text-align: center;
    margin-top: 30px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
}

.approval-message.show {
    opacity: 1;
    transform: scale(1);
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto 15px;
}

.checkmark-circle .background {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-green));
    position: absolute;
}

.checkmark-circle .checkmark {
    border-radius: 5px;
}

.checkmark-circle .checkmark.draw:after {
    animation-delay: 0.3s;
    animation-duration: 0.6s;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform: scaleX(-1) rotate(135deg);
    animation-fill-mode: forwards;
}

.checkmark-circle .checkmark:after {
    opacity: 0;
    height: 40px;
    width: 20px;
    transform-origin: left top;
    border-right: 4px solid #FFFFFF;
    border-top: 4px solid #FFFFFF;
    content: '';
    left: 25px;
    top: 40px;
    position: absolute;
}

@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: 20px;
        opacity: 1;
    }
    40% {
        height: 40px;
        width: 20px;
        opacity: 1;
    }
    100% {
        height: 40px;
        width: 20px;
        opacity: 1;
    }
}

/* Efeitos para inputs */
.input-pulse {
    animation: input-pulse 2s ease-in-out;
}

@keyframes input-pulse {
    0% { box-shadow: 0 0 0 0 rgba(1, 186, 239, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(1, 186, 239, 0); }
    100% { box-shadow: 0 0 0 0 rgba(1, 186, 239, 0); }
}

/* Animação dos elementos flutuantes */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-element-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes float-slow {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(15px) rotate(-3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Animate dots for loading */
.loading-dots:after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Pulse animation for badges */
.badge-pulse {
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 175, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(251, 175, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 175, 0, 0);
    }
}
