/* Font setup */
@font-face {
    font-family: "Open Sans";
    src: url(VAADIN/themes/valo/fonts/open-sans/OpenSans-Semibold-webfont.woff) format("woff");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Roboto-Regular";
    src: url('./fonts/Roboto-Regular.woff') format("woff");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'skladin-icons';
    src: url('fonts/skladin-icons.woff?vyux4v') format('woff'),
    url('fonts/skladin-icons.svg?vyux4v#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="icon-"], [class*=" icon-"] {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'skladin-icons' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;

    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* General */
:root {
    --main-bg-color: #093545;
    --primary-color: #20BF7F;
    --primary-color-hover: #20C87F;
    --main-white: #fff;
    --form-bg-color: #f9f9f9;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--main-bg-color);
    font: 100 16px/1.55 "Roboto-Regular", sans-serif;
}

/* Layout */
*, *:before, *:after {
    box-sizing: border-box;
}

.main-container {
    height: 100%;
}

.info {
    color: var(--main-white);
    text-align: center;
    padding: 28px;
}

.form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--form-bg-color);
    box-shadow: 3px 3px 3px rgb(200 200 200 / 30%);
    border-radius: 15px;
    row-gap: 15px;
}

/* Elements / components theme */
h1 {
    font-size: 3.25em;
    font-weight: 100;
}

h2 {
    font-weight: 100;
    margin: 0;
}

.login-image {
    width: 430px;
    height: 430px;
}

form {
    width: 90%;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

label {
    position: relative;
    border-bottom: 1px solid #aaa;
}

input {
    width: 100%;
    padding: 10px 0;
    margin-top: 20px;
    border: none;
    outline: none;
    background-color: var(--form-bg-color);
}

input::placeholder {
    opacity: 0;
}

.form-label {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(30px);
    font-size: 1em;
    transition-duration: 300ms;
}

label:focus-within > span,
input:not(:placeholder-shown) + span,
input:-webkit-autofill + span {
    color: var(--primary-color);
    transform: translateY(0px);
    font-size: 0.9em;
}

/* Change autofill background color */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--form-bg-color) inset !important;
}

.fade-line {
    height: 1px;
    width: 100%;
    margin-top: auto;
    background-image: linear-gradient(left, white 10%, #E6E6E6 50%, white 90%);
    background-image: -o-linear-gradient(left, white 10%, #E6E6E6 50%, white 90%);
    background-image: -moz-linear-gradient(left, white 10%, #E6E6E6 50%, white 90%);
    background-image: -webkit-linear-gradient(left, white 10%, #E6E6E6 50%, white 90%);
    background-image: -ms-linear-gradient(left, white 10%, #E6E6E6 50%, white 90%);
    background-image: -webkit-gradient(linear, left bottom, right bottom, color-stop(0.10, white), color-stop(0.5, gray), color-stop(0.90, white));
}

.button-submit {
    height: 54px;
    font-size: 1.15em;
    text-align: center;
    margin-top: 14px;
    border: none;
    color: var(--main-white);
    background: var(--primary-color);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition-duration: 300ms;
}

.button-submit:hover {
    background: var(--primary-color-hover);
    transition-duration: 300ms;
}

.button-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.button-wrapper .button {
    display: inline-block;
    height: 60px;
    width: 240px;
    float: left;
    margin: 0 5px;
    overflow: hidden;
    background: var(--main-white);
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: -7px -7px 20px 0 rgba(0, 0, 0, 0.1), 7px 7px 20px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-out;
    text-decoration: none;
}

.button-wrapper .button .icon {
    display: inline-block;
    height: 60px;
    width: 60px;
    text-align: center;
    border-radius: 30px;
    box-sizing: border-box;
    line-height: 60px;
    background: var(--primary-color);
    color: var(--main-white);
    transition-duration: 300ms;
}

.button-wrapper .button:hover > .icon {
    background: var(--primary-color-hover);
    transition-duration: 300ms;
}

.icon-manual {
    font-size: 1.7em;
    vertical-align: sub;
}

.icon-manual:before {
    content: "\e900";
}

.vectors {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
}

/*error*/
.error input, .error-locked input {
    display: block;
    border-color: red;
}

.error form:after {
    content: "Neispravno korisničko ime ili lozinka.";
}

.error-locked form:after {
    content: "Korisnički račun je zaključan. Molimo obratite se administratoru.";
}

.error form:after, .error-locked form:after {
    display: block;
    border: 2px solid red;
    border-radius: 6px;
    width: 100%;
    font-size: 0.85em;
    padding: 5px;
    text-align: center;
}

/* Responsive behaviour */
@media (max-width: 1000px) {
    h1 {
        margin: 0;
    }

    h2, .vectors {
        display: none;
    }

    .login-image {
        width: 230px;
        height: 230px;
    }

    .form {
        height: 100%;
        border-radius: 0;
    }

    form {
        margin-top: 20px;
    }

    .fade-line {
        margin: 0;
    }
}

@media (min-width: 1001px) {
    .main-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 100px;
        margin-top: -50px;
    }

    .form {
        width: 500px;
        height: 500px;
        padding: 28px;
    }
}