@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: none;
}

button, input, select, textarea {
    font: inherit;
    background: transparent;
    border: 0;
}

input:focus {
    outline: none;
}

ol, ul, menu {
    list-style: none;
}

button {
    color: black;
}

button:hover {
    cursor: pointer;
}

input::placeholder {
    color: var(--light-grey);
}

/* Root Variables */
:root {
    --font-family: "Lato", Sans-Serif;
    --font-size: 20px;
    --light-grey: #d1d5db;
}

/* Global Styles */
html {
    height: 100%;
}

body {
    font-size: var(--font-size);
    font-family: var(--font-family), sans-serif;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
}

/* App Container */
#app {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
}

/* Page Layout */
.page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
}

.new-project-page {
    justify-content: space-between;
}

/* Header Styles */
.header {
    flex: 1;
    max-height: 8rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.header h1 {
    font-size: 2rem;
    overflow-wrap: anywhere;
}

.header__menu {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
}

/* Panels Layout */
.panels {
    display: flex;
    flex-direction: column-reverse;
    row-gap: 2rem;
    column-gap: 3rem;
}

@media (min-width: 450px) {
    #app {
        align-items: center;
    }
    .page {
        width: 100%;
        max-width: 45rem;
    }
    .new-project-page {
        justify-content: flex-start;
    }
    .panels {
        flex-direction: row;
    }
    .timer {
        flex: 1;
        max-width: 13rem;
    }
    .todo {
        flex: 1;
        max-width: 50rem;
    }
}

/* Text Styles */
.daily-place {
    font-style: italic;
}

/* Panel Component */
.panel h2 {
    font-weight: 700;
}

.panel__header {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
}

.panel__title-group {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.panel__subtitle {
    font-weight: 200;
}

/* Timer Component */
.timer__time {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timer__controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.2rem;
}

.timer__controls-group {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.2rem;
}

/* Button Styles */
.button-with-border {
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--light-grey);
    border-radius: 3px;
    font-weight: 700;
    color: black;
}

.button-with-border:disabled {
    color: var(--light-grey);
}

/* Todo Component */
.todo__list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 1rem;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.todo-item input {
    width: 100%;
}

.todo-item__controls {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.todo-item__button {
    padding: 0.1rem;
    font-weight: 200;
}

/* Checkbox Component */
.checkbox-button {
    align-items: center;
    display: inline-flex;
    cursor: pointer;
}

.checkbox-button__input {
    display: none;
}

.checkbox-button__square {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    margin-right: 0.5rem;
    height: 1rem;
    width: 1rem;
}

.checkbox-button__checkbox {
    background-color: transparent;
    border-radius: 0.1rem;
    height: 0.5rem;
    width: 0.5rem;
}

.checkbox-button__checkbox--selected {
    background-color: black;
}

/* New Project Component */
.new-project {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.new-project__spaces {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.new-project__form {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
}

.new-project__input {
    width: 100%;
    border-bottom: 1px solid var(--light-grey);
}

.new-project__button {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15rem;
}

.new-project__spaces-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.new-project__space-entry {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.new-project__description {
    overflow-wrap: break-word;
}

.new-project__description p {
    margin-bottom: 1rem;
}
