:root {
    --primary: #8c839e;
}

body {
    margin: 0 auto;
    font-family: Kokonor, sans-serif;
    min-width: 90vw;
    max-width: 1200px;
    padding: 10px;
    background: gray;
}

button {
    background: var(--primary);
    padding: 5px;
    margin: 5px;
}

li {
    list-style: none;
}

.input {
    padding: 4px;
    margin: 2px;
}

button:hover {
    background: lightblue;
}

.character-types {
    height: 2rem;
}

.text-area-input {
    margin: 5px;
    border: 2px solid transparent;
    background-color: lightgray;
    font-size: 20px;
    border-radius: 12px;

    @media (max-width: 600px) {
        width: 90vw;
        padding: 10px;
    }
}

textarea {
    resize: none;
}

.clocktower-icon {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    width: 200px;
    height: 200px;
    background: lightgray;
}

h1, h2, h3 {
    text-align: center;
}

.red {
    color: #cc0f0f;
}

.copy-popup {
    position: absolute;
    background: lightblue;
    height: 50px;
    width: 100px;
    top: -60px;
    left: 25px;
    border-radius: 15px;
    opacity: 70%;
}

input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.main-page {

    .main-page-top {
        text-align: center;
    }

    .sub-page-top {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;

        .login-area {
            position: absolute;
            right: 0;
            margin-right: 4.5rem;
            text-align: center;
        }
    }

    .role-creation-div {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .change-role-creation-div {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .create-main-role-attributes {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin-bottom: 4.25rem;
        }

        .json-input-div {
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .script-upload-div {
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin-bottom: 15rem;
        }

        .database-use {
            display: block;
            flex-direction: column;
        }

        @media (max-width: 600px) {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-direction: column;
            margin-top: 20px;
        }
    }

    .role-display-settings {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .role-filter {
            display: flex;
            flex-direction: column;

            .filter-section {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 10px;

                #role-search {
                    padding: 6px;
                }

                .character-type-selection {
                    padding: 6px;
                }

                .script-selection {
                    max-width: 125px;
                    padding: 6px;
                    margin-top: 5px;
                }

                .only-my-favorites-div {
                    margin-top: 5px;

                    input {
                        transform: scale(1.75);
                    }
                }

                .tag-div {
                    margin: 5px 0 0 6px;

                    .tag-filter-selection {
                        max-width: 120px;
                        padding: 6px;
                    }
                }

                .owner-filter-selection {
                    max-width: 100px;
                    padding: 6px;
                    margin-left: 15px;
                }
            }
        }

        .sorting-role-display {
            font-size: 18px;
        }

        @media (max-width: 600px) {
            flex-direction: column;
            align-items: center;

            .sorting-role-display {
                margin-top: 1rem;
            }
        }
    }

    .homebrew-display {
        margin-top: 1.25rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .role-div {
            margin: 5px;
            min-width: 90vw;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            max-width: 1200px;
            gap: 10px;

            .role-image-and-text {
                display: flex;
                justify-content: center;
                align-items: center;

                .clocktower-icon {
                    width: 50px;
                    height: 50px;
                    margin-right: 10px;
                    background: white;
                }
            }

            .role-buttons {
                display: flex;
                justify-content: center;
                align-items: center;

                .rate-input {
                    width: 2rem;
                    height: 1.5rem;
                }
            }

            @media (max-width: 600px) {
                justify-content: center;
                flex-direction: column;

                .role-buttons {
                    margin: 2px 0 12px 0;
                    padding: 6px;
                }

                .rate-input {
                    padding: 6px 3px;
                }
            }
        }

        .role-idea-page-selection {
            margin-top: 1rem;
        }
    }

    .clocktower-script-tool-link, .script-tool {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }

    .blue {
        background-color: lightskyblue;
    }

    .night-order-link {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        margin-top: 2rem;
    }

    .download-buttons {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }
}

.wiki {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    @media (min-width: 700px) {
        padding: 2rem;
    }

    .page-top {
        display: flex;
        justify-content: space-around;

        .main-role-display {
            padding: 0 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            text-align: center;
            /*background-color: purple;*/

            .ability-text {
                padding: 0 50px;
            }
        }

        .edit-button-container {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 80px;
        }

        .edit-role-field {
            margin: 2rem 0 0 1rem;
            text-align: center;
            display: none;
        }

        @media (max-width: 600px) {
            .wiki-image {
                width: 100px;
                height: 100px;
                margin-left: 25px;
                margin-top: 0;
            }

            .main-role-display {
                width: 80vw;
                padding: 10px;

                .wiki-role-name {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin: 0 10px;
                }

                .ability-text {
                    padding: 0 5px;
                }
            }

            .edit-ability-textarea {
                width: 80vw;
                padding: 10px;
            }
        }
    }

    .image-submission {
        width: 100%;

        .set-image-div {
            display: flex;
            align-items: center;
            margin-top: 0.5rem;

            textarea {
                line-height: 20px;
            }
        }
    }

    .night-order-div {

        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        max-width: 800px;
        margin: 0 auto;

        h2 {
            margin-bottom: 0;
        }

        .night-order-container {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;

            input {
                width: 3rem;
                height: 1.5rem;
            }
        }

        .night-order-info-text {
            position: absolute;
            background-color: gray;
            overflow: scroll;
            right: -160px;
            width: 150px;
            height: 220px;
            padding: 4px;
        }

        .night-order-number {
            margin-left: 10px;
        }

        .night-order-reminder {
            margin-top: 10px;
        }

        .night-reminder-div {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            text-align: center;
            margin-top: 20px;
        }
    }

    .reminder-tokens-tags-script-div {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 3rem;

        .reminder-token {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;

            h2 {
                margin-bottom: 0.5rem;
            }

            .edit-reminder-token, .edit-global-reminder-token {
                display: none;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                margin-top: 1rem;
            }

            .reminder-token-list, .global-reminder-token-list {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
            }
        }

        .tags {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;

            h2 {
                margin-bottom: 0.5rem;
            }

            .edit-tags {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                max-width: 800px;
                margin-top: 0.5rem;

                input {
                    transform: scale(1.5);
                    margin-left: 0.5rem;
                }
            }
        }

        .script {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            width: 200px;

            h2 {
                margin-bottom: 0.5rem;
            }

            h3 {
                margin-top: 0;
            }
        }
    }

    .jinxes {
        text-align: center;

        .jinx-edit-div {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;

            .jinx-text-area {
                margin-top: 10px;
            }
        }
    }

    .special {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .special-edit {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;

            input {
                width: 4rem;
                height: 1.25rem;
                margin-top: 0.5rem;
            }

            select {
                height: 1.75rem;
                margin-top: 0.5rem;
            }

            .special-edit-selections {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 1rem;

                .required {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-direction: column;
                }

                .optional {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-direction: column;
                }
            }
        }
    }

    .how-to-run {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .how-to-run-text {
            max-width: 800px;
            text-align: center;
        }
    }

    .rating {
        text-align: center;
        margin-bottom: 0;
    }

    .comments {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .comment {
            overflow-wrap: break-word;
            max-width: 800px;
        }
    }

    .download-json-button {
        margin-top: 30px;
        position: relative;
    }

    .delete-role {
        margin-top: 1.5rem;
        display: none;
        justify-content: center;
        align-items: center;
    }

    .delete-popup-background {
        background-color: rgba(150, 150, 150, 0.7);
        top: 0;
        left: 0;
        width: 100%;
        position: fixed;
        height: 100%;
        display: none;
        justify-content: center;
        align-items: center;

        .delete-confirmation-popup {
            background-color: white;
            width: 40%;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
    }

    .owner-display {
        display: none;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
}

.full-night-order-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 2rem;
    position: relative;

    .header {
        width: 100%;
        position: fixed;
        top: 1rem;
    }

    .night-order-display {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .first-night-order-display-div, .other-night-order-display-div {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .night-order-img-text-edit-div {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            position: relative;
        }

        .night-order-img-text-div {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
            gap: 1rem;
        }

        .hover-text {
            position: absolute;
            visibility: hidden;
            bottom: 50px;
            background: beige;
            color: black;
            padding: 5px;
            border-radius: 15px;
        }
    }
}

.script-tool {

    .main-content {
        margin-top: 2rem;
        display: flex;
        align-items: flex-start;
        position: relative;
    }

    .role-selection {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        flex-direction: column;

        .search-by-name-div {
            input {
                height: 1.5rem;
            }
        }

        .role-selection-section {
            margin-top: 0.5rem;
            height: 80vh;
            overflow-y: visible;
            overflow-x: hidden;

            > * {
                margin-top: 3rem;

                h2 {
                    margin-bottom: 0.2rem;
                }

                .role-div {
                    position: relative;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    height: 2rem;
                    margin: 0.75rem 10px;

                    input {
                        transform: scale(1.5);
                    }

                    .ability-text {
                        display: none;
                        justify-content: center;
                        align-items: center;
                        position: absolute;
                        left: 110%;
                        background: beige;
                        color: black;
                        width: 20rem;
                    }
                }
            }
        }

        .clocktower-icon {
            width: 40px;
            height: 40px;
            margin-right: 10px;
            background: white;
        }
    }

    .display {
        margin-left: 3rem;

        .script-namings {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: row;
            gap: 1rem;

            .headings {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                margin-bottom: 0.75rem;
            }
        }

        > * {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .role {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 0.2rem;
            width: 50rem;
            gap: 1rem;

            .img-and-name {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                gap: 0.5rem;

                .image {
                    width: 30px;
                    height: 30px;
                    background: white;
                    border-radius: 25px;
                }
            }
        }
    }

    .buttons {
        position: fixed;
        left: 85%;
        width: 100%;
    }
}

.login {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    .input-div {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        flex-direction: column;
    }

    .input-row {
        margin: 2px;

        input {
            height: 1rem;
            font-size: 1rem;
        }
    }

    #login-page-login-button {
        display: flex;
        justify-content: center;
    }
}