/**
 * Overwrite default myBB CSS and/or set own plugin defaults.
 */
body {
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto !important;
}

/**
 * All the styling happens here so it can easily be added to the template and edited in MyBB.
 */
#plugins-character-activity-wrapper {
    height: 100%;
    display: flex;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    flex-direction: column;
    gap: 2rem;
    @media (min-width: 768px) {
        flex-direction: row;
    }
    @media (min-width: 1792px) {
        gap: 6rem;
    }

    h2, h3 {
        margin: 0;
        align-self: center;
    }

    p {
        margin: 0;
    }

    ol, ul {
        margin: 0;
        padding: 0;
    }

    /**
     * Why does myBB use a picture for the background colour white on buttons???
     */

    button {
        background: none;
    }

    .character-activity-list {
        display: flex;
        flex-direction: column;

        .character-activity-list-list-wrapper {
            flex: 1;
            overflow-y: auto;
        }

        ul {
            list-style-type: none;

            li:first-child {
                margin-top: 1px;
            }

            li {
                user-select: none;
                padding: 0.25rem;
                /**
                 * Needed for outline to be completely visible for selected items.
                 */
                margin-right: 1px;
                margin-left: 1px;
            }

            li:last-child {
                margin-bottom: 1px;
            }
        }
    }

    .selected {
        outline: lightgrey solid 1px;
    }

    .hint-text {
        font-size: 75%;
        margin: 0;
        text-align: center
    }

    .container-border {
        border: 1px solid black;
    }

    .character-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        text-align: start;
        margin: auto;
    }

    #character-activity-staff-overview {
        display: flex;
        gap: 1rem;
        flex-direction: column;
        width: 100%;
        margin-bottom: 0.25rem;

        #character-activity-overview-lists {
            display: flex;
            flex-direction: column;
            @media (min-width: 1664px) {
                flex-direction: row;
            }
            overflow-y: auto;
            gap: 1rem;
            justify-content: space-between;

            ul {
                overscroll-behavior: contain;

                .character-activity-list {
                    max-width: calc(100% / 7);
                }

                .awaiting_staff_decision_list_item {
                    display: flex;
                    justify-content: space-between;
                    gap: 0.5rem;

                    .awaiting_staff_decision_action_buttons {
                        display: flex;
                        gap: 0.25rem;
                    }
                }
            }

            #character-activity-inactivity-delete-list, #character-activity-force-delete-list {
                li {
                    display: flex;
                    justify-content: space-between;
                    gap: 0.25rem;
                }
            }
        }
    }
}

#character-activity-public-lists-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    align-items: center;
    margin-bottom: 0.25rem;

    #character-activity-public-lists {
        display: flex;
        flex-direction: column;
        @media (min-width: 640px) {
            flex-direction: row;
        }
        gap: 4rem;
        overflow-y: auto;
        justify-content: center;
        width: max-content;

        & > div {
            flex: 1 1 50%;
            display: flex;
            flex-direction: column;
            border: black solid 1px;
            padding: 0.25rem;

            & > div {
                overflow-y: auto;

                ul {
                    list-style-type: none;

                    li {
                        padding: 0.25rem;
                    }
                }
            }
        }
    }
}