/**
 * Forgot Password Modal Styles
 * Custom styling for the forgot password modal and its components
 */

/* Modal Overlay */
#forgotPasswordModal .modal-dialog {
    max-width: 500px;
}

#forgotPasswordModal .modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#forgotPasswordModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 1.5rem 1rem;
}

#forgotPasswordModal .modal-title {
    font-weight: 600;
    color: #2c3e50;
}

#forgotPasswordModal .modal-body {
    padding: 1.5rem;
}

/* Step Transitions */
.forgot-password-step {
    transition: all 0.3s ease-in-out;
}

.forgot-password-step.d-none {
    display: none !important;
}

/* Step Icons */
.forgot-password-step .bx {
    transition: all 0.3s ease;
}

.forgot-password-step .text-primary {
    color: #5a8dee !important;
}

.forgot-password-step .text-success {
    color: #71dd37 !important;
}

/* Form Styling */
#forgotPasswordModal .form-label {
    font-weight: 500;
    color: #5a6a85;
    margin-bottom: 0.5rem;
}

#forgotPasswordModal .form-control {
    border-radius: 30px;
    border: 1px solid #d9dee3;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

#forgotPasswordModal .form-control:focus {
    border-color: #5a8dee;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

#forgotPasswordModal .form-control.is-invalid {
    border-color: #ff3e1d;
}

#forgotPasswordModal .form-control.is-invalid:focus {
    border-color: #ff3e1d;
    box-shadow: 0 0 0 0.2rem rgba(255, 62, 29, 0.25);
}

/* Verification Code Inputs */
.auth-input-wrapper {
    gap: 0.5rem;
}

.auth-input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #d9dee3;
    transition: all 0.2s ease;
}

.auth-input:focus {
    border-color: #5a8dee;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    transform: scale(1.05);
}

.auth-input.is-invalid {
    border-color: #ff3e1d;
}

/* Button Styling */
#forgotPasswordModal .btn {
    border-radius: 30px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

#forgotPasswordModal .btn-primary {
    background-color: #5a8dee;
    border-color: #5a8dee;
}

#forgotPasswordModal .btn-primary:hover {
    background-color: #5f63f2;
    border-color: #5f63f2;
    transform: translateY(-1px);
}

#forgotPasswordModal .btn-success {
    background-color: #71dd37;
    border-color: #71dd37;
}

#forgotPasswordModal .btn-success:hover {
    background-color: #64c92a;
    border-color: #64c92a;
    transform: translateY(-1px);
}

#forgotPasswordModal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Error Messages */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ff3e1d;
}

.invalid-feedback.show {
    display: block;
}

/* Resend Code Link */
#resendCodeLink {
    color: #5a8dee;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

#resendCodeLink:hover {
    color: #5f63f2;
    text-decoration: underline;
}

/* Countdown State for Resend Code Link */
#resendCodeLink[style*="color: #6c757d"] {
    color: #6c757d !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.6;
    text-decoration: none !important;
}

#resendCodeLink[style*="color: #6c757d"]:hover {
    color: #6c757d !important;
    text-decoration: none !important;
}

/* Password Toggle */
.input-group-text.cursor-pointer {
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-group-text.cursor-pointer:hover {
    color: #5a8dee;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    #forgotPasswordModal .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
    
    #forgotPasswordModal .modal-body {
        padding: 1rem;
    }
    
    .auth-input {
        width: 40px;
        height: 45px;
        font-size: 1rem;
    }
    
    .auth-input-wrapper {
        gap: 0.25rem;
    }
}

/* Animation for Step Changes */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.forgot-password-step {
    animation: slideInRight 0.3s ease-out;
}

/* Success Step Animation */
#forgotPasswordStep4 {
    animation: slideInLeft 0.3s ease-out;
}

/* Focus States */
#forgotPasswordModal .form-control:focus,
#forgotPasswordModal .auth-input:focus {
    outline: none;
}

/* Custom Scrollbar for Modal */
#forgotPasswordModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#forgotPasswordModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#forgotPasswordModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#forgotPasswordModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Temporary Message Styling */
.alert.position-fixed {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Support */
[dir="rtl"] .forgot-password-step {
    animation: slideInLeft 0.3s ease-out;
}

[dir="rtl"] #forgotPasswordStep4 {
    animation: slideInRight 0.3s ease-out;
}

/* Signup Modal Styles - Must match Forgot Password Modal exactly */
#signupModal .modal-dialog {
    max-width: 500px;
}

#signupModal .modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#signupModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 1.5rem 1rem;
}

#signupModal .modal-title {
    font-weight: 600;
    color: #2c3e50;
}

#signupModal .modal-body {
    padding: 1.5rem;
}

/* Step Transitions for Signup */
.signup-step {
    transition: all 0.3s ease-in-out;
}

.signup-step.d-none {
    display: none !important;
}

/* Step Icons for Signup */
.signup-step .bx {
    transition: all 0.3s ease;
}

.signup-step .text-primary {
    color: #5a8dee !important;
}

.signup-step .text-success {
    color: #71dd37 !important;
}

/* Form Styling for Signup */
#signupModal .form-label {
    font-weight: 500;
    color: #5a6a85;
    margin-bottom: 0.5rem;
}

#signupModal .form-control {
    border-radius: 30px;
    border: 1px solid #d9dee3;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

#signupModal .form-control:focus {
    border-color: #5a8dee;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

#signupModal .form-control.is-invalid {
    border-color: #ff3e1d;
}

#signupModal .form-control.is-invalid:focus {
    border-color: #ff3e1d;
    box-shadow: 0 0 0 0.2rem rgba(255, 62, 29, 0.25);
}

/* Verification Code Inputs for Signup - Match Forgot Password exactly */
#signupModal .auth-input-wrapper {
    gap: 0.5rem;
}

#signupModal .auth-input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #d9dee3;
    transition: all 0.2s ease;
}

#signupModal .auth-input:focus {
    border-color: #5a8dee;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    transform: scale(1.05);
}

#signupModal .auth-input.is-invalid {
    border-color: #ff3e1d;
}

/* Button Styling for Signup */
#signupModal .btn {
    border-radius: 30px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

#signupModal .btn-primary {
    background-color: #5a8dee;
    border-color: #5a8dee;
}

#signupModal .btn-primary:hover {
    background-color: #5f63f2;
    border-color: #5f63f2;
    transform: translateY(-1px);
}

#signupModal .btn-success {
    background-color: #71dd37;
    border-color: #71dd37;
}

#signupModal .btn-success:hover {
    background-color: #64c92a;
    border-color: #64c92a;
    transform: translateY(-1px);
}

#signupModal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Error Messages for Signup */
#signupModal .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ff3e1d;
}

#signupModal .invalid-feedback.show {
    display: block;
}

/* Resend Code Link for Signup */
#resendSignupCodeLink {
    color: #5a8dee;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

#resendSignupCodeLink:hover {
    color: #5f63f2;
    text-decoration: underline;
}

/* Countdown State for Signup Resend Code Link */
#resendSignupCodeLink[style*="color: #6c757d"] {
    color: #6c757d !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.6;
    text-decoration: none !important;
}

#resendSignupCodeLink[style*="color: #6c757d"]:hover {
    color: #6c757d !important;
    text-decoration: none !important;
}

/* Password Toggle for Signup */
#signupModal .input-group-text.cursor-pointer {
    cursor: pointer;
    transition: color 0.2s ease;
}

#signupModal .input-group-text.cursor-pointer:hover {
    color: #5a8dee;
}

/* Mobile Responsive for Signup */
@media (max-width: 576px) {
    #signupModal .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
    
    #signupModal .modal-body {
        padding: 1rem;
    }
    
    #signupModal .auth-input {
        width: 40px;
        height: 45px;
        font-size: 1rem;
    }
    
    #signupModal .auth-input-wrapper {
        gap: 0.25rem;
    }
}

/* Animation for Step Changes in Signup */
.signup-step {
    animation: slideInRight 0.3s ease-out;
}

/* Success Step Animation for Signup */
#signupStep4 {
    animation: slideInLeft 0.3s ease-out;
}

/* Focus States for Signup */
#signupModal .form-control:focus,
#signupModal .auth-input:focus {
    outline: none;
}

/* Custom Scrollbar for Signup Modal */
#signupModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#signupModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#signupModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#signupModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* RTL Support for Signup */
[dir="rtl"] .signup-step {
    animation: slideInLeft 0.3s ease-out;
}

[dir="rtl"] #signupStep4 {
    animation: slideInRight 0.3s ease-out;
}

/* Dark Mode Support (if needed) */
@media (color-scheme: dark) {
    #forgotPasswordModal .modal-content,
    #signupModal .modal-content {
        background-color: #2b2c40;
        color: #a7a9c0;
    }
    
    #forgotPasswordModal .modal-header,
    #signupModal .modal-header {
        border-bottom-color: #3b3d56;
    }
    
    #forgotPasswordModal .form-control,
    #signupModal .form-control {
        background-color: #3b3d56;
        border-color: #4a4d6a;
        color: #a7a9c0;
    }
    
    #forgotPasswordModal .form-control:focus,
    #signupModal .form-control:focus {
        background-color: #3b3d56;
        border-color: #5a8dee;
        color: #a7a9c0;
    }
    
    #forgotPasswordModal .auth-input,
    #signupModal .auth-input {
        background-color: #3b3d56;
        border-color: #4a4d6a;
        color: #a7a9c0;
    }
}
