/* MyForever Health - Login Page Styles */
/* Professional health supplement theme styling for WooCommerce login */

/* Login Page Container - Force full width and centering with higher specificity */
body.woocommerce-account .container .page-content .page-content-wrapper,
body.woocommerce-account .page-content-wrapper,
.woocommerce-account .page-content-wrapper,
.page-content-wrapper {
    max-width: 600px !important;
    width: 100% !important;
    margin: 40px auto !important;
    padding: 40px !important;
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    clear: both !important;
    background: white !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}

/* Ensure parent containers don't constrain the login form */
body.woocommerce-account .site-main,
body.woocommerce-account .content-area {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Container should be centered and full width */
body.woocommerce-account .container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: block !important;
}

/* Page content should be centered */
body.woocommerce-account .page-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 40px 0 !important;
    display: block !important;
    text-align: center !important;
}

/* Override any theme layout constraints */
body.woocommerce-account {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-account .site-content {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* WooCommerce Login Container */
.woocommerce {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid #e8f5e8;
}

/* Login Title */
.woocommerce h2 {
    color: var(--primary-green, #2d7a2d);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.woocommerce h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-green, #2d7a2d), #4a9b4a);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Login Form */
.woocommerce-form-login {
    margin: 0;
}

/* Form Rows */
.woocommerce-form-row {
    margin-bottom: 25px;
}

/* Form Labels */
.woocommerce-form-row label {
    display: block;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Required Asterisk */
.required {
    color: #e74c3c;
    font-weight: 700;
}

/* Input Fields */
.woocommerce-Input {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    background: #fafafa !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.woocommerce-Input:focus {
    border-color: var(--primary-green, #2d7a2d) !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(45, 122, 45, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Password Input Container */
.password-input {
    position: relative;
    display: block;
}

.password-input input {
    padding-right: 50px !important;
}

/* Show Password Button */
.show-password-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.show-password-input:hover {
    color: var(--primary-green, #2d7a2d);
    background: rgba(45, 122, 45, 0.1);
}

/* Remember Me Section */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

/* Remember Me Checkbox */
.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin: 0;
}

.woocommerce-form__input-checkbox {
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--primary-green, #2d7a2d);
    cursor: pointer;
}

/* Login Button */
.woocommerce-form-login__submit {
    background: linear-gradient(135deg, var(--primary-green, #2d7a2d), #4a9b4a) !important;
    color: white !important;
    border: none !important;
    padding: 14px 30px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 15px rgba(45, 122, 45, 0.3) !important;
    min-width: 120px;
}

.woocommerce-form-login__submit:hover {
    background: linear-gradient(135deg, #245a24, var(--primary-green, #2d7a2d)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(45, 122, 45, 0.4) !important;
}

.woocommerce-form-login__submit:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(45, 122, 45, 0.3) !important;
}

/* Lost Password Link */
.woocommerce-LostPassword {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 0;
}

.woocommerce-LostPassword a {
    color: var(--primary-green, #2d7a2d);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.woocommerce-LostPassword a:hover {
    color: #245a24;
    border-bottom-color: #245a24;
}

/* Error Messages */
.woocommerce-notices-wrapper .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Success Messages */
.woocommerce-notices-wrapper .woocommerce-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    color: #16a34a;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-content-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .woocommerce {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .woocommerce h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .woocommerce-form-login__submit {
        width: 100% !important;
        padding: 16px !important;
        font-size: 16px !important;
    }
    
    .woocommerce-form__label-for-checkbox {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .woocommerce {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .woocommerce h2 {
        font-size: 1.6rem;
    }
    
    .woocommerce-Input {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Focus Accessibility */
.woocommerce-Input:focus,
.woocommerce-form-login__submit:focus,
.show-password-input:focus,
.woocommerce-form__input-checkbox:focus {
    outline: 2px solid var(--primary-green, #2d7a2d);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .woocommerce {
        border: 2px solid #000;
    }
    
    .woocommerce-Input {
        border-color: #000 !important;
    }
    
    .woocommerce-form-login__submit {
        background: #000 !important;
        border: 2px solid #fff !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .woocommerce-Input,
    .woocommerce-form-login__submit,
    .show-password-input,
    .woocommerce-LostPassword a {
        transition: none !important;
    }
}
