/* Forgot Password Page Styles */

/********** CSS Variables **********/
:root {
    --forgot-bg: #f5f5f5;
    --forgot-card-bg: #ffffff;
    --forgot-text: #333333;
    --forgot-text-muted: #666666;
    --forgot-border: #e0e0e0;
    --forgot-input-bg: #f9f9f9;
    --forgot-primary: #117e96;
    --forgot-primary-hover: #0d6a7f;
    --forgot-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --forgot-google-hover-bg: #eeeeee;
}

:root[app-theme='dark'] {
    --forgot-bg: #0a0a0a;
    --forgot-card-bg: #1a1a1a;
    --forgot-text: #eeeeee;
    --forgot-text-muted: #aaaaaa;
    --forgot-border: #333333;
    --forgot-input-bg: #252525;
    --forgot-primary: #117e96;
    --forgot-primary-hover: #13aeab;
    --forgot-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --forgot-google-hover-bg: #2a2a2a;
}

/********** Base Styles **********/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--forgot-bg);
    color: var(--forgot-text);
    line-height: 1.6;
}

/********** Page Layout **********/
.forgot-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.forgot-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.forgot-card {
    width: 100%;
    max-width: 400px;
}

/* Logo */
.forgot-logo {
    text-align: center;
    margin-bottom: 30px;
}

.forgot-logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--forgot-text);
    font-size: 24px;
    font-weight: 700;
}

.forgot-logo i {
    color: var(--forgot-primary);
    font-size: 32px;
}

/* Card */
.forgot-card {
    background: var(--forgot-card-bg);
    border-radius: 1rem;
    box-shadow: var(--forgot-shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--forgot-primary);
    padding: 1rem 1.5rem;
}

.forgot-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.card-header .theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    transition: background 0.2s;
}

.card-header .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Description */
.forgot-desc {
    color: var(--forgot-text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px;
}

/* Form */
.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--forgot-text);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > i:first-child {
    position: absolute;
    left: 1rem;
    color: var(--forgot-text-muted);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 1rem;
    border: 1px solid var(--forgot-border);
    border-radius: 0.5rem;
    background: var(--forgot-input-bg);
    color: var(--forgot-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Password input needs extra right padding for toggle button */
input[type="password"].form-input {
    padding-right: 3rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--forgot-primary);
    box-shadow: 0 0 0 3px rgba(17, 126, 150, 0.15);
}

.form-input::placeholder {
    color: var(--forgot-text-muted);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--forgot-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--forgot-primary-hover);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit .loading-icon {
    display: none;
}

.btn-submit.loading .loading-icon {
    display: inline-block;
    position: absolute;
}

.btn-submit.loading span {
    visibility: hidden;
}

.btn-submit {
    position: relative;
}

/* Form Footer */
.form-footer {
    margin-top: 20px;
    text-align: center;
}

.form-footer a {
    color: var(--forgot-primary);
    text-decoration: none;
    font-size: 14px;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-footer a.btn-submit {
    color: #fff;
}

.form-footer a.btn-submit:hover {
    text-decoration: none;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-message i {
    font-size: 48px;
    color: #22c55e;
    margin-bottom: 16px;
}

.success-message p {
    color: var(--forgot-text);
    font-size: 16px;
    line-height: 1.5;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--forgot-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--forgot-primary);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--forgot-border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar span.weak {
    background: #ef4444;
}

.strength-bar span.medium {
    background: #f59e0b;
}

.strength-bar span.strong {
    background: #22c55e;
}

.strength-text {
    font-size: 12px;
    color: var(--forgot-text-muted);
    min-width: 50px;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 20px 0;
}

.error-message i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-message p {
    color: var(--forgot-text);
    font-size: 16px;
    line-height: 1.5;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--forgot-card-bg);
    color: var(--forgot-text);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

/********** Form Message **********/
.form-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.form-message.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.form-message.success {
    display: block;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

/********** Divider **********/
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--forgot-border);
}

.login-divider span {
    font-size: 0.85rem;
    color: var(--forgot-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/********** Google Button **********/
.btn-google {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--forgot-text);
    background: var(--forgot-input-bg);
    border: 1px solid var(--forgot-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-google:hover {
    background: var(--forgot-google-hover-bg);
    border-color: var(--forgot-primary);
}

.btn-google svg {
    flex-shrink: 0;
}

.btn-google .google-loading {
    display: none;
}

.btn-google.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-google.loading .google-icon {
    display: none;
}

.btn-google.loading .google-loading {
    display: inline-block;
}

/********** Login Footer **********/
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--forgot-text-muted);
}

.login-footer a {
    color: var(--forgot-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.25rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/********** Site Footer **********/
.site-footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--forgot-text-muted);
    background: transparent;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-content a {
    color: var(--forgot-text-muted);
    text-decoration: none;
}

.footer-content a:hover {
    color: var(--forgot-primary);
}

.footer-divider {
    color: var(--forgot-border);
}

/* Responsive */
@media (max-width: 480px) {
    .forgot-container {
        max-width: 100%;
    }
    
    .card-body {
        padding: 20px 16px;
    }
}
