/* CSS específico para a página de login */

/* Animações */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulseBorder {
    0% { border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.1); }
    50% { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.05); }
    100% { border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.1); }
}

@keyframes pulseText {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Classes de animação */
.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Botão de login */
.button-loading {
    cursor: not-allowed;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    transform: scale(0.98);
}

.button-content i {
    margin-right: 8px;
}

.button-loading .button-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.button-loading .loading-spinner {
    display: inline-block;
    position: static;
    transform: none;
    vertical-align: middle;
    font-weight: 600;
}

.button-loading .loading-spinner i {
    font-size: 1.2rem;
    color: white;
    margin-right: 8px;
}

/* Validação de formulário */
.input-success {
    border-color: #10B981 !important;
    background-color: rgba(16, 185, 129, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    transition: all 0.3s ease;
}

.input-error {
    border-color: #EF4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    transition: all 0.3s ease;
}

/* Ícones de validação */
.input-success + i,
.input-error + i {
    right: 15px;
    left: auto !important;
}

.input-success + i::after {
    content: '\f00c'; /* Ícone de check */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #10B981;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.input-error + i::after {
    content: '\f00d'; /* Ícone de X */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #EF4444;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Inputs do formulário */
#email, #password {
    transition: all 0.3s ease;
    padding-right: 40px; /* Espaço para o ícone de validação */
}

#email:focus, #password:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    outline: none;
}

/* Botão principal */
#loginButton {
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.25);
    position: relative;
    overflow: hidden;
}

#loginButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(139, 92, 246, 0.3);
}

#loginButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(139, 92, 246, 0.2);
}

/* Loading spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading-spinner i {
    font-size: 1.2rem;
    color: white;
}

/* Indicador de autenticação */
.auth-indicator {
    display: none;
    text-align: center;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.auth-indicator-content {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    padding: 12px;
    border: 1px dashed rgba(139, 92, 246, 0.3);
    animation: pulseBorder 2s infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}

.auth-spinner {
    display: inline-block;
    margin-right: 10px;
    color: #8B5CF6;
}

.auth-spinner i {
    font-size: 1.2rem;
}

.auth-text {
    font-weight: 500;
    color: #8B5CF6;
    animation: pulseText 1.5s infinite;
    letter-spacing: 0.5px;
}
