/* Hide WordPress native elements by default - will be shown when password mode is active */
#user_pass {
    display: none !important;
}


/* Ensure WordPress forgot password form elements are visible on lostpassword page */
body.login-action-lostpassword #user_login,
body.login-action-lostpassword .user-login-wrap,
body.login-action-lostpassword .submit {
    display: block !important;
}


#wp-submit {
    display: none !important;
}

/* Override the general #wp-submit hide rule for lostpassword page - must come after the general rule */
body.login-action-lostpassword #wp-submit {
    display: block !important;
}

/* Override the general #wp-submit hide rule for reset password page - must come after the general rule */
body.login-action-rp #wp-submit {
    display: block !important;
}

/* Ensure password fields are visible on reset password page */
body.login-action-rp #user_pass,
body.login-action-rp .user-pass-wrap,
body.login-action-rp .wp-hide-pw {
    display: block !important;
}


.user-pass-wrap {
    display: none !important;
}

.wp-hide-pw {
    display: none !important;
}

.forgetmenot {
    display: none !important;
}

.wp-login-lost-password {
    display: none !important;
}


#nav {
    display: none !important;
}

.wp-login-register {
    display: none !important;
}

#backtoblog {
    display: none !important;
}


/* Password mode styles - show native WordPress elements */
.password-mode #user_pass {
    display: block !important;
}

.password-mode #wp-submit {
    display: block !important;
}

.password-mode .user-pass-wrap {
    display: block !important;
}

.password-mode .wp-hide-pw {
    display: block !important;
}

.password-mode .forgetmenot {
    display: block !important;
}

.password-mode .wp-login-lost-password {
    display: block !important;
}


.password-mode .wp-login-register {
    display: block !important;
}


/* Fix layout for password reset and register links */
.password-mode #nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 1rem !important;
    gap: 1rem !important;
}

.password-mode .wp-login-lost-password {
    margin: 0 !important;
    flex: 2 !important;
}

.password-mode .wp-login-register {
    margin: 0 !important;
    flex: 1 !important;
    text-align: right !important;
}

/* Nav links colors */
.login #nav a:hover, .login #nav a:visited, .login #nav a:focus {
    color: #000 !important;
}

/* Hide magic login elements in password mode */
.password-mode .magic-login-submit-btn {
    display: none !important;
}

.password-mode .magic-login-info-message {
    display: none !important;
}

/* Keep social login container visible in password mode */
.password-mode .social-login-container {
    display: block !important;
}

/* Hide social buttons in password mode, show only back button */
.password-mode .social-login-buttons .google-login-btn,
.password-mode .social-login-buttons .facebook-login-btn,
.password-mode .social-login-buttons .linkedin-login-btn {
    display: none !important;
}

/* Hide divider in password mode */
.password-mode .social-login-divider {
    display: none !important;
}

/* Password login button styles */
.password-login-btn {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    color: #495057 !important;
}

.password-login-btn:hover {
    background: #e9ecef !important;
    border: 1px solid #dee2e6 !important;
}

.password-login-btn .social-icon {
    fill: #6c757d;
}

/* Back to magic login button */
.back-to-magic-btn {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.back-to-magic-btn:hover {
    background: #333 !important;
    border-color: #333 !important;
}

.back-to-magic-btn .social-icon {
    fill: #fff;
}

.magic-login-submit-btn {
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: #000 !important;
    width: 100% !important;
    outline: 0 !important;
    border: none !important;
    padding: 0.5rem 0 !important;
    box-shadow: none !important;
}

/* Disable button when loading */
.magic-login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.magic-login-submit-btn svg {
    width: 1rem;
    height: 1rem;
    fill: #fff;
}

.login form {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Magic login message styles */
#login_error {
    margin-bottom: 1rem;
}

#login_error.message {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

#login_error.message::before {
    content: "✓ ";
    font-weight: bold;
}

/* Normalize all text inputs */
input[type="text"],
input[type="email"],
input[type="password"],
#user_login,
#user_pass {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    outline: 0 !important;
    box-sizing: border-box !important;
}

#user_login:focus,
#user_pass:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    box-shadow: none !important;
    border-color: #8c8f94 !important;
}

/* Button and icon colors */
#wp-submit {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
}

#wp-submit:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}

.wp-hide-pw {
    color: #000 !important;
}

.wp-hide-pw:hover {
    color: #333 !important;
}

.wp-hide-pw:focus {
    box-shadow: 0 0 0 1px #000 !important;
    border-color: #000 !important;
}

/* Remember me checkbox styles */
.forgetmenot input[type="checkbox"] {
    box-shadow: none !important;
}

.forgetmenot input[type="checkbox"]:focus {
    border-color: #8c8f94 !important;
    box-shadow: none !important;
}

.forgetmenot input[type="checkbox"]::before {
    content: none !important;
}

.forgetmenot input[type="checkbox"]:checked::before {
    content: "✓" !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

label[for="user_login"] {
    display: none !important;
}

/* Social Login Styles */
.social-login-container {
    margin-top: 2rem;
    margin-bottom: 1rem;
    width: 320px !important;
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}


.social-login-divider {
    text-align: center;
    position: relative;
    margin: 2rem 0 1.5rem 0;
    color: #666;
    font-size: 14px;
}

.social-login-divider span {
    margin-bottom: 1rem;
    position: relative;
    display: block;
    z-index: 2;
    width: 100%;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.social-login-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.social-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.social-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Google specific styles */
.google-login-btn {
    color: #333;
}

.google-login-btn:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

/* Facebook specific styles */
.facebook-login-btn:hover {
    background: #f0f2f5;
    border-color: #dadce0;
}

.facebook-login-btn .social-icon {
    fill: #1877f2;
}

/* LinkedIn specific styles */
.linkedin-login-btn:hover {
    background: #f3f6f8;
    border-color: #dadce0;
}

.linkedin-login-btn .social-icon {
    fill: #0a66c2;
}

/* Responsive design */
@media (max-width: 480px) {
    .social-login-btn {
        padding: 0.875rem 1rem;
        font-size: 16px;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
}
