#comments {
    .section_header_main_footer();

    input, textarea {
        .input();
    }

    .button {
        .button();
    }
    
    > .header {
        grid-area: header;
        display: grid;
        grid-template-columns: auto 1fr  auto  auto;
        &:is(.win7 *) { grid-template-columns: auto 1fr 36px 36px; }
        gap: 1rem;
        --height: 2.25rem;
        height: var(--height);

        .search.widget {
            .search_widget();
        }
    }

    > .main {

        .comments {
            display: grid;
            row-gap: 1rem;

            .comment {
                .panel();
                column-gap: 1rem;
                row-gap: 0.5rem;
                grid-template-columns: auto 1fr auto auto;
                grid-template-areas: 
                    "created public   ban   checkbox"
                    "link    link     link  link"
                    "user    user     user  user"
                    "cite    cite     cite  cite"
                    "text    text     text  text";
                &.unpublished {
                    border-color: #a71a1a;
                }

                .button {
                    padding: 0 1rem;
                    width: fit-content;
                }

                .public {
                    grid-area: public;
                    cursor: pointer;
                }

                .created {
                    grid-area: created;
                }

                input[type="checkbox"] {
                    grid-area: checkbox;
                }

                .link {
                    grid-area: link;
                    a {
                        .link();
                    }
                }

                .user {
                    grid-area: user;
                    display: grid;
                    grid-auto-flow: column;
                    justify-content: start;
                    column-gap: 1rem;
                }

                .cite {
                    grid-area: cite;
                    border: 1px solid;
                    padding: 0.5rem;
                }

                .text {
                    grid-area: text;
                }
            }
        }
    }

    > .footer {
        .footer_with_pager();
    }

    > .settings.panel {
        .panel();
        grid-area: main;
        z-index: 10;
        grid-row: 1/-1;

        &.hidden {
            display: none;
        }

        .title {
            .title();
        }

        .password.widget {
            .password_widget();
        }

        .header {
            display: grid;
            grid-template-columns: 1fr auto;
            &:is(.win7 *) { grid-template-columns: 1fr 30px; }
            column-gap: 1rem;

            .button {
                .button();
            }
        }

        label {
            display: grid;
            column-gap: 0.5rem;
            width: fit-content;
            user-select: none;
            grid-auto-flow: column;
        }

        .groups {
            display: grid;
            grid-auto-flow: column;
            column-gap: 1rem;

            .group {
                display: grid;
                row-gap: 0.5rem;

                input {
                    min-height: 2rem;
                }
            }
        }

        .save.button {
            width: fit-content;
            padding: 0.5rem 1rem;
        }
        
        .banned {
            display: grid;
            row-gap: 0.5rem;
            overflow-y: auto;
            
            > div {
                display: grid;
                width: fit-content;
                grid-template-columns: auto auto auto;
                column-gap: 1rem;
                
                .delete {
                    aspect-ratio: 1/1;
                    span {
                        background-repeat: no-repeat;
                        background-position: center;
                        background-size: 45%;
                        &:is(.dark *)  { background-image: var(--icon-cross-dark); }
                        &:is(.light *) { background-image: var(--icon-cross-light); }
                    }
                }
            }
        }
    }
}