﻿@charset "utf-8";

/*
   Login page (admins and panelists, also on tablets and phones).
   Visual layer only: Login.aspx and js/login.js are unchanged.
   No web fonts on purpose (no requests to third parties).
*/

:root {
    --brand: #A51E22;          /* identical to the logo background */
    --brand-dark: #84161A;
    --ink: #22262B;
    --muted: #5F6672;
    --line: #CBD0D6;
    --danger: #B3261E;
}

html {
    min-height: 100%;
    background: #7A1418 url(../assets/Login_Background.jpg) no-repeat center center fixed;
    background-size: cover;
}

body {
    margin: 0;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
    background: transparent;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout: card centred in the window, footer pinned to the bottom ---------- */

#form {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 72px;
    box-sizing: border-box;
    position: relative;
}

#form .row {
    margin-left: 0;
    margin-right: 0;
}

.content-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: transparent;
}

#login-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(40, 6, 8, .25), 0 24px 60px rgba(40, 6, 8, .45);
    text-align: left;
}

/* ---------- Card header with the logo ---------- */

#header {
    background-color: var(--brand);
    padding: 26px 24px 22px;
    text-align: center;
}

#header #logo img {
    width: 168px;
    height: auto;
    display: inline-block;
}

/* ---------- Form ---------- */

#login-box {
    background-color: #ffffff;
    color: var(--ink);
    padding: 28px 28px 26px;
}

#login-box p {
    margin: 0 0 6px;
    color: var(--danger);       /* failure texts are bare text inside the paragraphs */
    font-size: 13px;
    line-height: 1.4;
}

input[type=text], input[type=password] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    margin-bottom: 4px;
    color: var(--ink);
    background-color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;            /* 16px: iOS does not zoom into the field */
    text-align: left;
    transition: border-color .12s ease, box-shadow .12s ease;
}

input[type=text]::placeholder, input[type=password]::placeholder {
    color: var(--muted);
    opacity: 1;
}

input[type=text]:hover, input[type=password]:hover {
    border-color: #A9AFB7;
}

input[type=text]:focus, input[type=password]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(165, 30, 34, .2);
    outline: 0;
    text-align: left;
}

/* "required" hints of the validators: they keep their line also while hidden, so the form does not jump */
#login-box span[id$="Required"] {
    display: block;
    min-height: 18px;
    font-size: 13px;
    color: var(--danger) !important;
}

/* ---------- Maintenance notice (shown instead of the form, see Login.aspx) ---------- */

#login-box .maintenance h1 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

#login-box .maintenance p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
}

#login-box .maintenance p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

#login-box p.submit {
    margin: 20px 0 0;
}

input[type=submit] {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    outline: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background-color .12s ease, box-shadow .12s ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type=submit]:hover {
    background: var(--brand-dark);
}

input[type=submit]:active {
    background: #6E1216;
}

input[type=submit]:focus-visible {
    outline: 2px solid var(--brand-dark);
    outline-offset: 3px;
}

input[type=submit]:disabled {
    background: #B9BEC5;
    cursor: default;
}

/* ---------- Footer ---------- */

#footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 0;
    background-color: transparent;
}

#footer .content-wrapper {
    max-width: none;
}

#footer-text {
    height: auto;
    padding: 0 16px 20px;
    text-align: center;
    font-size: 11px;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .78);
}

#footer-text p {
    margin: 0;
}

@media (max-width: 420px) {
    #login-box {
        padding: 22px 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    input[type=text], input[type=password], input[type=submit] {
        transition: none;
    }
}
