/**
 * Advanced Security Pro - Enhanced Custom Login Styles
 * Beautiful split-screen login design with improved UX
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override WordPress default login styles */
body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background particles */
body.login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-10px) rotate(-1deg); }
}

/* Hide default WordPress login container */
body.login #login {
    display: none !important;
}

/* Split-screen container */
.login-split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 650px;
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Left side - Login form */
.login-left {
    flex: 1;
    padding: 70px 60px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #e1e5e9, transparent);
}

/* Right side - Welcome message */
.login-right {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 70px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form title */
.login-form-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 50px;
    text-align: left;
    position: relative;
}

.login-form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Login form */
.login-form {
    width: 100%;
}

/* Input groups */
.login-input-group {
    margin-bottom: 30px;
    position: relative;
}

/* Input fields - Enhanced visibility and design */
.login-input {
    width: 100% !important;
    padding: 18px 24px !important;
    border: 2px solid #e8ecef !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    font-family: inherit !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    font-weight: 500 !important;
}

.login-input:focus {
    border-color: #667eea !important;
    background: white !important;
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    transform: translateY(-2px) !important;
}

.login-input::placeholder {
    color: #a0a6b1 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* Input focus animation */
.login-input-group.focused .login-input {
    border-color: #667eea !important;
    background: white !important;
    transform: translateY(-2px) !important;
}

/* Remember me section */
.remember-me-section {
    display: flex;
    align-items: center;
    margin-bottom: 35px;
    padding: 5px 0;
}

.remember-me-checkbox {
    margin-right: 12px !important;
    width: 20px !important;
    height: 20px !important;
    accent-color: #667eea !important;
    cursor: pointer !important;
}

.remember-me-label {
    font-size: 15px !important;
    color: #5a6c7d !important;
    cursor: pointer !important;
    user-select: none;
    font-weight: 500 !important;
}

/* Submit button */
.login-submit-btn {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 35px !important;
    font-family: inherit !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-submit-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.login-submit-btn:hover::before {
    left: 100%;
}

.login-submit-btn:active {
    transform: translateY(-1px) !important;
}

/* Loading state */
.login-submit-btn.loading {
    opacity: 0.8 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Forgot password section */
.forgot-password-section {
    text-align: center;
    margin-bottom: 25px;
}

.forgot-password-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

.forgot-password-link:hover {
    color: #764ba2 !important;
    background: rgba(102, 126, 234, 0.05) !important;
    text-decoration: none !important;
}

/* Back to site link */
.back-to-site {
    text-align: center;
    margin-top: 25px;
}

.back-to-site a {
    color: #8892a4 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

.back-to-site a:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.05) !important;
}

/* Welcome section */
.welcome-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.welcome-text {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 45px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
}


/* Error and message styles */
.login-error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    margin-bottom: 25px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
    border: none !important;
}

.login-message {
    background: linear-gradient(135deg, #51cf66, #40c057) !important;
    color: white !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    margin-bottom: 25px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3) !important;
    border: none !important;
}

/* reCAPTCHA styling */
.g-recaptcha {
    margin-bottom: 25px !important;
    display: flex !important;
    justify-content: center !important;
    transform: scale(0.9);
    transform-origin: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body.login {
        padding: 10px;
    }
    
    .login-split-container {
        flex-direction: column;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        max-height: none;
    }

    .login-left,
    .login-right {
        padding: 50px 40px;
    }

    .login-right {
        order: -1;
        min-height: 250px;
    }

    .login-right::before {
        display: none;
    }

    .welcome-title {
        font-size: 32px;
    }

    .welcome-text {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .login-form-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .login-input {
        padding: 16px 20px !important;
    }
    
    .login-submit-btn {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .login-left,
    .login-right {
        padding: 40px 30px;
    }
    
    .login-form-title {
        font-size: 24px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
}

/* Focus states for better accessibility */
.login-input:focus,
.login-submit-btn:focus,
.remember-me-checkbox:focus,
.forgot-password-link:focus,
.back-to-site a:focus,
.signup-link:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* Ensure all elements are visible and properly styled */
.login-left * {
    color: inherit !important;
}

.login-left h1,
.login-left label,
.login-left input,
.login-left button {
    color: #2c3e50 !important;
}

/* Override any theme styles that might hide elements */
.login-left input[type="text"],
.login-left input[type="password"],
.login-left input[type="email"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
}

/* Ensure button is visible */
.login-submit-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Smooth transitions for all interactive elements */
.login-input,
.login-submit-btn,
.forgot-password-link,
.back-to-site a,
.signup-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}