﻿/* Defines colors based on Komponents visual identity. */
:root {
    --color-primary: #5c7cff;
    --color-primary-hover: #405fe0;
    --color-background: #f8f8f5;
    --color-surface: #e0e5ff;
    --color-text-light: #ffffff;
    --color-text-dark: #1a1a1a;
    --color-text-muted: #525252;
    --color-border-light: #aeb9ee;
    --color-accent: #ff5a5f;
    --color-yellow: #ffc800;
    --border-radius: 4px;
}

/* Places the image and login form next to each other. */
.login-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-background);
    color: var(--color-text-dark);
}

/* Centers the logo in the left section. */
.loginimage {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #f5f3ed;
}

    /* Makes the SVG fill the available width without changing its proportions. */
    .loginimage .logo__icon {
        display: block;
        position: static;
        width: 100%;
        max-width: 900px;
        height: auto;
        transform: none;
    }

    /* Colors the diagonal part of the logo. */
    .loginimage .logo__icon--skew-line {
        fill: #ff5a5f;
    }

    /* Colors the three vertical lines. */
    .loginimage .logo__icon--line {
        fill: #5c7cff;
    }

    /* Colors the circle. */
    .loginimage .logo__icon--circle {
        fill: #ffc800;
    }

    /* Colors the Komponent lettering. */
    .loginimage .logo__icon--text {
        fill: #1a1a1a;
    }

/* Gives the login panel a soft lavender background. */
.loginform {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 550px;
    min-height: 100vh;
    margin-left: auto;
    padding: 60px;
    background-color: var(--color-surface);
    color: var(--color-text-dark);
    text-align: center;
}

/* Uses the dark button style seen on Komponents website. */
.btn-primary {
    background-color: var(--color-text-dark);
    border-color: var(--color-text-dark);
    color: var(--color-text-light);
}

    /* Uses the coral accent when the button is highlighted. */
    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--color-accent);
        border-color: var(--color-accent);
        color: var(--color-text-dark);
    }

/* Highlights the active form field in Komponents blue. */
.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(92, 124, 255, 0.18);
}

/* Adds space below each form field. */
.form-group {
    padding-bottom: 20px;
}

/* Matches Kendo controls to the form corners. */
.k-button,
.k-textbox {
    border-radius: var(--border-radius) !important;
}


/* Styles links in the brand color. */
a {
    color: var(--color-primary);
}

    /* Styles links on hover. */
    a:hover {
        color: var(--color-primary-hover);
    }

/* Styles the form inputs. */
.form-control {
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius) !important;
    color: var(--color-text-dark);
}


/* Matches button corners to the form inputs. */
.btn {
    border-radius: var(--border-radius) !important;
}

/* Positions the logo on the form panel. */
.logopos {
    position: fixed;
    right: 175px;
    bottom: 50px;
    width: 200px;
    height: auto;
    opacity: var(--opacity-logo);
}

/* Centers the one-time code fields. */
.otc {
    position: relative;
    width: 320px;
    margin: 0 auto;
}

    /* Removes the default fieldset border. */
    .otc fieldset {
        margin: 0;
        padding: 10px;
        border: 0;
    }

        /* Aligns the code inputs horizontally. */
        .otc fieldset div {
            display: flex;
            align-items: center;
        }

    /* Styles the code field heading. */
    .otc legend {
        margin: 0 auto 1em;
        color: var(--color-primary);
    }

    /* Styles each code digit. */
    .otc input[type="number"] {
        width: .82em;
        margin: .1em;
        padding: 8px 0 4px;
        border: 2px solid var(--color-border-light);
        border-radius: var(--border-radius);
        background-color: var(--color-surface);
        color: var(--color-text-dark);
        font-size: 2.65em;
        line-height: 1;
        text-align: center;
        appearance: textfield;
        -webkit-appearance: textfield;
    }

        /* Highlights the active code digit. */
        .otc input[type="number"]:focus {
            border-color: var(--color-primary);
            outline: none;
        }

    /* Hides number input spinner controls. */
    .otc input::-webkit-outer-spin-button,
    .otc input::-webkit-inner-spin-button {
        margin: 0;
        -webkit-appearance: none;
    }

    /* Places the final three code digits after the separator. */
    .otc input[type="number"]:nth-child(n+4) {
        order: 2;
    }

    /* Draws a separator between code groups. */
    .otc div::before {
        content: "";
        order: 1;
        width: 24px;
        height: 2px;
        margin: 0 .25em;
        background-color: var(--color-accent);
    }

    /* Keeps code labels available to screen readers. */
    .otc label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        clip: rect(1px, 1px, 1px, 1px) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
    }

/* Keeps the form usable on narrow screens. */
@media (max-width: 768px) {
    .loginimage {
        display: none;
    }

    .loginform {
        max-width: none;
        padding: 32px 24px;
    }

    .logopos {
        position: static;
        display: block;
        margin: 32px auto 0;
    }
}
