/* General */

:root,
:root.light {
    --background: #fdfdfd;
    --background-alter: #f7f7f7;
    --primary-color: #40a6da;
    --link-color: #40a6da;
    --text-color: #333;
    --secondary-text: #828282;
    --border-color: #ddd;
    --hover-color: #38a1cf;
    --font-family: Arial, sans-serif;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --input-background: #f7f7f7;
    --transition: 0.3s ease-in-out;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #333;
        --background-alter: #444;
        --primary-color: #25617f;
        --link-color: #38a1cf;
        --text-color: #f7f7f7;
        --secondary-text: #828282;
        --border-color: #555;
        --hover-color: #38a1cf;
        --font-family: Arial, sans-serif;
        --shadow-color: rgba(255, 255, 255, 0.3);
        --input-background: #727272;
        --transition: 0.3s ease-in-out;
    }

}

:root.dark {
    --background: #333;
    --background-alter: #444;
    --primary-color: #25617f;
    --link-color: #38a1cf;
    --text-color: #f7f7f7;
    --secondary-text: #828282;
    --border-color: #555;
    --hover-color: #38a1cf;
    --font-family: Arial, sans-serif;
    --shadow-color: rgba(255, 255, 255, 0.3);
    --input-background: #727272;
    --transition: 0.3s ease-in-out;
}

body {
    margin: 0;
    background-color: var(--background);
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
}

input,
textarea {
    background-color: var(--input-background);
    color: var(--text-color);
}

a {
    color: var(--link-color);
}

.main {
    background-color: var(--background);
    padding: 20px;
    margin: auto;
    width: 80%;
    max-width: 1200px;
    box-shadow: 0 4px 6px var(--shadow-color);
    border-radius: 8px;
}

.inner-content {
    padding: 10px;
}

.footer {
    border-top: 1px dotted var(--border-color);
    padding-top: 10px;
    margin: auto;
    margin-top: 30px;
}

.header {
    background-color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.last {
    margin-left: auto;
}

.menu-icon {
    width: 30px;
    height: 30px;
    background-image: url("/static/menu.svg");
    display: none;
}

@media screen and (max-width: 600px) {

    /* https://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone */
    input[type='text'],
    input[type='number'],
    textarea {
        font-size: 16px;
    }

    .header a:not(:first-child) {
        display: none;
    }

    .menu-icon {
        float: right;
        display: block;
        position: absolute;
        right: 20px;
        top: 15px;
        font-size: 20px;

    }
}

@media screen and (max-width: 600px) {
    .header.responsive {
        position: relative;
        display: block;
    }

    .last {
        margin-left: none;
    }

    .header.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

}

.header a {
    color: var(--text-color);
    text-decoration: none;
    padding-left: 10px;
}

.header-logo {
    font-weight: bold;
    font-size: 1.3rem;
}

/* utility */
.break {
    flex-basis: 100%;
    height: 0;
}

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

/* Index / lists */
.index-rank {
    width: 20px;
    text-align: right;
}

.index-title a {
    text-decoration: none;
    color: var(--text-color);
}

.index-info {
    padding-left: 10px;
    color: var(--secondary-text);
}

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

/* list page */
.list-title {
    font-size: 20px;
}

.list-content {
    padding: 10px;
}

.list-info {
    color: var(--secondary-text);
}

.list-description {
    margin-top: 10px;
}

.list-item-votearrow {
    margin-top: 5px;
    width: 30px;
    height: 30px;
    border: 0px;
    background: url("/static/triangle.svg");
    background-position: center;
}

.list-item-upvoted {
    margin-top: 5px;
    width: 30px;
    height: 30px;
    border: 0px;
    background: url("/static/triangle_hover.svg");
    background-position: center;
}

.list-item-upvoted:hover {
    cursor: pointer;
}

.list-item-votearrow:hover {
    background: url("/static/triangle_hover.svg");
    cursor: pointer;
}

.list-items {
    margin-top: 20px;
}

.list-item {
    display: flex;
    padding: 10px 0 10px 0;
}

.list-item:nth-child(odd) {
    background-color: var(--background-alter);
}

.list-item-left {
    margin-right: 10px;
    padding-left: 10px;
    width: 30px;
}

.list-item-right {
    margin-left: 5px;
}

.list-item-votes {
    margin-top: 3px;
    text-align: center;
    font-size: 14px;
}

.list-item-title {
    margin-top: 5px;
    font-size: 16px;
}

.list-item-text {
    display: grid;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* list item comments */

.list-item-comment {
    display: flex;
}

.list-item-comment-reply {
    color: var(--link-color);
    text-decoration: underline;
    cursor: pointer;
    padding-top: 5px;
}

.list-item-comment-left {
    margin: 2px;
}

.list-item-comment-display {
    margin-left: 5px;
}

.list-item-comment-count {
    display: flex;
}

.list-item-comment-count-comment {
    margin-left: 5px;
    cursor: pointer;
    display: flex;
}

.list-item-comments {
    margin-top: 10px;
}

.list-item-comment-right {
    margin: 2px 10px 10px 10px;
}

.list-item-comment-text {
    margin-top: 5px;
}

.list-item-comment-author {
    color: var(--secondary-text);
}

.list-item-comment-add-comment {
    margin-top: 10px;
}

.list-item-comment-votearrow {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    background: url("/static/triangle_small.svg");
}

.list-item-comment-upvoted {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    background: url("/static/triangle_small_hover.svg");
}

.list-item-comment-votearrow:hover,
.list-item-comment-upvoted:hover {
    background: url("/static/triangle_small_hover.svg");
    cursor: pointer;
}

/* login */
.login-form-row {
    margin-bottom: 5px;
    display: flex;
}

.login-form label {
    width: 150px;
}

.login-form-button {
    padding: 5px;
    font-size: 15px;
}

.add-list-item {
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

@-moz-keyframes spin {
    100% {
        -moz-transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* mobile device */
@media only screen and (min-width : 300px) and (max-width : 750px) {
    .body {
        margin: 0;
    }

    .main {
        padding: 0;
        width: 100%;
        border-radius: 0px;
    }

    .footer {
        width: 100%;
        border-radius: 0px;
    }

    .footer-content {
        padding: 10px;
    }

    .header {
        border-radius: 0px;
    }

    textarea {
        font-size: 16px;
        width: 90%;
    }

    .index-item {
        display: block !important;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0 10px 0;
    }
}

/* small row grid system */

.row {
    display: flex;
    flex-wrap: wrap;
}

.col {
    flex: 1;
    margin: 5px;
}

.col-2 {
    flex: 2;
}

@media only screen and (max-width : 750px) {
    .row {
        display: block;
    }
}

.loginbutton {
    width: 160px;
    height: 25px;
    background-color: #F2F2F2;
    color: #1F1F1F;
    padding: 7px;
    padding-left: 10px;
    padding-right: 5px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

.loginbuutton img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.loginbutton span {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-style: normal;
    position: absolute;
    margin-left: 12px;
    margin-top: 2px;
    font-size: 14px;
}