/* Areas/Identity/Pages/Account/Login.cshtml - the design's sign-in screen (3a desktop, 3e tablet, 3i phone).
   A plain Razor Page outside Blazor, so its styles live here rather than in a .razor.css file. */

.login-body {
    margin: 0;
    background: var(--cc-surface);
}

.login {
    min-height: 100vh;
    display: flex;
}

/* ---- the blue brand panel ---- */
.login-brand {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 58px 68px;
    color: #fff;
    background: linear-gradient(155deg, #2b7fc4 0%, var(--cc-primary) 50%, var(--cc-primary-dark) 100%);
}

.login-brand > * {
    position: relative;
}

.login-brand .login-brand-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .13;
}

.login-brand-company {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -.4px;
}

    .login-brand-company svg {
        width: 44px;
        height: 44px;
    }

.login-brand-welcome {
    text-align: center;
}

.login-brand-welcome-to {
    font-size: 31px;
    font-weight: 300;
    margin-bottom: 12px;
}

.login-brand-product {
    font-size: 62px;
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1.05;
    margin-bottom: 18px;
}

.login-brand-edition {
    font-size: 27px;
    font-weight: 300;
    color: #e3f0fa;
}

.login-brand-copyright {
    font-size: 14px;
    line-height: 1.65;
    color: #e3f0fa;
}

/* ---- the sign-in panel ---- */
.login-panel {
    flex: none;
    width: 780px;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    padding: 60px 80px;
    background: var(--cc-surface);
}

.login-panel-product {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.6px;
}

    .login-panel-product svg {
        width: 40px;
        height: 40px;
        flex: none;
    }

.login-heading {
    margin: 0 0 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cc-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-errors ul {
    margin: 0 0 20px;
    padding: 12px 16px;
    list-style: none;
    border: 1px solid var(--cc-danger-line);
    border-radius: 6px;
    background: #fbeaec;
    color: var(--cc-danger);
    font-size: 14.5px;
}

.login-errors.validation-summary-valid {
    display: none;
}

.login-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--cc-ink-3);
}

.login-input {
    width: 100%;
    margin-bottom: 24px;
    padding: 14px 15px;
    border: 1px solid var(--cc-input-line);
    border-radius: 6px;
    font: 400 16.5px 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--cc-ink);
    background: var(--cc-surface);
    outline: none;
}

    .login-input:focus {
        border-color: var(--cc-primary);
        box-shadow: 0 0 0 3px rgba(27, 110, 194, .16);
    }

    .login-input.input-validation-error {
        border-color: var(--cc-danger);
    }

.login-field-error {
    display: block;
    margin: -18px 0 18px;
    font-size: 13.5px;
    color: var(--cc-danger);
}

    .login-field-error:empty {
        display: none;
    }

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 32px;
    font-size: 14.5px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    font-size: 15.5px;
    cursor: pointer;
}

    .login-remember input {
        width: 20px;
        height: 20px;
        margin: 0;
        accent-color: var(--cc-primary);
    }

.login-submit {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--cc-primary-line);
    border-radius: 6px;
    background: var(--cc-primary);
    color: #fff;
    font: 600 17px 'Helvetica Neue', Helvetica, Arial, sans-serif;
    cursor: pointer;
}

    .login-submit:hover {
        background: #1861ac;
    }

    .login-submit:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(27, 110, 194, .35);
    }

.login-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--cc-line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 14.5px;
    color: var(--cc-ink-3);
}

.login-form + .login-footer {
    margin-top: auto;
}

.login-panel .login-form {
    margin-bottom: 40px;
}

.login-version {
    font-size: 13.5px;
    color: var(--cc-muted);
    font-variant-numeric: tabular-nums;
}

.login-footer-label {
    margin-right: .3em;
    font-weight: 600;
    color: var(--cc-ink);
}

/* _Host.cshtml's static stand-in for company selection, shown over the app until SelectCompany has rendered. */
.cc-preload {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--cc-surface);
}

@media (max-width: 767.98px) {
    .cc-preload {
        overflow: hidden;
    }
}

/* ---- company selection (Pages/SelectCompany.razor) ----
   From tablet up the panel is pinned to the window so a long company list scrolls inside it, beside a brand panel that
   stays put. A phone has no room for that (the brand band alone is a third of the screen), so there the page simply
   scrolls. */
@media (min-width: 768px) {
    .login.login-fixed {
        height: var(--full-page-height, 100vh);
        min-height: 0;
    }

        .login.login-fixed .login-panel {
            min-height: 0;
        }
}

@media (max-width: 767.98px) {
    .login.login-fixed .company-lists {
        flex: none;
        overflow: visible;
    }
}

.company-note {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
    color: var(--cc-ink-3);
}

.company-search {
    position: relative;
    flex: none;
}

    .company-search i {
        position: absolute;
        left: 15px;
        top: 23px;
        transform: translateY(-50%);
        font-size: 14px;
        color: var(--cc-muted);
    }

    .company-search .login-input {
        padding-left: 40px;
        margin-bottom: 16px;
    }

.company-lists {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -8px 16px;
    padding: 0 8px;
}

.company-group-title {
    margin: 4px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--cc-primary);
}

.company-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.company-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--cc-line);
    border-radius: 6px;
    background: var(--cc-surface);
    text-align: left;
    color: var(--cc-ink);
    cursor: pointer;
}

    .company-row:hover:not(:disabled),
    .company-row:focus-visible {
        border-color: var(--cc-primary);
        background: var(--cc-selected-bg);
        outline: none;
    }

    .company-row.selecting {
        border-color: var(--cc-primary);
        background: var(--cc-selected-bg);
    }

    .company-row:disabled {
        cursor: default;
    }

.company-row-id {
    flex: none;
    min-width: 34px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cc-muted);
    font-variant-numeric: tabular-nums;
}

.company-row-name {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-row-go {
    flex: none;
    font-size: 11px;
    color: var(--cc-faint);
}

/* Opening a company: the chosen company, a step-by-step progress bar, or the reason it failed. */
.company-progress {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.company-progress-company {
    cursor: default;
}

.company-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--cc-line-soft);
    overflow: hidden;
}

.company-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--cc-primary);
    transition: width .4s ease;
}

.company-progress-step {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14.5px;
    color: var(--cc-ink-3);
}

.company-progress-count {
    flex: none;
    font-size: 13px;
    color: var(--cc-muted);
    font-variant-numeric: tabular-nums;
}

.company-progress-error {
    padding: 12px 16px;
    border: 1px solid var(--cc-danger-line);
    border-radius: 6px;
    background: #fbeaec;
    font-size: 14.5px;
    color: var(--cc-danger);
}

.company-progress-error-title {
    margin-bottom: 4px;
    font-weight: 600;
}

.company-signout {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--cc-ink-3);
}

    .company-signout form {
        margin: 0;
    }

    .company-signout button {
        padding: 0;
        border: 0;
        background: none;
        color: var(--cc-link);
    }

        .company-signout button:hover {
            text-decoration: underline;
        }

/* ---- tablet: 400px brand panel ---- */
@media (max-width: 1199.98px) {
    .login-brand {
        flex: none;
        width: 400px;
        padding: 34px 32px;
        background: linear-gradient(160deg, #2b7fc4 0%, var(--cc-primary) 52%, var(--cc-primary-dark) 100%);
    }

    .login-brand-company {
        gap: 12px;
        font-size: 19px;
    }

        .login-brand-company svg {
            width: 30px;
            height: 30px;
        }

    .login-brand-welcome {
        text-align: left;
    }

    .login-brand-welcome-to {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .login-brand-product {
        font-size: 38px;
        letter-spacing: -.7px;
        line-height: 1.08;
        margin-bottom: 12px;
    }

    .login-brand-edition {
        font-size: 19px;
    }

    .login-brand-copyright {
        font-size: 12.5px;
    }

    .login-panel {
        flex: 1;
        width: auto;
        max-width: none;
        padding: 44px 52px;
    }

    .login-panel-product {
        gap: 13px;
        margin-bottom: 38px;
        font-size: 24px;
    }

        .login-panel-product svg {
            width: 30px;
            height: 30px;
        }

    .login-input {
        font-size: 16px;
        padding: 13px 14px;
        margin-bottom: 20px;
    }
}

/* ---- phone: brand band above the form ---- */
@media (max-width: 767.98px) {
    .login {
        flex-direction: column;
    }

    /* TMS and its mark sit at the very top of the band, the product name at its foot. */
    .login-brand {
        flex: none;
        width: auto;
        min-height: 210px;
        justify-content: space-between;
        gap: 28px;
        padding: 18px 24px 22px;
    }

    .login-brand-company {
        gap: 10px;
        font-size: 15px;
    }

        .login-brand-company svg {
            width: 24px;
            height: 24px;
        }

    .login-brand-welcome-to,
    .login-brand-copyright {
        display: none;
    }

    .login-brand-product {
        font-size: 27px;
        letter-spacing: -.5px;
        line-height: 1.15;
        margin-bottom: 5px;
    }

    .login-brand-edition {
        font-size: 14.5px;
    }

    .login-panel {
        flex: 1;
        padding: 26px 24px 20px;
    }

    .login-panel-product {
        display: none;
    }

    .login-heading {
        font-size: 11.5px;
        margin-bottom: 18px;
    }

    .login-label {
        font-size: 13.5px;
        margin-bottom: 7px;
    }

    .login-input {
        padding: 14px;
        border-radius: 7px;
        margin-bottom: 18px;
    }

    .login-options {
        margin-bottom: 22px;
    }

    .login-submit {
        border-radius: 7px;
        font-size: 16.5px;
    }

    .login-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2px;
        font-size: 13px;
    }
}
