/* Importa todas as validações visuais do login */
@import url('login.css');

/* ==================== CUSTOMIZAÇÕES ESPECÍFICAS DO REGISTER ==================== */

/* Container adaptado para mais campos */
.auth-container {
    max-width: 520px;
    padding: 35px;
}

/* Progresso do formulário */
.form-progress {
    width: 100%;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    margin-bottom: 25px;
    overflow: hidden;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #062552 0%, #7898f7 100%);
    transition: width 0.5s ease;
    border-radius: 2px;
    width: 0%;
}

/* Indicador de força da senha */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

.password-strength.weak,
.password-strength.medium,
.password-strength.strong {
    opacity: 1;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: linear-gradient(135deg, #9ad778 0%, #51cf66 100%);
}

.password-strength-text {
    font-size: 12px;
    margin-top: 6px;
    transition: color 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.password-strength.weak .password-strength-text {
    color: #ff6b6b;
}

.password-strength.medium .password-strength-text {
    color: #feca57;
}

.password-strength.strong .password-strength-text {
    color: #9ad778;
}

/* Requisitos da senha */
.password-requirements {
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.password-requirements.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    padding: 12px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #888;
    transition: color 0.3s ease;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement.valid {
    color: #9ad778;
}

.requirement i {
    font-size: 10px;
    width: 12px;
    transition: all 0.2s ease;
}

.requirement.valid i {
    transform: scale(1.2);
}

/* Ícones de validação */
.validation-icon {
    display: none !important;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.validation-icon.success {
    opacity: 1;
    color: #9ad778;
    transform: translateY(-50%) scale(1.1);
}

.validation-icon.error {
    opacity: 1;
    color: #ff6b6b;
    transform: translateY(-50%) scale(1.1);
}

/* Ajuste para campos com toggle de senha */
.password-group .validation-icon {
    right: 45px;
}

/* Estados de validação para campos */
.form-input.valid {
    /* border-color: #9ad778;
    background-color: rgb(72 202 0 / 3%);
    box-shadow: 0 0 0 3px rgb(72 202 0 / 8%); */
}

.form-input.invalid {
    border-color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Grupos de formulário com validação */
.form-group.success .form-label {
    /* color: #9ad778; */
}

.form-group.error .form-label {
    color: #ff6b6b;
}

/* Checkbox com validação */
.checkbox-group.error .checkbox-label {
    color: #ff6b6b;
}

.checkbox-group.error .checkbox-input {
    accent-color: #ff6b6b;
}

.checkbox-group.success .checkbox-label {
    /* color: #9ad778; */
}

.checkbox-group.success .checkbox-input {
    /* accent-color: #9ad778; */
}

/* Animação para checkboxes */
.checkbox-input {
    transition: all 0.2s ease;
}

.checkbox-input:checked {
    transform: scale(1.05);
}

/* Estados do botão */
.btn-primary.ready {
    box-shadow: 0 4px 15px rgba(88, 0, 202, 0.3);
}

.btn-primary.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(96, 1, 219, 0.3);
}

#registerBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6f89ff 0%, #905bc5 100%);
}

#registerBtn.loading {
    background: linear-gradient(135deg, #888 0%, #666 100%);
    cursor: wait;
}

/* Animação de shake melhorada */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(8px); }
    30% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

/* Melhorias na mensagem de erro summary */
.error-summary {
    animation: slideInFromTop 0.5s ease-out;
}

.error-summary strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.error-summary ul {
    margin: 0;
    padding-left: 16px;
}

.error-summary li {
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Animação de entrada para error summary */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade específica do registro */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
        padding: 25px 20px;
    }
    
    .form-progress {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px 15px;
    }
    
    .password-requirements {
        font-size: 11px;
        padding: 10px;
    }
    
    .requirement {
        gap: 6px;
        margin-bottom: 4px;
    }
    
    .validation-icon {
        right: 8px;
        font-size: 12px;
    }
    
    .password-group .validation-icon {
        right: 40px;
    }
}

/* Estados de foco melhorados */
.form-input:focus.valid {
    border-color: #9ad778;
    box-shadow: 0 0 0 3px rgba(72, 202, 0, 0.2);
}

.form-input:focus.invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Melhorias no toggle de senha */
.password-toggle:hover {
    color: #6eaeff;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

/* Transições suaves para todos os elementos */
* {
    transition: border-color 0.3s ease, 
                box-shadow 0.3s ease, 
                background-color 0.3s ease, 
                color 0.3s ease, 
                transform 0.2s ease;
}

/* Loading states */
.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #1a1a1a;
}

.checkbox-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Acessibilidade aprimorada */
.form-input:focus-visible {
    outline: 2px solid #6eaeff;
    outline-offset: 2px;
}

.checkbox-input:focus-visible {
    outline: 2px solid #6eaeff;
    outline-offset: 2px;
}

/* Micro-interações */
.form-input:hover:not(:disabled):not(:focus) {
    border-color: #555;
}

.checkbox-label:hover {
    color: #fff;
}

/* Indicador de progresso animado */
.form-progress-bar {
    background: linear-gradient(135deg, #6eaeff 0%, #764ba2 50%, #9ad778 100%);
    background-size: 200% 100%;
    animation: progressShimmer 2s ease-in-out infinite;
}

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