/* 
 * RiggoMusic Authentication Styles
 * --------------------------------
 */

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Classes de Animação */
.animate__animated {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.animate__fadeIn {
    animation-name: fadeIn;
}

.animate__fadeOut {
    animation-name: fadeOut;
}

.animate__bounceIn {
    animation: scaleIn 0.3s ease-out;
}

/* Estilo do Menu do Usuário */
#user-dropdown-menu {
    transform-origin: top right;
    animation: scaleIn 0.2s ease-in-out;
    background: #111;
}

.rotate-180 {
    transform: rotate(180deg);
}

#user-menu-button .fa-chevron-down {
    transition: transform 0.2s ease-in-out;
}

/* Efeitos de Hover */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Transições */
.transition-all {
    transition: all 0.2s ease-in-out;
}

.transition-colors {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Input Focus */
.focus\:border-blue-500:focus {
    border-color: #3B82F6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Estilos de Erro */
.border-red-500 {
    border-color: #EF4444 !important;
}

.error-shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Z-index para modais e menus */
.z-50 {
    z-index: 50;
}

/* Estilo do backdrop do modal */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Estilo do modal */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Estilos do botão de loading */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner de Loading */
.fa-spin {
    animation: spin 1s linear infinite;
}

/* Mensagens de Feedback */
.riggomusic-message {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 24rem;
}

.riggomusic-message.error {
    background-color: rgba(239, 68, 68, 0.9);
}

.riggomusic-message.success {
    background-color: rgba(34, 197, 94, 0.9);
}

/* Responsividade */
@media (max-width: 640px) {
    .max-w-md {
        width: 90%;
        margin: 0 auto;
    }
    
    #user-dropdown-menu {
        width: calc(100vw - 2rem);
        max-width: 20rem;
        right: -0.5rem;
    }
}

/* Foco de acessibilidade */
.focus-visible:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Personalizações para inputs de formulário */
input[type="text"], 
input[type="email"], 
input[type="password"] {
    font-size: 16px; /* Prevenir zoom em dispositivos móveis */
}

/* Estilo para código de verificação */
input[name="reset_code"] {
    letter-spacing: 0.5em;
    text-align: center;
}

/* Estilos para botões de alternância de senha */
.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
}

.toggle-password:focus {
    outline: none;
}

/* Melhorias de acessibilidade para cores de contraste */
.text-gray-400 {
    color: rgba(156, 163, 175, 1);
}

.text-blue-400 {
    color: rgba(96, 165, 250, 1);
}

.hover\:text-blue-300:hover {
    color: rgba(147, 197, 253, 1);
}