/* AbraCMS Revolutionary Login Styles - Complete Redesign */
/* No WordPress resemblance - Modern split-screen design */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Fresh color palette */
:root {
    --abra-primary: #10b981; /* Emerald green instead of blue */
    --abra-secondary: #f59e0b; /* Amber accent */
    --abra-accent: #fef3c7; /* Light amber background */
    --abra-dark: #1f2937; /* Dark gray */
    --abra-light: #f9fafb; /* Light gray */
    --abra-success: #059669;
    --abra-warning: #d97706;
    --abra-danger: #dc2626;
    --abra-font-family: 'Poppins', sans-serif;
    --abra-font-size-base: 14px;
    --abra-border-radius: 16px;
    --abra-spacing-base: 20px;
    --abra-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --abra-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --abra-shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

/* Base Login Page Styles - Split Screen Layout */
body.login {
    font-family: var(--abra-font-family);
    font-size: var(--abra-font-size-base);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--abra-light);
}

/* Left Side - Branding Panel */
.login-branding {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    background: linear-gradient(135deg, var(--abra-primary) 0%, var(--abra-secondary) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: white;
    z-index: 1;
    /* border: 2px solid red; */ /* Debug border */
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="50" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.login-branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.login-branding h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-branding p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.8;
}

/* Right Side - Login Form */
#login {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background: var(--abra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
    /* border: 2px solid blue; */ /* Debug border */
    align-content: center;
    flex-direction: column;
}

#loginform,
#lostpasswordform,
#resetpassform {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: var(--abra-border-radius);
    box-shadow: var(--abra-shadow-lg);
    padding: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    margin: 0;
    display: block !important;
}

/* Logo in Form */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: var(--abra-shadow-md);
}

/* Form Title */
#login h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--abra-dark);
    margin-bottom: 30px;
}

/* Form Fields */
#loginform p,
#lostpasswordform p,
#resetpassform p {
    margin-bottom: 24px;
    display: block !important;
    width: 100% !important;
}

#loginform label,
#lostpasswordform label,
#resetpassform label {
    display: block;
    font-weight: 500;
    color: var(--abra-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

#loginform input[type="text"],
#loginform input[type="password"],
#lostpasswordform input[type="text"],
#resetpassform input[type="password"],
#resetpassform input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--abra-font-family);
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus,
#resetpassform input[type="password"]:focus,
#resetpassform input[type="text"]:focus {
    outline: none;
    border-color: var(--abra-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

/* Remember Me Checkbox */
.forgetmenot {
    display: block !important;
    margin-bottom: 24px !important;
}

#rememberme {
    width: 18px !important;
    height: 18px !important;
    margin-right: 12px !important;
    accent-color: var(--abra-primary);
}

.forgetmenot label {
    font-weight: 400 !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    display: inline !important;
}

/* Submit Button */
#loginform input[type="submit"],
#lostpasswordform input[type="submit"],
#resetpassform input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--abra-primary) 0%, var(--abra-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--abra-font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--abra-shadow-md);
}

#loginform input[type="submit"]:hover,
#lostpasswordform input[type="submit"]:hover,
#resetpassform input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--abra-shadow-lg);
}

#loginform input[type="submit"]:active,
#lostpasswordform input[type="submit"]:active,
#resetpassform input[type="submit"]:active {
    transform: translateY(0);
}

/* Links */
#nav,
#backtoblog {
    text-align: center;
    margin-top: 24px;
    padding: 20px;
}


#nav a,
#backtoblog a {
    color: var(--abra-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

#nav a:hover,
#backtoblog a:hover {
    color: var(--abra-secondary);
    text-decoration: underline;
}

/* Messages */
#login_error,
.message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    border: 1px solid;
}

#login_error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--abra-danger);
}
p#backtoblog {
	display: none;
}
.message {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.2);
    color: var(--abra-success);
}

/* Different form titles for different actions */
body.login-action-login #login h1:before {
    content: "Вход в системата";
}

body.login-action-lostpassword #login h1:before {
    content: "Възстановяване на парола";
}

body.login-action-resetpass #login h1:before {
    content: "Задаване на нова парола";
}

body.login-action-rp #login h1:before {
    content: "Задаване на нова парола";
}

#login h1:before {
    display: block;
    content: "Вход в системата";
}

/* Ensure all forms are visible and styled */
#loginform,
#lostpasswordform,
#resetpassform {
    display: block !important;
    visibility: visible !important;
}

/* Hide default WordPress logo */
.login h1 a {
    display: none !important;
}

/* Style for password reset specific elements */
body.login-action-resetpass #pass1,
body.login-action-rp #pass1 {
    margin-bottom: 10px;
}

body.login-action-resetpass #pass1-text,
body.login-action-rp #pass1-text {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

/* 2FA plugin compatibility */
.two-factor-prompt,
#two-factor-login-form {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
}

.two-factor-prompt input,
#two-factor-login-form input {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-family: var(--abra-font-family) !important;
    margin-bottom: 15px !important;
    box-sizing: border-box !important;
}

.two-factor-prompt input:focus,
#two-factor-login-form input:focus {
    outline: none !important;
    border-color: var(--abra-primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Animations */
.login-branding {
    animation: slideInLeft 0.8s ease;
}

#login {
    animation: slideInRight 0.8s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-branding {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 300px;
        padding: 40px 20px;
    }

    .login-branding h1 {
        font-size: 2rem;
    }

    #login {
        position: relative;
        width: 100%;
        height: auto;
        min-height: calc(100vh - 300px);
        padding: 20px;
    }

    #loginform,
    #lostpasswordform,
    #resetpassform {
        padding: 30px 20px;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
}

@media (max-width: 480px) {
    .login-branding {
        padding: 30px 20px;
        min-height: 250px;
    }

    .login-branding h1 {
        font-size: 1.5rem;
    }

    #login {
        padding: 20px;
        min-height: calc(100vh - 250px);
    }

    #loginform,
    #lostpasswordform,
    #resetpassform {
        padding: 20px;
    }

    #loginform input[type="text"],
    #loginform input[type="password"],
    #lostpasswordform input[type="text"],
    #resetpassform input[type="password"],
    #resetpassform input[type="text"],
    #loginform input[type="submit"],
    #lostpasswordform input[type="submit"],
    #resetpassform input[type="submit"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Accessibility */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

*:focus {
    outline: 2px solid var(--abra-primary);
    outline-offset: 2px;
}

/* Hide original WordPress elements */
.login h1 a {
    display: none !important;
}

/* Override WordPress defaults */
body.login form {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}