@font-face {
    font-family: 'Elected Office';
    font-style: normal;
    font-weight: 400;
    src: url('assets/elected-office.regular.ttf');
    font-display: swap;
}

:root {
    --bg-color: #82b;
    --bg-color2: #ffffa4;
    --bg-color3: #82b4df;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: Elected Office, Helvetica, Arial, sans-serif;
    margin: 1% auto;
    max-width: 90%;
    min-height: 98%;
    display: flex;
    flex-direction: column;
    animation: animated-bg 6s ease-in-out infinite alternate, coloring-bg 3s ease-in-out infinite alternate;
    transition: background-color 5s ease-in-out;
    background-image: radial-gradient(at 0% 0%, transparent 0%, var(--bg-color));
    background-size: 110% 110%;
    background-color: var(--bg-color2);
    background-attachment: fixed;
}

.custom-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1000;
    background: center/cover no-repeat;
}

@keyframes animated-bg {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -10vw -10vh;
    }
}
@keyframes coloring-bg {
    0% {
        background-color: var(--bg-color3);
    }
    100% {
        background-color: var(--bg-color2);
    }
}


/** common styles **/

h1, h2, h3 {
    text-align: center;
}
h1, h2 {
    margin: 12px 0 0 0;
}
h1 > *, h2 > *, h3 > * {
    vertical-align: middle;
}
h3, p {
    margin: 0;
}

ul {
    list-style-type: "− ";
    margin: 0;
    padding-inline-start: 2em;
}


/** boxes **/

section {
    min-height: 10%;
    margin: auto;
}

.box {
    background: rgba(255, 255, 255, 0.8);
    padding: .5rem 1rem;
    border-radius: 8px;
}

.row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.column, form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

@media screen and (orientation: portrait) {
    section {
        width: 80%;
    }
    .box {
        padding: .5rem;
    }
    .row {
        flex-direction: column;
    }
}


/** form pages **/

form > [type=submit] {
    width: 50%;
    padding: 12px 18px;
    font-size: 1.2em;
}

form > .helper {
    color: green;
    text-align: center;
}
form > .error {
    color: red;
    text-align: center;
}

label {
    margin-bottom: -8px;
}

input {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
    transition: border-color .15s ease-in-out;
    box-sizing: border-box;
    font: inherit;
}

.button, input[type=submit] {
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    text-align: center;
    background-color: #82b;
    cursor: pointer;
}
.button {
    display: inline-block;
}
.button.large, input[type=submit] {
    display: block;
}
input[type=submit].bad, .button.bad {
    background-color: indianred;
}
input[type=submit].good, .button.good {
    background-color: mediumseagreen;
}
.button > * {
    vertical-align: middle;
}

.button, input {
    transition: transform .2s ease;
}
.button:hover, input[type=submit]:hover, .button:focus, input:focus {
    transform: scale(1.05);
}

.avatar {
    align-self: center;
    background: white;
    border-radius: 8px;
}

.connection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/** scrollbars **/

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
}
::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.5);
}
