body {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
}

[type=checkbox], [type=radio] {
    flex-basis: 100%;
    max-width: 2em;
    height: 2em;
}

.secondary {
    color: var(--secondary);
}

.page-title {
    text-align: center;
    text-transform: capitalize;
}

small {
    font-size: 12px;
}

#add_to_list {
    display: flex;
    margin-bottom: 0;
    position: relative;
}

#add_to_list input[type="submit"] {
    flex-basis: 100%;
    max-width: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);
    margin-left: 14px;
    font-size: 1.5em;
    line-height: 1;
}

#show_list {
    margin-bottom: 30px;
}

#show_list ul,
#checked_list ul {
    padding: 0;
    margin-bottom: 0;
}

#show_list .sortable_list {
    padding: 15px 0 0;
}

.item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid var(--muted-border-color);
}

#show_list .item {
    border: 0;
    padding: 7px 0 7px;
}

.item input[type=text] {
    margin-bottom: 0;
}

.item input[type=checkbox] {
    margin-top: 0;
    margin-right: 10px;
    background-size: 1em
}

#checked_list .item:first-child {
    border-top: 1px solid var(--muted-border-color);
}

#checked_list .item input[type=checkbox] {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

#new-item {
    position: relative;
}

#new-item #suggestions {
    width: 100%;
    margin-top: 7px;
}

#logout {
    display: block;
    margin-top: 30px;
    text-align: center;
}

.list-state {
    width: 300px;
    text-align: center;
    position: fixed;
    top: -50px;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-bottom: 1px solid;
    border-left: 1px solid;
    border-right: 1px solid;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    transition: top 0.35s ease-in-out;
}

.list-state.is-visible {
    top: 0;
    transition: top 0.35s ease-in-out;
}

.list-state strong {
    display: block;
    padding: 6px;
}

.saved {
    color: #0ccc0c;
    background: #0c3a0c;
}

.not-saved {
    color: red;
    background: rgb(108, 5, 5);
}

.delete {
    right: 0;
    margin-left: auto;
    text-decoration: none;
    transform: rotate(45deg);
    font-size: 1.8em;
    line-height: 1;
}

/** Suggestions **/
#suggestions {
    position: absolute;
    top: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);
    background: var(--background-color);
    width: calc(100% - (1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2) - 15px);
    border-bottom: 1px solid;
    border-left: 1px solid;
    border-right: 1px solid;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-color: var(--form-element-border-color);
    z-index: 9;
}

#suggestions ul {
    margin: 0;
    padding: 0;
}

#suggestions ul li {
    list-style: none;
    cursor: pointer;
    padding: var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal);
    transition: .25s all ease-in-out;
}

#suggestions ul li:hover {
    background-color: var(--secondary);
}

/** Drag and Drop */
.drag {
    display: flex;
    flex-basis: 100%;
    justify-content: center;
    max-width: 3em;
    flex-wrap: wrap;
    cursor: move;
    padding: .5em;
}

.drag span {
    width: .5em;
    height: .5em;
    display: block;
    background: var(--secondary);
    border-radius: 13px;
    margin: 2px;
}

/** Specific CSS for light mode */
@media screen and (prefers-color-scheme: light) {
    #show_list .item input {
        background-color: #fff;
    }
    
    .saved {
        background: #f3f8eb;
        color: #83bb22;
        border-width: 2px;
        border-color: #83bb22;
        box-shadow: 0px 1px 10px 3px rgb(131 187 34 / 28%);
    }
    
    .not-saved {
        background: #faedec;
        color: #e00e0e;
        border-width: 2px;
        border-color: #e00e0e;
        box-shadow: 0px 1px 10px 3px rgb(224 14 14 / 30%);
    }

    #suggestions ul li:hover {
        background-color: #e7e9eb;
    }
}