/* =============================================================
 * Neoprio — WP Login screen (samostatné CSS)
 * Nasadenie: wp_enqueue_style len na login_enqueue_scripts hook,
 * alebo cez login_head. Cieli body.login.
 *
 * Layout: formulár vľavo, vpravo vzdušné prázdne miesto.
 * Zladené s neoprio-admin.css (indigo #3a5bd9, light theme).
 * WP logo skryté.
 * ============================================================= */

body.login {
    --neo-bg:        #f4f6fb;
    --neo-surface:   #ffffff;
    --neo-border:    #e4e8f1;
    --neo-border-2:  #eef1f7;
    --neo-text:      #131a2b;
    --neo-text-2:    #4a5468;
    --neo-muted:     #8a93a6;
    --neo-primary:        #3a5bd9;
    --neo-primary-hover:  #2f4dc4;
    --neo-primary-soft:   #eaeffd;
    --neo-r-sm: 6px;
    --neo-r:    10px;
    --neo-r-lg: 14px;
    --neo-shadow: 0 1px 2px rgba(19, 26, 43, .04), 0 12px 40px -12px rgba(19, 26, 43, .12);
    --neo-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    font-family: var(--neo-font);
    color: var(--neo-text);
    min-height: 100vh;
    margin: 0;

    /* White page; product photo placed in the right-hand space via ::before. */
    background: #ffffff;
}

/* Product photo on the right — desaturated to grayscale, slightly tinted toward
   gray and softened with alpha (filter + luminosity blend on a gray backdrop). */
body.login::before {
    content: "";
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: transparent url("/asp1900_11.jpg") 78% 50% / 38% auto no-repeat;
    filter: grayscale(100%) contrast(0.92) brightness(1.03);
    opacity: 0.85;
}

/* WP off-screen heading — keep hidden (no wp-admin css loaded on some setups) */
body.login h1.screen-reader-text,
body.login .screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
    border: 0; padding: 0; margin: -1px;
}

/* WP centers #login — override to left half, vertically centered */
body.login #login {
    position: relative;
    z-index: 1;
    width: 400px;
    max-width: calc(50% - 80px);
    margin: 0;
    padding: 0 0 0 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: max(80px, calc((50vw - 400px) / 2));
    box-sizing: border-box;
}

/* Hide the WP logo image + its link text, reuse the h1 as our heading slot */
body.login h1.wp-login-logo {
    display: block !important;
    width: auto;
    height: auto;
    margin: 0 0 20px;
    padding: 0;
    text-align: left;
    overflow: hidden;
}
body.login h1.wp-login-logo a {
    background: none !important;
    background-image: none !important;
    width: auto !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    overflow: hidden;
    text-indent: -9999px;
    font-size: 0 !important;
    line-height: 0 !important;
    pointer-events: none;
}
body.login h1.wp-login-logo::after {
    content: "Prihlásenie";
    display: block;
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--neo-text);
    line-height: 1.2;
}

/* heading via form ::before no longer used */
body.login #loginform::before { content: none; }
body.login #loginform::after { content: none; }

/* Card */
body.login form#loginform {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: var(--neo-r-lg);
    box-shadow: var(--neo-shadow);
    padding: 32px 32px 28px;
    margin: 0;
    overflow: visible;
}

/* Labels */
body.login form .input,
body.login form label {
    color: var(--neo-text);
    font-size: 13px;
}
body.login form label {
    font-weight: 550;
    line-height: 1.4;
    display: block;
    margin-bottom: 6px;
}
body.login form#loginform > p:first-of-type {
    margin-top: 18px;
}

/* Inputs */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"],
body.login .input {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: var(--neo-r-sm);
    color: var(--neo-text);
    font-size: 14px;
    padding: 10px 12px;
    line-height: 1.4;
    min-height: 44px;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 4px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus,
body.login .input:focus {
    border-color: var(--neo-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--neo-primary-soft);
}

/* Password wrap + show/hide button */
body.login .user-pass-wrap { margin-top: 18px; }
body.login .wp-pwd { position: relative; }
body.login .wp-pwd input.password-input {
    padding-right: 48px;
}
body.login .wp-pwd button.wp-hide-pw {
    position: absolute;
    top: 0;
    right: 0;
    height: 44px;
    width: 44px;
    min-height: 44px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 var(--neo-r-sm) var(--neo-r-sm) 0;
    color: var(--neo-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
body.login .wp-pwd button.wp-hide-pw:hover { color: var(--neo-primary); }
body.login .wp-pwd button.wp-hide-pw:focus {
    box-shadow: 0 0 0 3px var(--neo-primary-soft) !important;
    outline: none;
}
body.login .wp-pwd .dashicons { color: inherit; }

/* Caps lock warning */
body.login #caps-warning {
    background: #fdf2dc;
    border: 1px solid #f0dcae;
    color: #a4690c;
    border-radius: var(--neo-r-sm);
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 12.5px;
}
body.login #caps-warning svg { fill: #a4690c; stroke: #a4690c; }

/* Remember me + submit row — float keeps them on one line, submit forms a BFC */
body.login .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
    float: left;
    margin: 24px 0 0;
    height: 44px;
    font-size: 13px;
    color: var(--neo-text-2);
}
body.login .forgetmenot label { margin: 0; font-weight: 500; }
body.login input[type="checkbox"] {
    border: 1px solid var(--neo-border);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    box-shadow: none;
    background: var(--neo-surface);
    margin: 0;
}
body.login input[type="checkbox"]:checked {
    background-color: var(--neo-primary);
    border-color: var(--neo-primary);
}
body.login input[type="checkbox"]:checked::before {
    content: "\f147";
    color: #fff;
    margin: -2px 0 0 -3px;
}

/* Submit row: BFC (overflow:hidden) so it sits beside the floated remember-me */
body.login p.submit {
    margin: 24px 0 0;
    padding: 0;
    text-align: right;
    overflow: hidden;
    display: block;
}

/* Primary button */
body.login .button-primary,
body.login #wp-submit {
    background: #1a2031 !important;
    border: 1px solid #1a2031 !important;
    color: #fff !important;
    border-radius: var(--neo-r-sm) !important;
    font-size: 14px !important;
    font-weight: 550 !important;
    padding: 0 22px !important;
    min-height: 44px !important;
    line-height: 42px !important;
    text-shadow: none !important;
    box-shadow: 0 1px 2px rgba(19,26,43,.25), 0 2px 8px -2px rgba(19,26,43,.35) !important;
    width: auto !important;
    float: none !important;
    transition: background .15s, box-shadow .15s;
}
body.login .button-primary:hover,
body.login #wp-submit:hover {
    background: #0e1320 !important;
    border-color: #0e1320 !important;
    box-shadow: 0 0 0 3px rgba(19,26,43,.12), 0 2px 8px -2px rgba(19,26,43,.45) !important;
}

/* Secondary buttons (language switch "Zmeniť") */
body.login .button:not(.button-primary):not(.wp-hide-pw) {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: var(--neo-r-sm);
    color: var(--neo-text);
    font-size: 13px;
    min-height: 40px;
    line-height: 38px;
    padding: 0 14px;
    box-shadow: none;
    text-shadow: none;
    transition: background .15s, border-color .15s;
}
body.login .button:not(.button-primary):not(.wp-hide-pw):hover {
    background: var(--neo-bg);
    border-color: #d6dbe8;
    color: var(--neo-text);
}

/* Nav links */
body.login #nav,
body.login #backtoblog {
    margin: 18px 0 0;
    padding: 0;
    text-align: left;
    font-size: 13px;
}
body.login #backtoblog { margin-top: 10px; }
body.login #nav a,
body.login #backtoblog a {
    color: var(--neo-text-2);
    text-decoration: none;
    transition: color .15s;
}
body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: var(--neo-primary);
}

/* Language switcher */
body.login .language-switcher {
    margin: 28px 0 0;
    padding: 0;
    text-align: left;
}
body.login .language-switcher form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
body.login .language-switcher label {
    display: inline-flex;
    align-items: center;
}
body.login .language-switcher .dashicons-translation { color: var(--neo-muted); }
body.login .language-switcher select {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: var(--neo-r-sm);
    color: var(--neo-text);
    font-size: 13px;
    min-height: 40px;
    padding: 0 32px 0 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
}
body.login .language-switcher select:focus {
    border-color: var(--neo-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--neo-primary-soft);
}

/* Error / message boxes WP injects above the form */
body.login #login .notice,
body.login #login .message,
body.login #login #login_error {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-left: 3px solid var(--neo-primary);
    border-radius: var(--neo-r);
    box-shadow: var(--neo-shadow);
    color: var(--neo-text);
    font-size: 13px;
    padding: 12px 16px;
    margin: 0 0 18px;
}
body.login #login #login_error {
    border-left-color: #b5302a;
    background: #fbe6e4;
}
body.login #login .message {
    border-left-color: #15815a;
    background: #e3f6ec;
}

/* Responsive: single column, light bg, thin gradient accent on top */
@media (max-width: 782px) {
    body.login {
        background: #ffffff;
    }
    body.login form#loginform::after,
    body.login #login::after { content: none; }
    body.login #login {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
    body.login form#loginform { padding: 24px 22px; }
}
