/**
 * MU Auth Signin Styles
 * 
 * Specific styles for signin form
 * 
 * @package MU_Auth
 * @since 1.0.0
 */

/* ==========================================================================
   Signin Form Container
   ========================================================================== */

.mu-auth-signin-form-container {
    position: relative;
}

/* ==========================================================================
   Signin Form Fields
   ========================================================================== */

.mu-auth-signin-form .mu-auth-field {
    margin-bottom: 12px;
}

.mu-auth-signin-form .mu-auth-field input[type="text"],
.mu-auth-signin-form .mu-auth-field input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.mu-auth-signin-form .mu-auth-field input[type="text"]:focus,
.mu-auth-signin-form .mu-auth-field input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* ==========================================================================
   Signin Checkbox
   ========================================================================== */

.mu-auth-signin-form .mu-auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.mu-auth-signin-form .mu-auth-checkbox input[type="checkbox"] {
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.mu-auth-signin-form .mu-auth-checkbox label {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

/* MU Library Checkbox Component */
.mu-auth-signin-form .mu-checkbox,
.mu-auth-signin-form .mu-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.mu-auth-signin-form .mu-checkbox .mu-checkbox-label,
.mu-auth-signin-form .mu-checkbox-group .mu-checkbox-label {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.mu-auth-signin-form .mu-checkbox input[type="checkbox"],
.mu-auth-signin-form .mu-checkbox-group input[type="checkbox"] {
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* Enhanced checkbox styling */
.mu-auth-signin-form .mu-auth-checkbox:hover {
    opacity: 0.9;
}

.mu-auth-signin-form .mu-auth-checkbox.checked label {
    color: #0073aa;
    font-weight: 600;
}

.mu-auth-signin-form .mu-auth-checkbox input[type="checkbox"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

/* Visual feedback for checked state */
.mu-auth-signin-form .mu-auth-checkbox input[type="checkbox"]:checked + label {
    color: #0073aa;
    font-weight: 600;
}

/* Hover effect for checkbox */
.mu-auth-signin-form .mu-auth-checkbox:hover label {
    color: #005177;
}

/* Ensure proper spacing and alignment for any checkbox variant */
.mu-auth-signin-form .mu-auth-checkbox > *,
.mu-auth-signin-form .mu-checkbox > *,
.mu-auth-signin-form .mu-checkbox-group > * {
    margin: 0;
}

.mu-auth-signin-form .mu-auth-checkbox .mu-checkbox-wrapper,
.mu-auth-signin-form .mu-checkbox .mu-checkbox-wrapper,
.mu-auth-signin-form .mu-checkbox-group .mu-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Signin Submit Button
   ========================================================================== */

.mu-auth-signin-form .mu-auth-submit-container {
    margin-top: 16px;
}

/* ==========================================================================
   Signin Footer Links
   ========================================================================== */

.mu-auth-forgot-password-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.mu-auth-forgot-password-link .mu-auth-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.mu-auth-forgot-password-link .mu-auth-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Signin Messages
   ========================================================================== */

.mu-auth-signin-form .mu-auth-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.mu-auth-signin-form .mu-auth-message.mu-auth-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c53030;
}

.mu-auth-signin-form .mu-auth-message.mu-auth-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #38a169;
}

/* ==========================================================================
   Signin Loading State
   ========================================================================== */

.mu-auth-signin-form .mu-auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: mu-auth-spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes mu-auth-spin {
    to { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
    .mu-auth-signin-form-container {
        padding: 15px;
    }
    
    .mu-auth-signin-form .mu-auth-field input[type="text"],
    .mu-auth-signin-form .mu-auth-field input[type="password"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
