/* Light mode (default) */
:root {
    --color-text: #555;
    --color-text-secondary: #666;
    --color-text-tertiary: #888;
    --color-background: #FFF;
    --color-hover: #F2F2F2;
    --color-accent: #34AE91;
    --color-accent-hover: #67C2AD;
    --color-shadow: #888;
    --color-shadow-dark: #444;
    --color-highlight: #E6F5F1;
    --color-divider: #CCC;
}

/* Dark mode */
[data-theme="dark"] {
    --color-text: #EEE;
    --color-text-secondary: #EEE;
    --color-text-tertiary: #AAA;
    --color-background: #2E3233;
    --color-hover: #3D4243;
    --color-accent: #34AE91;
    --color-accent-hover: #67C2AD;
    --color-shadow: #000;
    --color-shadow-dark: #000;
    --color-highlight: #394743;
    --color-divider: #555;
}

@font-face {
    font-family: "Open Sans";
    src: url("/assets/fonts/OpenSans-Light.woff2") format("woff2"),
        url("/assets/fonts/OpenSans-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Open Sans";
    src: url("/assets/fonts/OpenSans-Regular.woff2") format("woff2"),
        url("/assets/fonts/OpenSans-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Open Sans";
    src: url("/assets/fonts/OpenSans-SemiBold.woff2") format("woff2"),
        url("/assets/fonts/OpenSans-SemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Inconsolata";
    src: url("/assets/fonts/Inconsolata-SemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
}


/* ALL PAGES */

/* Class for temporarily disabling all transitions with Javascript */
.no-transition * {
    transition: none !important;
}

body {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-text);
    background-color: var(--color-background);
}

h1 {
    font-size: 54px;
    font-weight: 300;
    text-align: center;
    letter-spacing: 1px;
    margin: 35px 10px 20px 10px;
}

@media only screen and (max-width: 600px) {
    h1 {
        font-size: 42px;
    }
}

h2 {
    font-size: 32px;
    font-weight: 300;
}

h3 {
    font-size: 24px;
    font-weight: 600;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 70px;
    background-color: var(--color-background);
    box-shadow: 0 0 7px var(--color-shadow);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

.nav-content>div {
    display: flex;
    align-items: center;
}

nav a {
    display: flex;
}

nav img {
    height: 30px;
}

nav .button {
    margin-left: 15px;
    padding: 10px 15px;
}

nav .button img {
    margin-right: 5px;
}

nav #dark-mode-button {
    margin-left: 20px;
    cursor: pointer;
}

@media only screen and (max-width: 600px) {
    #nav-open-list-button {
        display: none;
    }
}

.content {
    max-width: 992px;
    margin: 65px auto;
    padding: 10px 1%;
}

.center {
    margin-left: auto;
    margin-right: auto;
}

.hidden {
    display: none !important;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 18px;
    border: none;
    border-radius: 100px;
    box-shadow: 0 1px 5px var(--color-shadow);
    color: var(--color-text-secondary);
    background-color: var(--color-background);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline-color: var(--color-accent);
    transition: background-color 0.2s;
}

.button img {
    height: 18px;
    margin: 0 8px 0 -2px;
}

.no-touch .button:hover,
.button:active {
    background-color: var(--color-hover);
}

.button-teal {
    background-color: var(--color-accent);
    color: #FFF;
    border: none;
}

.no-touch .button-teal:hover,
.button-teal:active {
    background-color: #67C2AD;
}

.icon-button {
    background-color: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.icon-button img {
    vertical-align: bottom;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-group button {
    margin: 10px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    transition-duration: 0.2s;
}

.modal-hidden {
    visibility: hidden;
    opacity: 0;
    transition-duration: 0.1s;
}

.modal-content {
    background-color: var(--color-background);
    width: 90%;
    max-width: 350px;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 0 10px var(--color-shadow-dark);
    transition-duration: 0.2s;
}

.modal-hidden .modal-content {
    transform: scale(0.9);
}

.modal h2 {
    margin: 5px 0 20px 0;
}

.modal .divider {
    margin: 20px auto;
}

.modal input {
    width: 90%;
    padding: 7px 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: 3px solid var(--color-accent);
    border-radius: 5px;
    background-color: transparent;
}

.modal input:focus {
    outline-color: var(--color-accent);
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.snackbar {
    position: fixed;
    display: flex;
    justify-content: center;
    bottom: 30px;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition-duration: 0.5s;
}

.snackbar p {
    font-size: 14px;
    font-weight: 600;
    color: #EEE;
    margin: 0 25px;
    padding: 15px 25px;
    background-color: #444;
    border-radius: 3px;
    box-shadow: 0 1px 5px var(--color-shadow-dark);
}

.snackbar-show {
    opacity: 1;
    visibility: visible;
}


/* FRONT PAGE */

#front-image {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 60px auto;
}

.divider {
    width: 99%;
    height: 0;
    margin: 50px auto;
    border-bottom: 1px solid var(--color-divider);
}

p.feature {
    line-height: 1.8;
    font-weight: 600;
}

.row-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 5px;
}

.row-3>* {
    display: block;
    width: calc(33.33% - 25px);
    box-sizing: border-box;
}

.row-3 img {
    display: block;
    width: 40%;
    margin: 0px auto 50px auto;
}

@media only screen and (max-width: 992px) {
    .row-3 {
        padding: 0 10px;
    }

    .row-3>* {
        width: calc(50% - 25px);
        margin-bottom: 50px;
    }

    .row-3 img {
        width: 128px;
        margin-bottom: 30px;
    }
}

@media only screen and (max-width: 600px) {
    .row-3 {
        padding: 0 10px;
    }

    .row-3>* {
        width: 100%;
    }
}

#main-buttons {
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0;
}

@media only screen and (max-width: 768px) {
    #main-buttons {
        flex-direction: column;
    }
}

#main-buttons button {
    font-size: inherit;
    margin: 20px;
    padding: 20px 30px;
}

#recent-lists-section {
    max-width: 400px;
    margin: auto;
}

#recent-lists-section h3 {
    text-align: center;
    color: var(--color-text);
    margin-top: 50px;
}

#recent-lists div {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    border-radius: 5px;
    transition-duration: 0.1s;
}

#recent-lists div a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    color: var(--color-text);
    text-decoration: none;
    padding: 5px 5px 5px 10px;
    min-width: 0;
}

#recent-lists div .icon-button img {
    width: 18px;
    margin: 0px 5px 0px 0px;
}

#recent-lists div a .list-name {
    font-weight: 600;
    margin-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

#recent-lists div .list-last-edited {
    font-size: 12px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
    margin-left: 10px;
}

.no-touch #recent-lists div:hover,
#recent-lists div:active {
    background-color: var(--color-hover);
}


/* LIST PAGE */

#loading-spinner {
    display: block;
    width: 64px;
    margin: 30px auto;
}

#no-list-error {
    text-align: center;
    padding-top: 20px;
}

h1.list-name {
    margin-bottom: 10px;
}

#list-name {
    margin-bottom: 10px;
    cursor: pointer;
}

#list-id {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-align: center;
    margin: 0 0 0 0;
}

#list-id-id {
    font-family: "Inconsolata", monospace;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#item-count {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-align: center;
    margin: 0 0 20px 0;
}

.list {
    font-size: 18px;
    max-width: 600px;
    margin: 30px auto 20px auto;
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--color-divider);
    transition: background-color 0.2s;
}

.list-item>.text {
    flex-grow: 1;
    padding: 3px 10px 4px 10px;
    font-family: inherit;
    font-size: 16px;
    color: inherit;
    border: none;
    background-color: transparent;
    transition-duration: 0.1s;
}

.list-item>.text:focus {
    outline-color: var(--color-accent);
}

.list-item.checked>.text {
    color: var(--color-text-tertiary);
    text-decoration: line-through;
}

.list-item .icon-button {
    margin: 0 0 0 5px;
}

.list-item .icon-button:focus {
    outline-color: var(--color-accent);
}

.list-item .drag-handle {
    vertical-align: bottom;
    cursor: grab;
}

.list-item .check-button:focus {
    outline: 0;
}

.sortable-ghost {
    background-color: var(--color-highlight);
    order: none;
}

#clipboard-placeholder {
    position: fixed;
    z-index: -1;
    opacity: 0;
    display: none;
}