﻿:root {
    --color: rgb(11, 3, 85);
    --color-bad: rgb(168, 38, 49);
    --btn-color: rgb(11, 3, 85);
    --btn-text: #ffffff;
    --btn-hover-color: #ffffff;
    --btn-hover-text: rgb(11, 3, 85);
    --btn-disabled: rgba(11,3,85,0.5);
    --btn-disabled-hover-color: rgba(0,0,0,0.5);
    --btn-disabled-hover-text: #ffffff;
    --input-border-color: rgb(44,44,44);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color: #ffffff;
        --color-bad: rgb(168, 38, 49);
        --btn-color: #4A7FA7;
        --btn-text: #ffffff;
        --btn-hover-color: #ffffff;
        --btn-hover-text: rgb(11, 3, 85);
        --btn-disabled: rgba(44,44,44,0.5);
        --btn-disabled-hover-color: rgba(0,0,0,0.5);
        --btn-disabled-hover-text: #ffffff;
        --input-border-color: rgb(255,255,255);
    }
}

/*::::::::::::::::::: buttons and links :::::::::::::::::::*/
.button {
    width: 100%;
    max-width: 250px;
    padding: 5px 10px;
    background-color: var(--btn-color);
    color: var(--btn-text);
    border: 2px solid var(--btn-color);
    border-radius: 5px;
    display: block;
    margin: 0 auto;
    text-decoration: none;
}

    .button:hover {
        background-color: var(--btn-hover-color);
        color: var(--btn-hover-text);
    }

    .button:disabled {
        background: var(--btn-disabled);
        border-color: var(--btn-disabled);
    }

        .button:disabled:hover {
            cursor: not-allowed;
            background: var(--btn-disabled-hover-color);
            border-color: var(--btn-disabled-hover-color);
            color: var(--btn-disabled-hover-text);
        }

    .button.small {
        padding: 3px 5px;
    }

.link {
    font-weight: bold;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 0px 10px;
    border-radius: 5px;
}

    .link:hover {
        background-color: var(--btn-color);
        color: var(--btn-text);
    }

/*::::::::::::::::::: inputs :::::::::::::::::::*/
input, select, textarea {
    color: inherit;
    border-color: var(--input-border-color);
}

    /* Chrome, Safari, Edge, Opera */
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* Firefox */
    input[type=number] {
        -moz-appearance: textfield;
    }

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
        /* Replace #ffffff with your desired background color */
        -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    }

input {
    appearance: none; /* Removes platform-native styling */
    -webkit-appearance: none !important;
}

/*::::::::::::::::::: input floating labels :::::::::::::::::::*/
.wave-group {
    position: relative;
}

    .wave-group .input {
        font-size: 16px;
        padding: 10px 10px 3px 5px;
        display: block;
        width: 100%;
        border: none;
        border-bottom: 1px solid var(--input-border-color);
        background: transparent;
    }

        .wave-group .input:focus {
            outline: none;
        }

    .wave-group .label {
        color: var(--color); /*#999;*/
        font-size: 18px;
        font-weight: normal;
        position: absolute;
        pointer-events: none;
        left: 5px;
        top: 10px;
        display: flex;
    }

    .wave-group .label-char {
        transition: 0.2s ease all;
        transition-delay: calc(var(--index) * .05s);
    }

    .wave-group .input:focus ~ label .label-char,
    .wave-group .input:valid ~ label .label-char,
    .wave-group .input:not(:placeholder-shown) ~ label .label-char {
        transform: translateY(-20px);
        font-size: 14px;
        color: var(--color);
    }

    .wave-group .bar {
        position: relative;
        display: block;
        width: 100%;
    }

        .wave-group .bar:before, .wave-group .bar:after {
            content: '';
            height: 2px;
            width: 0;
            bottom: 1px;
            position: absolute;
            background: var(--color);
            transition: 0.2s ease all;
            -moz-transition: 0.2s ease all;
            -webkit-transition: 0.2s ease all;
        }

        .wave-group .bar:before {
            left: 50%;
        }

        .wave-group .bar:after {
            right: 50%;
        }

    .wave-group .input:focus ~ .bar:before,
    .wave-group .input:focus ~ .bar:after {
        width: 50%;
    }

form.was-validated .wave-group .input:invalid {
    border-color: var(--color-bad);
}

    form.was-validated .wave-group .input:invalid ~ .bar {
        height: 2px;
        background: var(--color-bad);
    }
