/* Password Reset Form Styles - Updated to match register.css */

/* Form Styles */
.auth-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.auth-heading {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333;
    text-align: center;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #8541d4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(133, 65, 212, 0.2);
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #8541d4;
    color: white;
}

.btn-primary:hover {
    background-color: #7030b8;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-link {
    color: #8541d4;
    text-decoration: none;
    font-size: 14px;
}

.auth-link:hover {
    text-decoration: underline;
}

.error-message {
    color: #ff0000;
    font-size: 0.8rem;
    margin-top: 4px;
    margin-bottom: 0.25rem;
    display: none;
    text-align: left;
    width: 100%;
    animation: fadeIn 0.3s ease;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.field-errors {
    margin-top: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Password Reset Styling - following project style patterns */

/* Remove duplicated base styles that should be inherited from base_auth.css */

/* Password Reset specific styling */
.password-reset-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 2rem;
    background-color: #1f1f2e; /* Dark background */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #fff; /* Light text for dark background */
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 1.5rem; /* Reduce bottom padding */
}

.password-reset-container h2 {
    margin-bottom: 1rem;
    color: #a17fe0; /* Light purple for dark theme */
    font-weight: 600;
    font-size: 1.8rem;
}

.password-reset-container p {
    margin-bottom: 1.5rem;
    color: #b8b8c7; /* Light gray text */
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form elements styling */
.input-container {
    margin-bottom: 15px;
    width: 100%;
    max-width: 340px;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-container input {
    height: 2.6rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    padding-right: 40px; /* Add extra padding for the icon */
    width: 100%;
    border: 1px solid #3d3d57; /* Dark border */
    background-color: #2a2a3d; /* Dark input background */
    border-radius: 6px;
    font-size: 14px;
    color: #fff; /* Light text for input */
    transition: all 0.3s ease;
}

.input-container input::placeholder {
    color: #6c6c84; /* Lighter text for placeholder */
}

.input-container input:focus {
    outline: none;
    border-color: #7602b9 !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.034) !important;
}

.input-container input.error {
    border: 1px solid var(--error-color) !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1) !important;
}

.input-container input.valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Error message styling */
.error-message {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 4px;
    margin-bottom: 0.25rem;
    display: none;
    text-align: left;
    width: 100%;
    animation: fadeIn 0.3s ease;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Show error message when input has error class */
.input-container.error .error-message {
    display: block;
}

/* Password container specific styles - EXACTLY like register.css */
.password-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin-bottom: 15px;
    display: block; /* Ensure proper display type */
}

.password-container input {
    width: 100%;
    height: 2.6rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    padding-right: 40px !important; /* Ensure space for the icon */
    border: 1px solid #3d3d57;
    background-color: #2a2a3d;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

/* Toggle password visibility icon - EXACTLY like register.css */
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Ensure clickability */
    background-color: transparent; /* Ensure no background interferes */
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password::before {
    content: "\f070"; /* Font Awesome eye-slash icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--accent-color);
    font-size: 16px;
    opacity: 0.8;
}

.toggle-password.visible::before {
    content: "\f06e"; /* Font Awesome eye icon */
}

/* Ensure proper spacing between password fields */
.password-container + .password-container {
    margin-top: 20px;
}

/* Remove any redundant margins that might be causing extra space */
.password-reset-container > p:last-of-type {
    margin-bottom: 1rem;
}

/* Button styling - Updated to match register.css styling */
#reset_button {
    flex: 1;
    height: 2.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    width: 100%;
    max-width: 340px;
    padding: 12px 24px;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(255, 51, 112, 0.25);
}

#reset_button:hover {
    background: var(--gradient-button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(255, 51, 112, 0.3);
}

#reset_button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#reset_button:disabled {
    background: var(--disabled-bg);
    color: var(--disabled-text);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Login link styling */
.login-text {
    font-size: 14px;
    margin-top: 1rem;
    margin-bottom: 0;
    color: #b8b8c7; /* Light gray text */
}

.login-text a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding-bottom: 1px;
}

.login-text a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.login-text a:hover::after {
    width: 100%;
}

.login-text a:hover {
    color: var(--accent-hover);
}

/* Additional styles for email sent page */
.email-sent-icon, .success-icon {
    font-size: 3.5rem;
    color: #a17fe0;
    margin-bottom: 1rem;
}

.success-icon {
    color: #4caf50;
}

.additional-info {
    font-size: 0.85rem;
    color: #9898a7;
    font-style: italic;
}

/* Password strength meter */
.password-strength-meter {
    height: 4px;
    background-color: #333344;
    margin-top: 8px;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
}

.strength-weak { background-color: #ff3b3b; width: 25%; }
.strength-fair { background-color: #ff9800; width: 50%; }
.strength-good { background-color: #2196f3; width: 75%; }
.strength-strong { background-color: #4caf50; width: 100%; }

.password-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: left;
}

/* Invalid link message */
.invalid-link-message {
    background-color: rgba(255, 82, 82, 0.1);
    border-left: 3px solid #ff5252;
    padding: 1rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.invalid-link-message a {
    color: #a17fe0;
    text-decoration: none;
    font-weight: 600;
}

.invalid-link-message a:hover {
    text-decoration: underline;
}

/* Login button on complete page */
.btn-login {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: #8541d4;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1rem;
}

.btn-login:hover {
    background-color: #9b5ae9;
    color: white;
    text-decoration: none;
}

/* Real-time validation feedback styles */
.validation-feedback {
    font-size: 0.75rem;
    margin-top: 5px;
    min-height: 18px;
}

.valid-feedback {
    color: #4caf50;
    display: block;
}

.invalid-feedback {
    color: #f44336;
    display: block;
}

/* Password requirements list - Modified to hide by default */
.password-requirements {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: left;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Class to hide requirements */
.hidden-requirements {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.password-requirements ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
}

.password-requirements li {
    margin-bottom: 3px;
    position: relative;
    padding-left: 20px;
}

.password-requirements li:before {
    content: "•";
    color: var(--text-muted);
    position: absolute;
    left: 5px;
}

.password-requirements li.met:before {
    content: "✓";
    color: #4caf50;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .password-reset-container {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    button {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Button Animation */
.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* Enhanced error message styling for password match */
.password-match-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 4px;
    text-align: left;
    display: none;
    animation: fadeIn 0.3s ease;
    font-weight: 500;
}

/* Input validation states */
.password-container input.error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2) !important;
}
