/**
 * FV Core Login Page Styles
 *
 * @package FV_App_Core
 */

/* Login Container */
.fv-login-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 48px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-align: center;
}

/* Header */
.fv-login-header {
    margin-bottom: 32px;
}

.fv-login-logo {
    margin-bottom: 24px;
}

.fv-login-logo svg {
    width: 64px;
    height: 64px;
}

.fv-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.fv-login-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0;
}

/* Social Buttons Container */
.fv-login-buttons {
    margin: 24px 0;
}

/* Style Nextend buttons */
.fv-login-container .nsl-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fv-login-container .nsl-container-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fv-login-container .nsl-button {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.fv-login-container .nsl-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Separator */
.fv-login-container .nsl-separator {
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

/* Error Message */
.fv-login-error {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* Benefits Section */
.fv-login-benefits {
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border-radius: 12px;
}

.fv-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.fv-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.fv-benefit-item:last-child {
    margin-bottom: 0;
}

.fv-benefit-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fv-benefit-item span {
    flex: 1;
}

/* Social Proof Section */
.fv-login-social-proof {
    margin: 32px 0 0 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.fv-testimonial {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.fv-testimonial-stars {
    color: #fbbf24;
    font-size: 18px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.fv-testimonial-text {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    font-style: italic;
    margin: 0 0 8px 0;
}

.fv-testimonial-author {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.fv-stats {
    display: flex;
    justify-content: space-around;
    gap: 24px;
}

.fv-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fv-stat strong {
    font-size: 24px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
}

.fv-stat span {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
.fv-login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.fv-login-terms {
    font-size: 12px;
    color: #888888;
    line-height: 1.6;
    margin: 0;
}

.fv-login-terms a {
    color: #dc2626;
    text-decoration: none;
}

.fv-login-terms a:hover {
    text-decoration: underline;
}

/* Logged In State */
.fv-login-logged-in .fv-login-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.fv-login-logged-in .fv-login-header p {
    color: #666;
    margin: 0;
}

.fv-login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Buttons */
.fv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fv-btn-primary {
    background: #dc2626;
    color: #ffffff;
    border: none;
}

.fv-btn-primary:hover {
    background: #b91c1c;
    color: #ffffff;
}

.fv-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
}

.fv-btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Style Variations */
.fv-login-style-minimal {
    background: transparent;
    box-shadow: none;
    padding: 20px;
}

.fv-login-style-minimal .fv-login-footer {
    border-top: none;
}

.fv-login-style-fullwidth {
    max-width: none;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0;
}

/* Page Background */
body.fv-login-page {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    min-height: 100vh;
}

/* Responsive */
@media (max-width: 480px) {
    .fv-login-container {
        margin: 20px;
        padding: 28px;
        border-radius: 16px;
    }

    .fv-login-title {
        font-size: 22px;
    }

    .fv-login-subtitle {
        font-size: 14px;
    }

    .fv-login-logo svg {
        width: 48px;
        height: 48px;
    }

    .fv-login-benefits {
        padding: 20px;
    }

    .fv-benefit-item {
        font-size: 13px;
        gap: 10px;
    }

    .fv-login-social-proof {
        padding: 20px;
    }

    .fv-testimonial-text {
        font-size: 14px;
    }

    .fv-stats {
        flex-direction: column;
        gap: 16px;
    }

    .fv-stat strong {
        font-size: 20px;
    }
}

/* ========================================
   Email/Password Login Form
   ======================================== */

/* Login Form */
.fv-login-form {
    margin-bottom: 24px;
}

.fv-form-group {
    margin-bottom: 16px;
}

.fv-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
    text-align: left;
}

.fv-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.fv-form-input:focus {
    outline: none;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.fv-password-wrapper {
    position: relative;
}

.fv-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.fv-password-toggle:hover {
    color: #374151;
}

.fv-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.fv-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.fv-forgot-link {
    color: #DC2626;
    text-decoration: none;
    font-size: 14px;
}

.fv-forgot-link:hover {
    text-decoration: underline;
}

.fv-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: #DC2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.fv-submit-btn:hover {
    background: #b91c1c;
}

.fv-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Login Error - Updated styles */
.fv-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: left;
}

/* ========================================
   Login Divider
   ======================================== */

.fv-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 14px;
}

.fv-login-divider::before,
.fv-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.fv-login-divider span {
    padding: 0 16px;
}

/* ========================================
   Account Link
   ======================================== */

.fv-account-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.fv-account-link a {
    color: #DC2626;
    font-weight: 500;
    text-decoration: none;
}

.fv-account-link a:hover {
    text-decoration: underline;
}

/* ========================================
   Signup Page Specific
   ======================================== */

.fv-signup-container .fv-login-buttons {
    margin-top: 24px;
}

.fv-signup-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

/* ========================================
   Dark Mode Support (if theme supports it)
   ======================================== */

@media (prefers-color-scheme: dark) {
    body.fv-login-page {
        background: linear-gradient(135deg, #1f1f1f 0%, #2d2d2d 100%);
    }

    .fv-login-container {
        background: #2d2d2d;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    }

    .fv-login-title {
        color: #ffffff;
    }

    .fv-login-subtitle {
        color: #a0a0a0;
    }

    .fv-login-footer {
        border-top-color: #404040;
    }

    .fv-login-terms {
        color: #808080;
    }

    .fv-btn-secondary {
        background: #404040;
        color: #e0e0e0;
    }

    .fv-btn-secondary:hover {
        background: #505050;
        color: #ffffff;
    }

    /* Dark mode form styles */
    .fv-form-label {
        color: #d1d5db;
    }

    .fv-form-input {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .fv-form-input:focus {
        border-color: #DC2626;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
    }

    .fv-checkbox-label {
        color: #d1d5db;
    }

    .fv-password-toggle {
        color: #9ca3af;
    }

    .fv-password-toggle:hover {
        color: #d1d5db;
    }

    .fv-login-divider {
        color: #6b7280;
    }

    .fv-login-divider::before,
    .fv-login-divider::after {
        border-bottom-color: #4b5563;
    }

    .fv-account-link {
        color: #9ca3af;
    }

    .fv-signup-title {
        color: #f3f4f6;
    }

    .fv-login-error {
        background: #450a0a;
        border-color: #7f1d1d;
        color: #fca5a5;
    }
}

/* ========================================
   Password Reset Flow Styles
   ======================================== */

/* Success Message */
.fv-login-success-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.fv-login-success-message .fv-message-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fv-login-success-message p {
    margin: 0;
    color: #065f46;
    font-size: 14px;
    line-height: 1.5;
}

/* Error Message - Enhanced */
.fv-login-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.fv-login-error-message p {
    margin: 0;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.5;
}

/* Back Link */
.fv-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.fv-back-link:hover {
    color: #DC2626;
}

.fv-back-link svg {
    transition: transform 0.2s;
}

.fv-back-link:hover svg {
    transform: translateX(-2px);
}

/* Forgot Password Container */
.fv-forgot-container .fv-login-footer {
    text-align: center;
}

/* Reset Password Container */
.fv-reset-container .fv-login-footer {
    text-align: center;
}

/* Password Strength Indicator */
.fv-password-strength {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.fv-strength-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.fv-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.fv-strength-weak {
    background: #ef4444;
}

.fv-strength-medium {
    background: #f59e0b;
}

.fv-strength-strong {
    background: #10b981;
}

.fv-strength-text {
    font-size: 12px;
    font-weight: 500;
    min-width: 60px;
    text-align: right;
}

.fv-text-weak {
    color: #ef4444;
}

.fv-text-medium {
    color: #f59e0b;
}

.fv-text-strong {
    color: #10b981;
}

/* Password Match Indicator */
.fv-password-match {
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

.fv-match-success {
    color: #10b981;
}

.fv-match-error {
    color: #ef4444;
}

/* Password Requirements Checklist */
.fv-password-requirements {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: left;
}

.fv-password-requirements .fv-requirements-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
}

.fv-password-requirements .fv-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fv-password-requirements .fv-requirements-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    padding: 4px 0;
    transition: color 0.2s;
}

/* Requirement Icon */
.fv-req-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

/* Pending state - empty circle */
.fv-req-pending .fv-req-icon {
    border: 2px solid #d1d5db;
    background: transparent;
}

/* Met state - filled green with checkmark */
.fv-req-met .fv-req-icon {
    border: none;
    background: #10b981;
}

.fv-req-met .fv-req-icon::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.fv-req-met {
    color: #10b981;
}

/* Button with Icon */
.fv-btn svg {
    flex-shrink: 0;
}

.fv-btn-block {
    width: 100%;
}

/* Form Group Label */
.fv-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
    text-align: left;
}

/* Login Switch Link */
.fv-login-switch {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.fv-login-switch a {
    color: #DC2626;
    text-decoration: none;
    font-weight: 500;
}

.fv-login-switch a:hover {
    text-decoration: underline;
}

/* ========================================
   Password Reset Dark Mode
   ======================================== */

@media (prefers-color-scheme: dark) {
    .fv-login-success-message {
        background: #064e3b;
        border-color: #065f46;
    }

    .fv-login-success-message p {
        color: #a7f3d0;
    }

    .fv-login-error-message {
        background: #450a0a;
        border-color: #7f1d1d;
    }

    .fv-login-error-message p {
        color: #fca5a5;
    }

    .fv-back-link {
        color: #9ca3af;
    }

    .fv-back-link:hover {
        color: #f87171;
    }

    .fv-password-requirements {
        background: #374151;
    }

    .fv-password-requirements .fv-requirements-title {
        color: #e5e7eb;
    }

    .fv-password-requirements .fv-requirements-list li {
        color: #9ca3af;
    }

    .fv-req-pending .fv-req-icon {
        border-color: #6b7280;
    }

    .fv-strength-bar {
        background: #4b5563;
    }

    .fv-form-group label {
        color: #d1d5db;
    }

    .fv-login-switch {
        color: #9ca3af;
    }

    .fv-login-switch a {
        color: #f87171;
    }
}

