/* ================================================================
   PASSWORD RESET STYLES
   Theme-aware styling for light/dark modes
   Uses global CSS variables from theme-variables.css
   ================================================================ */

/* ===== Password Reset Container ===== */
.password-reset-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    color: var(--text-primary);
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.password-reset-container h2 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .password-reset-container h2 {
    text-shadow: 0 0 20px var(--accent-purple-30);
}

.password-reset-container p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Input Container ===== */
.input-container {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 340px;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-container input {
    height: 3rem;
    padding: 0.75rem 1rem;
    width: 100%;
    border: 1px solid var(--border-light);
    background-color: var(--bg-elevated);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}

.input-container input::placeholder {
    color: var(--text-muted);
}

.input-container input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px var(--accent-purple-15);
    background-color: var(--bg-card);
}

.input-container input.error {
    border: 1px solid var(--error-text) !important;
    box-shadow: 0 0 0 4px var(--error-bg) !important;
}

.input-container input.valid {
    border-color: var(--success-text) !important;
    box-shadow: 0 0 0 4px var(--success-bg);
}

/* ===== Error Message Styling ===== */
.error-message {
    color: var(--error-text);
    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); }
}

.input-container.error .error-message {
    display: block;
}

/* ===== Password Container ===== */
.password-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin-bottom: 1rem;
    display: block;
}

.password-container input {
    width: 100%;
    height: 3rem;
    padding: 0.75rem 1rem;
    padding-right: 44px !important;
    border: 1px solid var(--border-light);
    background-color: var(--bg-elevated);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.password-container input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px var(--accent-purple-15);
    background-color: var(--bg-card);
}

/* ===== Toggle Password ===== */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background-color: transparent;
    border-radius: 6px;
}

.toggle-password:hover {
    opacity: 1;
    background: var(--accent-purple-10);
}

.toggle-password::before {
    content: "\f070";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--accent-purple);
    font-size: 16px;
    transition: color 0.2s ease;
}

.toggle-password.visible::before {
    content: "\f06e";
}

.password-container + .password-container {
    margin-top: 1.25rem;
}

.password-reset-container > p:last-of-type {
    margin-bottom: 1rem;
}

/* ===== Reset Button ===== */
#reset_button {
    height: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    width: 100%;
    max-width: 340px;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

#reset_button:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
}

#reset_button:active:not([disabled]) {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

#reset_button:disabled {
    background: var(--bg-disabled);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ===== Login Link ===== */
.login-text {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

.login-text a {
    color: var(--accent-pink);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

[data-theme="light"] .login-text a {
    color: var(--accent-purple);
}

.login-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.login-text a:hover::after {
    width: 100%;
}

.login-text a:hover {
    color: var(--accent-purple);
}

[data-theme="light"] .login-text a:hover {
    color: var(--accent-pink);
}

/* ===== Email Sent & Success Icons ===== */
.email-sent-icon, .success-icon {
    font-size: 3.5rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
}

.success-icon {
    color: var(--success-text);
}

.additional-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Password Strength Meter ===== */
.password-strength-meter {
    height: 4px;
    background-color: var(--border-medium);
    margin-top: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak { 
    background: linear-gradient(90deg, var(--error-text), #ff6b6b);
    width: 25%; 
}

.strength-fair { 
    background: linear-gradient(90deg, var(--warning-text), #ffb347);
    width: 50%; 
}

.strength-good { 
    background: linear-gradient(90deg, var(--info-text), var(--accent-cyan));
    width: 75%; 
}

.strength-strong { 
    background: linear-gradient(90deg, var(--success-text), #69f0ae);
    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: var(--error-bg);
    border-left: 3px solid var(--error-text);
    padding: 1rem;
    text-align: left;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.invalid-link-message a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.invalid-link-message a:hover {
    text-decoration: underline;
}

/* ===== Login Button (Complete Page) ===== */
.btn-login {
    display: inline-block;
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient-primary);
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
    color: #ffffff;
    text-decoration: none;
}

/* ===== Validation Feedback ===== */
.validation-feedback {
    font-size: 0.75rem;
    margin-top: 5px;
    min-height: 18px;
}

.valid-feedback {
    color: var(--success-text);
    display: block;
}

.invalid-feedback {
    color: var(--error-text);
    display: block;
}

/* ===== Password Requirements ===== */
.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;
}

.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: 4px;
    position: relative;
    padding-left: 22px;
    color: var(--text-secondary);
}

.password-requirements li:before {
    content: "•";
    color: var(--text-muted);
    position: absolute;
    left: 5px;
}

.password-requirements li.met {
    color: var(--success-text);
}

.password-requirements li.met:before {
    content: "✓";
    color: var(--success-text);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .password-reset-container {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    button {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===== Button Shake 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); }
}

/* ===== Password Match Error ===== */
.password-match-error {
    color: var(--error-text);
    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: var(--error-text) !important;
    box-shadow: 0 0 0 4px var(--error-bg) !important;
}
