/* Some basics to make it easier to read. */
body {
	--spacing: 2em;
	font-family: 'Inter', sans-serif;
	display: grid;
	gap: var(--spacing);
	margin: initial;
	padding: var(--spacing);
}


h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #1c1c1c;
}

form {
    background-color: whitesmoke;
    border-radius: calc(var(--spacing) / 2);
    display: grid;
    gap: var(--spacing);
    padding: var(--spacing);
    padding-block-end: 14rem;
    min-block-size: 100vh;
}

form > section:first-child {
    overflow-y: auto;
    min-block-size: 0;
}

form > section:last-child {
    position: fixed;
    inset-block-end: 3rem;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    inline-size: 420px;
    background-color: whitesmoke;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}


.xsmall-task {
    background-color: #D8F382;
    font-size: 0.75rem;
}

.small-task {
    background-color: #FF99DC;
    font-size: 0.85rem;
}

.medium-task {
    background-color: #826DEE;
    color: white;
    font-size: 1.1rem;
}

.large-task {
    background-color: #EB4213;
    color: white;
    font-size: 1.4rem;
}

.xlarge-task {
    background-color: #FFD93D;
    font-size: 1.75rem;
}

.xxlarge-task {
    background-color: #a02e0c;
    color: white;
    font-size: 2.25rem;
}


.strikethrough {
	text-decoration: line-through;
}

ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

/* Style the close button */

/* Used Gemini assistance to troubleshoot why my display block wasnt working and realised I had to add column view to li: https://gemini.google.com/share/312eda79dcba */

li {
    position: relative;
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

li.empty {
    grid-column: 1 / -1;
    background-color: transparent;
    font-size: 1rem;
    color: #999;
}


.hide {
	display: none;
}

/* 2. Pull the X out of the text flow and pin it to the right */
.close {
    position: absolute;
    inset-inline-end: 1rem;
    cursor: pointer;
    color: red;
    font-size: 2rem;
}

.close:hover {
    background-color: #f44336;
    color: white;
}

.task-name {
    display: block;
    font-weight: 600;
}

.task-time {
    display: block;
    font-size: 0.8em;
    opacity: 0.7;
}

label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaa;
    display: block;
    margin-block-end: 0.35rem;
}

input {
    inline-size: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e8e8e8;
    border-radius: 0.6rem;
    font-size: 1rem;
    background-color: white;
    outline: none;
    font-family: inherit;
    color: #1c1c1c;
}

input:focus {
    border-color: #1c1c1c;
}

input::placeholder {
    color: #ccc;
}

button {
    inline-size: 100%;
    padding: 0.75rem 1rem;
    background-color: #1c1c1c;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

button:hover {
    background-color: #333;
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    ul {
        grid-template-columns: repeat(3, 1fr);
    }

    form > section:last-child {
        inset-inline: 1rem;
        inset-block-end: 1.5rem;
        inset-inline-start: 1rem;
        transform: none;
        inline-size: auto;
    }
}

@media (max-width: 1024px) and (min-width: 601px) {
    ul {
        grid-template-columns: repeat(4, 1fr);
    }
}
