/* Educare Profile Link Setter - Login Page Styling */

/* Custom Login Container */
.educare-login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    position: relative;
}

/* Logo Styling */
.educare-login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.educare-login-logo img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

.educare-login-logo p {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Custom Login Message */
.educare-login-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.educare-login-message button.dismiss-message {
    background: none;
    border: none;
    color: #721c24;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.educare-login-message button.dismiss-message:hover {
    color: #491217;
}

/* Login Form Styling */
#loginform {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

#loginform .input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#loginform .input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

#loginform .button {
    width: 100%;
    background: #0073aa;
    border: none;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

#loginform .button:hover {
    background: #005a87;
}

/* Password Toggle Button Styling - Theme Colors */
.wp-hide-pw {
    background: #0073aa !important;
    border-color: #0073aa !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
}

.wp-hide-pw:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
    color: #fff !important;
}

.wp-hide-pw:focus {
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3) !important;
}

.wp-hide-pw .dashicons {
    color: #fff !important;
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

/* Password field container for proper positioning */
.user-pass-wrap {
    position: relative !important;
}

/* Links Styling */
#loginform p a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

#loginform p a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Error Messages */
#login_error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

/* Success Messages */
.message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .educare-login-container {
        max-width: 90%;
        margin: 20px auto;
        margin-top: 30px;
        padding: 25px 20px;
    }
    
    .educare-login-logo img {
        max-width: 180px;
    }
    
    #loginform .input,
    #loginform .button {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    .wp-hide-pw {
        padding: 10px 14px !important;
        right: 6px !important;
    }
}

@media (max-width: 480px) {
    .educare-login-container {
        max-width: 95%;
        margin: 15px auto;
        margin-top: 20px;
        padding: 20px 15px;
        border-radius: 6px;
    }
    
    .educare-login-logo {
        margin-bottom: 25px;
    }
    
    .educare-login-logo img {
        max-width: 150px;
    }
    
    #loginform .input,
    #loginform .button {
        font-size: 16px;
        padding: 12px 14px;
        border-radius: 4px;
    }
    
    .wp-hide-pw {
        padding: 8px 10px !important;
        right: 4px !important;
    }
    
    .wp-hide-pw .dashicons {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
    
    .educare-login-message {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .educare-login-container {
        max-width: 98%;
        margin: 10px auto;
        margin-top: 15px;
        padding: 15px 12px;
    }
    
    .educare-login-logo img {
        max-width: 120px;
    }
    
    #loginform .input,
    #loginform .button {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .wp-hide-pw {
        padding: 6px 8px !important;
        right: 3px !important;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .educare-login-container {
        margin-top: 15px;
        padding: 20px 15px;
    }
    
    .educare-login-logo {
        margin-bottom: 20px;
    }
    
    .educare-login-logo img {
        max-width: 120px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .educare-login-container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    #loginform .input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    #loginform .input:focus {
        border-color: #63b3ed;
    }
    
    .educare-login-message {
        background: #742a2a;
        color: #feb2b2;
        border-color: #c53030;
    }
    
    .educare-login-message button.dismiss-message {
        color: #feb2b2;
    }
    
    .educare-login-message button.dismiss-message:hover {
        color: #fc8181;
    }
    
    /* Dark mode password toggle button */
    .wp-hide-pw {
        background: #63b3ed !important;
        border-color: #63b3ed !important;
    }
    
    .wp-hide-pw:hover {
        background: #4299e1 !important;
        border-color: #4299e1 !important;
    }
}

/* Accessibility Improvements */
.educare-login-message button.dismiss-message:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

#loginform .button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading States */
.educare-login-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.educare-login-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    #loginform .button,
    .wp-hide-pw {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    #loginform .input {
        min-height: 44px;
    }
    
    .educare-login-message button.dismiss-message {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .educare-login-container {
        border: 2px solid #000;
    }
    
    #loginform .input {
        border-width: 2px;
    }
    
    .wp-hide-pw {
        border-width: 2px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .educare-login-container,
    #loginform .input,
    #loginform .button,
    .wp-hide-pw {
        transition: none;
    }
    
    .educare-login-container.loading::after {
        animation: none;
    }
}

/* Mobile-specific enhancement classes */
.educare-mobile .educare-login-container {
    transition: transform 0.3s ease;
}

.educare-touch-optimized {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.educare-touch-optimized .button,
.educare-touch-optimized .wp-hide-pw {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Loading state styling */
.educare-loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.educare-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Focused state for form inputs */
#loginform .input.focused {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
    transform: translateY(-1px);
}

/* Enhanced button states */
#loginform .button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wp-hide-pw:active {
    transform: translateY(1px) scale(0.98);
}

/* Improved message animations */
.educare-login-message {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced mobile form layout */
@media (max-width: 480px) {
    .educare-login-container {
        animation: fadeInUp 0.4s ease-out;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ========================================
   COMPREHENSIVE WP-LOGIN.PHP ELEMENT STYLING
   ======================================== */

/* WordPress Default Login Page Overrides */
body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Login Container */
#login {
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

/* WordPress Default Logo */
.login h1 {
    display: none; /* Hide default WordPress logo */
}

.login h1 a {
    display: none;
}

/* Form Container */
.login form {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* Form Fields */
.login form .input,
.login form input[type="text"],
.login form input[type="password"],
.login form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.login form .input:focus,
.login form input[type="text"]:focus,
.login form input[type="password"]:focus,
.login form input[type="email"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
    transform: translateY(-1px);
}

/* Form Labels */
.login form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Submit Button */
.login form .submit .button,
.login form input[type="submit"] {
    width: 100%;
    background: #0073aa;
    border: none;
    color: #fff;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.login form .submit .button:hover,
.login form input[type="submit"]:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.login form .submit .button:active,
.login form input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

/* Remember Me Checkbox */
.login .forgetmenot {
    margin: 16px 0;
    display: flex;
    align-items: center;
}

.login .forgetmenot label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.login .forgetmenot input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    transform: scale(1.2);
    accent-color: #0073aa;
}

/* Navigation Links */
.login #nav,
.login #backtoblog {
    text-align: center;
    margin: 20px 0 0 0;
    padding: 0;
}

.login #nav a,
.login #backtoblog a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Error Messages */
.login #login_error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.login #login_error::before {
    content: "⚠️";
    margin-right: 8px;
}

/* Success Messages */
.login .message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.login .message::before {
    content: "✅";
    margin-right: 8px;
}

/* Password Strength Indicator */
.login .password-strength {
    margin-top: 8px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.login .password-strength.weak {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login .password-strength.good {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.login .password-strength.strong {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Password Field Container */
.login .user-pass-wrap {
    position: relative;
    margin-bottom: 16px;
}

/* Password Toggle Button (Enhanced) */
.login .wp-hide-pw {
    background: #0073aa;
    border: 2px solid #0073aa;
    color: #fff;
    border-radius: 6px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.login .wp-hide-pw:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-50%) scale(1.05);
}

.login .wp-hide-pw:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.login .wp-hide-pw .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Form Field Groups */
.login .user-login-wrap,
.login .user-pass-wrap {
    margin-bottom: 20px;
}

/* Username Field */
.login .user-login-wrap input {
    padding-left: 16px;
    padding-right: 16px;
}

/* Password Field */
.login .user-pass-wrap input {
    padding-left: 16px;
    padding-right: 50px; /* Space for toggle button */
}

/* Form Validation States */
.login form .input.error,
.login form input[type="text"].error,
.login form input[type="password"].error,
.login form input[type="email"].error {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.login form .input.success,
.login form input[type="text"].success,
.login form input[type="password"].success,
.login form input[type="email"].success {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Loading States */
.login form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.login form.loading .submit .button,
.login form.loading input[type="submit"] {
    position: relative;
    color: transparent;
}

.login form.loading .submit .button::after,
.login form.loading input[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Animations */
.login form {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Focus States */
.login form .input:focus,
.login form input[type="text"]:focus,
.login form input[type="password"]:focus,
.login form input[type="email"]:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.15);
}

/* Button States */
.login form .submit .button:disabled,
.login form input[type="submit"]:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Adjustments for Default Elements */
@media (max-width: 480px) {
    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"] {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 12px 14px;
    }
    
    .login form .submit .button,
    .login form input[type="submit"] {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .login .wp-hide-pw {
        padding: 8px 10px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .login #nav,
    .login #backtoblog {
        margin: 16px 0 0 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"] {
        border-width: 2px;
    }
    
    .login .wp-hide-pw {
        border-width: 2px;
    }
    
    .login form .submit .button,
    .login form input[type="submit"] {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .login form,
    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"],
    .login form .submit .button,
    .login form input[type="submit"],
    .login .wp-hide-pw {
        transition: none;
        animation: none;
        transform: none;
    }
    
    .login form.loading .submit .button::after,
    .login form.loading input[type="submit"]::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .login .wp-hide-pw,
    .login #nav,
    .login #backtoblog {
        display: none;
    }
    
    .login form {
        box-shadow: none;
        border: 1px solid #000;
    }
}

