/*
 * Admac Portal: the login page (/index.php), also used by the company
 * picker (/ext/company.php)
 *
 * Kept out of the page so the PHP stays readable. Loaded with
 * <link rel="stylesheet">, which the Content Security Policy allows.
 */

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f6f8;
    font-family: Aptos, Calibri, Arial, sans-serif;
    color: #333;
    background-image: url('background.svg');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    background-attachment: fixed;
}

.card {
    width: 100%;
    max-width: 500px;
    background: #fafafa;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 42px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 8px 20px rgba(0,0,0,0.12);
}

h1 {
    margin: 0 0 20px;
    font-size: 26px;
    text-align: center;
}

p {
    margin: 0 0 20px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #0070C0;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #004E86;
}

.error {
    background: #ffeaea;
    color: #b00020;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.notice {
    background: #eaf3fb;
    color: #004E86;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.success {
    background: #eef8ee;
    color: #0a6b0a;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Phone and email under the login form: matches the contact lines on
   the Consultants page (gateway.css .person-line) */
.contact-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.contact-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
}

.contact-links svg {
    flex-shrink: 0;
    color: #8a96a3;
}

.contact-links a:hover,
.contact-links a:hover svg {
    color: #0a64c5;
}

/* Bottom-left of the screen, kept quiet */
.privacy-link {
    position: fixed;
    left: 20px;
    bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-decoration: none;
}

.privacy-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* For screen readers only (the email box's label) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.otp-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.otp-links form {
    flex: 1;
    margin: 0;
}

.otp-links button {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    color: #0a64c5;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}

.otp-links form:last-child button {
    text-align: right;
}

.otp-links button:hover {
    text-decoration: underline;
}

.otp-links form {
    flex: none;
}

.otp-links button {
    width: auto;
}

/* Logo above the form */
.logo {
    width: 100%;
    text-align: center;
}

.logo img {
    width: 200px;
}

/* "Remember me" checkbox row on the code screen */
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.remember input {
    width: auto;
    margin: 0;
}

/* The email address on the code screen: on its own line, and a long one
   wraps (preferably after the "@") instead of overflowing */
.card .sent-to {
    display: block;
    overflow-wrap: break-word;
}

/* Company picker (company.php): one button per company */
.company-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 5px;
}

.company-list button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-family: inherit;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.company-list button:hover,
.company-list button:focus-visible {
    background: #eef5ff;
    border-color: #0070C0;
    color: #004E86;
}

.company-list button.current {
    border-color: #0070C0;
    border-width: 2px;
}

.company-list .company-name {
    overflow-wrap: anywhere;
}

.company-list .company-current {
    flex: none;
    font-size: 13px;
    color: #0070C0;
}

/* "Back to your documents" link on the company picker */
.otp-links a {
    color: #0a64c5;
    font-size: 14px;
    text-decoration: none;
}

.otp-links a:hover {
    text-decoration: underline;
}

/* "Please enter your registered email address." on the login page:
   a little more room above the email box */
.prompt {
    margin-top: 6px;
    margin-bottom: 26px;
}

/*
 * Phones
 *
 * Kept at the end of the file so these rules override the ones above.
 */
@media (max-width: 540px) {
    /* Leave a margin round the card so it doesn't touch the screen edges */
    body {
        padding: 16px;
        box-sizing: border-box;
    }

    .card {
        padding: 28px 22px;
    }

    .logo img {
        width: 170px;
    }

    /* The privacy link goes under the card instead of in the corner, so
       it can never cover the form on a small screen */
    body {
        flex-direction: column;
    }

    .privacy-link {
        position: static;
        margin-top: 16px;
    }
}
