/* reset */

html {
    box-sizing: border-box;
    font-size: 16px;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

ol,
ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* end reset */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --primary: #4FFFDC;
    --secondary: #4FFFDC44;
    --background: #001E3D;
    --foreground: #ffffff;
    --foregroundSecondary: #ffffff88;
    --foregroundDark: #ffffff11;
    --drink: #3aa6ff;
    --eat: #aeff45;
    --do: #ffe066;
    --feel: #ff5050;
    --red: #ff5050;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    font-size: 17px;
}

header,
footer {
    padding: 1rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

header {
    display:flex;
    justify-content: space-around;
    align-items: center;
    padding-top:2rem;
}

main {
    padding:0 1rem;
}

footer {
    padding-bottom: 4rem;
}

nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1rem;
    z-index: 100;
    background-image:linear-gradient(to top, var(--background), transparent);
}

nav a {
    text-decoration: none;
    background-color: var(--primary);
    border-radius: 50px;
    width:45px;
    height:45px;
    display:flex;
    justify-content: center;
    align-items: center;
}

nav a * {
    pointer-events: none;
}

#modal {
    display:none;
}

#modal.open {
    display:block;
}

#modal.open .content-wrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    background-color: var(--background);
    padding:2rem;
    box-shadow: 0 0 200px black;
}

#modal.open .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
    z-index: 300;
}

#alert {
    display:none;
}

#alert.open {
    display:block;
}

#alert.open .content-wrapper {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);   
    z-index: 400;
    background-color: var(--background);
    padding:2rem;
    box-shadow: 0 0 200px black;
}

#alert.open .content-wrapper h2 {
    font-size:1rem;
}

#alert.open .alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
    z-index: 300;
}

.icon {
  width: 30px;
  height: 30px;
  stroke-width: 1;
  stroke: var(--background);
}

.icon > * {
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.icon .line-item {
  stroke: var(--background);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a,
button {
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-size: .8rem;
}

button {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--background);
    padding: .75rem 1.5rem;
    border-radius: 20px;
    font-weight:bold;
    text-transform: uppercase;
}

button.danger {
    background: var(--red);
    border-color: var(--red);
}

button.secondary {
    background: var(--background);
    color: var(--primary);
}

#predictedButtons {
    display:flex;
    flex-direction: column;
    gap:0.5rem;
}

#predictedButtons button {
    width: 100%;
    text-transform: none;
    text-align:left;
}

.button-wrapper {
    display:flex;
    justify-content: space-between;
    gap:0.5rem;
    margin-top:1rem;
}

section:nth-child(2) {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

section:nth-child(2) button:first-child {
    grid-column: 1 / -1;
}

section {
    padding: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* LOGIN */

section#login {
    display: flex;
    gap: 1rem;
    height: 100vh;
    justify-content: center;
    align-items: center;
    padding:60px;
}

/* FORMS */

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form > div {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    position:relative;
}

label {
    font-size: .8rem;
    color: var(--foregroundSecondary);
}

input,
select,
textarea {
    border: none;
    background: var(--foregroundDark);
    color: white;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--foregroundSecondary);
    border-radius:0;
    font-size:1rem;
}

select {
    appearance: none;
    -webkit-appearance: none;
}

#formLogAutocomplete {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--background);
    border-bottom: 1px solid var(--foregroundSecondary);
    box-shadow: 0 0 200px black;
    border-radius: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 500;
}

#formLogAutocomplete li {
    padding: .75rem 1rem;
    cursor: pointer;
}

#formLogAutocomplete li:hover {
    background: var(--foregroundSecondary);
}


/* VIEW */

#viewEntity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#viewEntityNotes:not(:empty) {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--secondary);
}

#viewEntityAmountTime {
    color: var(--foregroundSecondary);
}

/* LIQUID BAR */

#liquidBar {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .8rem;
}

#liquidBarHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#liquidBarProgress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
}

#liquidBarProgress::-webkit-progress-bar {
    background-color: rgba(255,255,255,0.1);
    border-radius: 999px;
}

#liquidBarProgress::-webkit-progress-value {
    background-color: var(--drink);
    border-radius: 999px;
}

/* LOG ENTRIES */

.logEntry {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 0 0 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--secondary);
}

.logEntryType {
    border: none;
    background: var(--secondary);
    color: var(--primary);
    padding: .2rem .4rem;
    border-radius: 50px;
    font-size:.7rem;
    text-transform: uppercase;
    width:fit-content;
}

.logEntryType.drink {
    background: hsla(from var(--drink) h s l / 0.3);
    color: var(--drink);
}

.logEntryType.eat {
    background: hsla(from var(--eat) h s l / 0.3);
    color: var(--eat);
}

.logEntryType.do {
    background: hsla(from var(--do) h s l / 0.3);
    color: var(--do);
}

.logEntryType.feel {
    background: hsla(from var(--feel) h s l / 0.3);
    color: var(--feel);
}

.logEntryMeta,
.logEntryDescription {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logEntryTimeAmount {
    color: var(--foregroundSecondary);
    font-size: .8rem;
}

.logEntryActions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.logEntryActions button {
    background: none;
    border: none;
    color: var(--foregroundSecondary);
    font-size: .8rem;
    padding: 0;
    text-transform: capitalize;
    font-weight:normal;
}