/**
 * cram IT all Auth Plugin - Split Screen Layout
 * Path: /wp-content/plugins/cramitall-auth/assets/css/auth.css
 */

:root {
    /* Brand colors */
    --cia-blue: #00a3e0;
    --cia-red: #ef3340;
    --cia-slate: #41748d;
    --cia-black: #000000;
    --cia-white: #ffffff;
    --cia-lgray: #f5f5f5;
    --cia-dgray: #c4c2c2;
    
    /* Text colors */
    --cia-text: #333333;
    --cia-text-muted: #666666;
    --cia-text-disabled: #999999;
    
    /* Interaction states */
    --cia-blue-light: #e3f2fd;
    --cia-red-dark: #c82333;
    
    /* Status colors */
    --cia-success: #28a745;
    --cia-success-bg: #d4edda;
    --cia-success-text: #155724;
    --cia-error: #dc3545;
    --cia-error-bg: #f8d7da;
    --cia-error-text: #721c24;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Base */
body.cia-auth-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--cia-text);
    background: var(--cia-white);
    overflow: hidden;
}

/* ==========================================================================
   SPLIT SCREEN CONTAINER
   ========================================================================== */

.cia-auth-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   LEFT SIDE - BRANDING (60%)
   ========================================================================== */

.cia-auth-branding {
    flex: 0 0 60%;
    background: linear-gradient(135deg, #000000 0%, var(--cia-blue) 120%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.cia-auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--cia-circuit-trace-url);
    background-size: 2880px auto;
    background-position: top center;
    background-repeat: no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

.cia-auth-branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--cia-white);
}

.cia-auth-logo {
    display: inline-block;
    margin-bottom: 0;
}

.cia-auth-logo:empty {
    display: none;
}

.cia-auth-logo img {
    max-width: 380px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cia-auth-tagline {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.9;
    max-width: 400px;
    margin: 0 auto;
}

.cia-auth-tagline:empty {
    display: none;
}

/* ==========================================================================
   RIGHT SIDE - FORM (40%)
   ========================================================================== */

.cia-auth-form-wrapper {
    flex: 0 0 40%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    background: var(--cia-white);
    overflow-y: auto;
}

.cia-auth-form-container {
    width: 100%;
    max-width: 400px;
    margin: auto 0;
    padding: 20px 0;
}

/* Form Header */
.cia-auth-form-header {
    margin-bottom: 32px;
    text-align: center;
}

.cia-auth-form-header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--cia-slate);
}

.cia-auth-subtitle {
    margin: 0;
    font-size: 16px;
    color: var(--cia-text);
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

#loginform,
#registerform,
#lostpasswordform,
#resetpassform {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

#loginform p,
#registerform p,
#lostpasswordform p,
#resetpassform p {
    margin-bottom: 20px;
}

/* Labels */
#loginform label,
#registerform label,
#lostpasswordform label,
#resetpassform label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--cia-text);
    margin-bottom: 6px;
}

/* Inputs */
#loginform input[type="text"],
#loginform input[type="email"],
#loginform input[type="password"],
#registerform input[type="text"],
#registerform input[type="email"],
#registerform input[type="password"],
#lostpasswordform input[type="text"],
#lostpasswordform input[type="email"],
#resetpassform input[type="text"],
#resetpassform input[type="password"] {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--cia-text);
    background: var(--cia-white);
    border: 1px solid var(--cia-dgray);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

#loginform input:focus,
#registerform input:focus,
#lostpasswordform input:focus,
#resetpassform input:focus {
    border-color: var(--cia-blue);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.15);
}

/* Password field wrapper */
.wp-pwd {
    position: relative;
    display: block;
}

.wp-pwd input[type="password"],
.wp-pwd input[type="text"] {
    padding-right: 45px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Hide password toggle - reposition inside input */
button.wp-hide-pw,
.wp-hide-pw {
    position: relative !important;
    float: right !important;
    margin-top: -54px !important;
    margin-right: 12px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    color: var(--cia-text);
    height: 20px !important;
    width: 20px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    line-height: 0 !important;
    z-index: 10;
}

button.wp-hide-pw:hover,
.wp-hide-pw:hover {
    color: var(--cia-blue);
    background: transparent !important;
}

button.wp-hide-pw .dashicons,
.wp-hide-pw .dashicons {
    display: block;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Remember Me */
p.forgetmenot {
    margin-bottom: 20px !important;
}

.forgetmenot {
    display: flex;
    align-items: center;
}

.forgetmenot input[type="checkbox"],
.cia-terms-agreement input[type="checkbox"] {
    margin: 0 8px 0 0;
    cursor: pointer;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    box-shadow: none !important;
}

.forgetmenot input[type="checkbox"]:checked::before,
.cia-terms-agreement input[type="checkbox"]:checked::before {
    content: none !important;
}

.forgetmenot label {
    display: inline !important;
    font-weight: 400 !important;
    cursor: pointer;
    margin-bottom: 0 !important;
}

/* Submit Button */
#loginform p.submit,
#registerform p.submit,
#lostpasswordform p.submit,
#resetpassform p.submit {
    margin-bottom: 0;
    text-align: right;
}

#wp-submit,
.button-primary {
    display: inline-block;
    width: auto;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--cia-white);
    background: var(--cia-slate);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

#wp-submit:hover,
.button-primary:hover {
    background: var(--cia-blue);
}

#wp-submit:active,
.button-primary:active {
    transform: translateY(1px);
}

#wp-submit:focus,
.button-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.3);
}

/* ==========================================================================
   TERMS AGREEMENT
   ========================================================================== */

.cia-terms-agreement {
    margin-bottom: 20px;
}

.cia-terms-agreement label {
    display: flex !important;
    align-items: center;
    font-weight: 400 !important;
    cursor: pointer;
}

.cia-terms-agreement input[type="checkbox"] {
    margin: 0 10px 0 0;
}

.cia-terms-agreement a {
    color: var(--cia-slate);
    font-weight: 600;
    text-decoration: none;
}

.cia-terms-agreement a:hover {
    color: var(--cia-blue);
}

/* ==========================================================================
   MESSAGES & ERRORS
   ========================================================================== */

#login .message,
#login .success {
    background: var(--cia-success-bg);
    color: var(--cia-success-text);
    border: none;
    border-left: 4px solid var(--cia-success);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 16px;
}

#login #login_error,
#login .error,
.cia-error {
    background: var(--cia-error-bg);
    color: var(--cia-error-text);
    border: none;
    border-left: 4px solid var(--cia-error);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 16px;
}

#login #login_error a,
#login .error a {
    color: var(--cia-error-text);
    font-weight: 600;
}

/* ==========================================================================
   FOOTER LINKS
   ========================================================================== */

.cia-auth-links {
    margin-top: 24px;
    text-align: center;
}

.cia-auth-links p {
    margin: 8px 0;
    font-size: 16px;
    color: var(--cia-text);
}

.cia-auth-links a {
    color: var(--cia-slate);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.cia-auth-links a:hover {
    color: var(--cia-blue);
}

.cia-auth-register-link a {
    color: var(--cia-red);
    font-weight: 600;
}

.cia-auth-register-link a:hover {
    color: var(--cia-blue);
}

/* Login link on register page - same red styling */
.cia-auth-links .login-link-text a,
.cia-login-links .login-link-text a {
    color: var(--cia-red);
    font-weight: 600;
}

.cia-auth-links .login-link-text a:hover,
.cia-login-links .login-link-text a:hover {
    color: var(--cia-blue);
}

/* Register link on login page - red styling */
.cia-login-links .register-link a {
    color: var(--cia-red);
    font-weight: 600;
}

.cia-login-links .register-link a:hover {
    color: var(--cia-blue);
}

/* Page Footer */
.cia-auth-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--cia-dgray);
    text-align: center;
}

.cia-auth-footer p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--cia-text);
}

.cia-auth-footer a {
    color: var(--cia-slate);
    text-decoration: none;
    font-weight: 500;
}

.cia-auth-footer a:hover {
    color: var(--cia-blue);
}

/* ==========================================================================
   HIDE WORDPRESS DEFAULT ELEMENTS
   ========================================================================== */

#login h1,
#login #nav,
#login #backtoblog,
#login .privacy-policy-page-link,
#login .message.register,
.login .language-switcher {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .cia-auth-branding {
        flex: 0 0 50%;
        padding: 40px;
    }

    .cia-auth-form-wrapper {
        flex: 0 0 50%;
    }

    .cia-auth-logo img {
        max-width: 200px;
    }

    .cia-auth-tagline {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    body.cia-auth-page {
        overflow: auto;
    }

    .cia-auth-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .cia-auth-branding {
        flex: none;
        height: 220px;
        padding: 30px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cia-auth-logo img {
        max-width: 220px;
    }

    .cia-auth-tagline {
        font-size: 16px;
        display: none;
    }

    .cia-auth-form-wrapper {
        flex: none;
        height: auto;
        padding: 30px 20px;
        overflow: visible;
    }

    .cia-auth-form-header h1 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .cia-auth-branding {
        height: 180px;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cia-auth-logo img {
        max-width: 180px;
    }

    .cia-auth-form-wrapper {
        padding: 24px 16px;
    }

    .cia-auth-form-header h1 {
        font-size: 24px;
    }

    #wp-submit {
        padding: 12px 20px;
    }
}

/* ==========================================================================
   SHOW PASSWORD TOGGLE
   ========================================================================== */

.cia-pass-field {
    position: relative;
    display: block;
}

.cia-pass-field .input {
    padding-right: 2.5rem;
}

.cia-show-pass {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #a0aec0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.cia-show-pass:hover {
    color: var(--cia-slate);
}