/**
 * ManageMore Login Form Styles
 * Also used by Lost Password form
 */

/* Form Wrapper */
.mmh-login-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

/* Intro Text */
.mmh-lost-password-intro,
.mmh-reset-password-intro {
    margin-bottom: 20px;
    color: #666;
}

.mmh-lost-password-intro p,
.mmh-reset-password-intro p {
    margin: 0;
    font-size: 14px;
}

/* Password Requirements */
.mmh-password-requirements {
    margin-bottom: 15px;
}

.mmh-password-requirements p {
    margin: 0;
    color: #666;
}

/* Form Fields */
.mmh-login-form .mmh-field {
    margin-bottom: 15px;
}

.mmh-login-form .mmh-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.mmh-login-form .mmh-field .required {
    color: #e74c3c;
}

.mmh-login-form .mmh-field input[type="text"],
.mmh-login-form .mmh-field input[type="password"],
.mmh-login-form .mmh-field input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.mmh-login-form .mmh-field input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.mmh-login-form .mmh-field input::placeholder {
    color: #999;
}

/* Checkbox Fields */
.mmh-login-form .mmh-checkbox-field label {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.mmh-login-form .mmh-checkbox-field input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Forgot Password Link */
.mmh-forgot-link {
    margin-bottom: 20px;
}

.mmh-forgot-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.mmh-forgot-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Buttons - Custom Styling (scoped to MMR forms only)
   ========================================================================== */

/* Button Group - Login and Register side by side */
.mmh-login-form-wrapper .mmh-button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Primary Button - Submit actions (Login, Reset Password, Save Password) */
.mmh-login-form-wrapper .mmh-button-group button[type="submit"] {
    display: inline-block;
    flex: 1;
    padding: 12px 20px !important;
    background-color: #3498db !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1.4 !important;
}

.mmh-login-form-wrapper .mmh-button-group button[type="submit"]:hover {
    background-color: #2980b9 !important;
    color: #fff !important;
    text-decoration: none;
}

.mmh-login-form-wrapper .mmh-button-group button[type="submit"]:disabled {
    background-color: #bdc3c7 !important;
    cursor: not-allowed;
}

/* Secondary Button - Navigation actions (Register, Back to Login) */
.mmh-login-form-wrapper .mmh-button-group a.button {
    display: inline-block;
    flex: 1;
    padding: 12px 20px !important;
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    line-height: 1.4 !important;
}

.mmh-login-form-wrapper .mmh-button-group a.button:hover {
    background-color: #e9ecef !important;
    border-color: #ccc !important;
    color: #333 !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Error and Status Messages
   ========================================================================== */

/* Error Messages */
.mmh-login-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #721c24;
    font-size: 14px;
    line-height: 1.5;
}

/* Status Messages */
.mmh-login-message {
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.mmh-message-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.mmh-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.mmh-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ==========================================================================
   Logged In Message
   ========================================================================== */

.mmh-login-form-wrapper .mmh-logged-in-message {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.mmh-login-form-wrapper .mmh-logged-in-message p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.mmh-login-form-wrapper .mmh-logged-in-message p:last-child {
    margin-bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Primary button in logged-in message (My Account / Change Password) */
.mmh-login-form-wrapper .mmh-logged-in-message p:last-child a.button:first-child {
    display: inline-block;
    padding: 12px 20px !important;
    background-color: #3498db !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.mmh-login-form-wrapper .mmh-logged-in-message p:last-child a.button:first-child:hover {
    background-color: #2980b9 !important;
    text-decoration: none !important;
}

/* Secondary button in logged-in message (Log Out) */
.mmh-login-form-wrapper .mmh-logged-in-message p:last-child a.button:last-child {
    display: inline-block;
    padding: 12px 20px !important;
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.mmh-login-form-wrapper .mmh-logged-in-message p:last-child a.button:last-child:hover {
    background-color: #e9ecef !important;
    border-color: #ccc !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .mmh-login-form-wrapper .mmh-button-group {
        flex-direction: column;
    }
    
    .mmh-login-form-wrapper .mmh-logged-in-message p:last-child {
        flex-direction: column;
    }
}

/* ==========================================================================
   Powered by ManageMore - Subtle SEO Link
   ========================================================================== */

.mmh-powered-by {
    max-width: 400px;
    margin: 15px auto 0;
    text-align: center;
}

.mmh-powered-by a {
    font-size: 8px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mmh-powered-by a:hover {
    color: #666;
    text-decoration: none;
}
