/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f1f3f4;
    margin: 0;
    padding: 20px;
}

body:not(.loading) {
    transition: all 300ms;
}

body.dark-mode {
    background: #202124;
    color: white;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #5f6368;
    color: #e2e2e3;
    min-height: 64px;
}
header div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 1rem;
}
header a, header button {
    color: #121213;
    text-decoration: none;
    padding: 4px 1rem;
    line-height: 1;
}

body.dark-mode header a,
body.dark-mode header button {
    color: #e2e2e3;
}

header h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0;
}
main .content {
    margin: 8px;
    padding: 1rem;
}
footer {
    margin: 8px;
    padding: 1rem;
}

/* Container for Notes */
/*
#notes-container {
    display: grid;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px;
}
*/

/* Header Buttons */
header button {
    border: none;
    background: none;
    font-size: 2rem;
    cursor: pointer;
}

.reload {
}
@keyframes spin {
    from {transform:rotate(0deg);}
    to {transform:rotate(360deg);}
}
.reload.reloading {
    animation-name: spin;
    animation-duration: 800ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* New Form */
main .note-new {
    display: flex;
    align-items: center;
    justify-content: space-around;
}
main .note-new form {
    margin: 2rem;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #5f6368;
    max-width: 600px;
}

/* Note Container */
#notes-container {
    margin: 2rem 2rem 2rem 2rem;
    columns: 6 200px;
    column-gap: 1rem;
}
#notes-container .note {
    margin: 0 1rem 1rem 0;
    display: inline-block;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .notes-container {
        grid-template-columns: 1fr;
    }
}

/* Individual Note */
.note {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease-in-out;
}

.note:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.23);
}

/* Note Title */
.note input[name=title] {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Note Content */
.note input[name=content] {
    font-size: 14px;
    flex-grow: 1;
}

/* Labels */
.note input[name=labels] {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.note .label {
    background-color: #e8eaed;
    color: #5f6368;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 12px;
}

/* Note Colours */
.note[data-color=null]      { background: white; color: black; border: 1px solid #e0e0e0; }
body.dark-mode .note[data-color=null]      { background: #202124; color: white; border: 1px solid #e0e0e0; }
.note[data-color=default]   { background: #202124; color: white; border: 1px solid #e0e0e0; }
.note[data-color=red]       { background: #77172e; color: white; }
.note[data-color=orange]    { background: #692b17; color: white; }
.note[data-color=yellow]    { background: #7c4a03; color: white; }
.note[data-color=green]     { background: #264d3b; color: white; }
.note[data-color=fog]       { background: #0c625d; color: white; }
.note[data-color=blue]      { background: #256377; color: white; }
.note[data-color=darkblue]  { background: #284255; color: white; }
.note[data-color=purple]    { background: #472e5b; color: white; }
.note[data-color=pink]      { background: #6c394f; color: white; }
.note[data-color=clay]      { background: #4b443a; color: white; }
.note[data-color=black]     { background: #232427; color: white; }

/* Note Dragging */
.note.dragging {
    opacity: 0.5;
    border: 2px dashed #4285f4;
    background-color: #f1f3f4;
}

.note.dropzone {
    border: 2px dashed #34a853;
}