﻿/* Register page (loads after login-motion.css) */

/* Fields slide in; register.js sets the delay for each one */
.register-page .auth-field {
    animation: form-fade-up 0.6s ease-out both;
}

/* Shake on error */
#registerForm.is-shaking {
    animation: form-shake 0.45s ease-in-out;
}

/*  Read-only email from the invitation */
.auth-input-group.is-readonly {
    background: #f1f5f9;
}

    .auth-input-group.is-readonly .auth-input-control {
        background: transparent;
        color: #64748b;
        cursor: not-allowed;
    }

.readonly-lock {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #94a3b8;
    font-size: 0.85rem;
}
/*  Password strength  */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

    .password-strength[hidden] {
        display: none;
    }

.strength-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.strength-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.password-strength.is-weak .strength-fill {
    background: #dc2626;
}

.password-strength.is-weak .strength-label {
    color: #dc2626;
}

.password-strength.is-fair .strength-fill {
    background: #f59e0b;
}

.password-strength.is-fair .strength-label {
    color: #b45309;
}

.password-strength.is-good .strength-fill {
    background: #22c55e;
}

.password-strength.is-good .strength-label {
    color: #15803d;
}

.password-strength.is-strong .strength-fill {
    background: #0e4f46;
}

.password-strength.is-strong .strength-label {
    color: #0e4f46;
}

/* Passwords match */
.password-match {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

    .password-match[hidden] {
        display: none;
    }

    .password-match.is-match {
        color: #15803d;
    }

    .password-match.is-mismatch {
        color: #b45309;
    }

/* Success popup  */
.register-success-modal {
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.register-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: #dfe9df;
    color: #0e4f46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: success-pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.4) both;
}

.register-success-modal .modal-title {
    color: #0f291e;
}

.register-success-btn {
    background: #0e4f46;
    color: #fff;
    border: none;
    border-radius: 10px;
}

    .register-success-btn:hover {
        background: #0b433b;
        color: #fff;
    }

@keyframes success-pop {
    from {
        transform: scale(0.4);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Turn off motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    .register-page .auth-field,
    #registerForm.is-shaking,
    .register-success-icon {
        animation: none;
    }

    .strength-fill {
        transition: none;
    }
}
