/* General CSS */
body {
    font: 18px Arial, sans-serif;
    margin: 0;
    background-color: #fcfcfc;
    color: black;
}

* {
    -webkit-tap-highlight-color: transparent;
    font-size: inherit;
    font-family: Arial, sans-serif;
}

*::backdrop {
    background-color: #fcfcfc;
}

::selection {
    background-color: #add2ff;
}

/* Header */
#header,
#header-win {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    background-color: #3f51b5;
    color: white;
    box-shadow: 0px 2px 20px 4px rgba(0, 0, 0, 0.2);
}

h1 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 400;
}

h3 {
    margin: 0;
}

p {
    margin: 0;
}

svg {
    cursor: pointer;
    transition: all .2s;
    padding: 4px;
    border-radius: 50%;
}

svg:hover {
    background-color: rgba(255, 255, 255, 0.288);
}

/* Main Content */
#main,
#main-win {
    min-height: calc(100vh - 100px);
    padding: 24px;
}

#window {
    display: none;
    position: fixed;
    top: 10%;
    background-color: #fcfcfc;
    width: 100%;
    transition: all .3s;
    opacity: 0;
}

/* Footer */
footer {
    background-color: #424242;
    color: #dfdfdf;
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

footer a {
    color: inherit;
}

/* List of units */
#unit-list {
    list-style-type: none;
    padding: 0;
}

#unit-list li {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #dfdfdf;
    transition: all 0.2s;
    color: #4b4b4b;
}

#unit-list li:hover {
    background-color: #f3f3f3;
}

#unit-list li:focus {
    outline: 2px solid blue;
}

#unit-list li:last-child {
    border-bottom: none;
}

/* Unit input + button */
.input {
    width: 200px;
    border: none;
    outline: 2px solid transparent;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    color: #4b4b4b;
}

.input:focus,
.input:active {
    border-bottom: 2px solid #3f51b5;
}

.input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.btn-pink {
    outline: 2px solid transparent;
    border: none;
    background-color: #ff4081;
    color: #ffffff;
    height: 36px;
    padding: 0 16px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: .8em;
    font-weight: bold;
    border-radius: 2px;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3);
    transition: all .2s;
}

.btn-pink:active {
    background-color: #ffa0c0;
}

#win-input {
    position: fixed;
    width: 100%;
    min-height: 64px;
    gap: 24px;
}

/* Unit Results */
#unit-results {
    margin-top: 64px;
    padding-top: 16px;
    overflow: auto;
    max-height: calc(100vh - 180px);
}

.error {
    padding: 16px 64px;
    width: fit-content;
    background-color: #3f51b5;
    color: white;
    margin: auto;
    margin-bottom: 16px;
    border-radius: 4px;
    box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.3);
}

.grid {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 32px;
    row-gap: 16px;
}

.grid *:nth-child(even) {
    text-align: end;
}