@import 'variables.less';

.note(@note-height) {
    display: inline-block;
    width: 99%;
    background-color: white;
    text-align: left;
    border: 1px solid gray;
    box-shadow: 1px 1px 3px gray;
    border-radius: 2px;

    &.preview {
        border-width: 1px;
        border-color: @secondary-color;
        box-shadow: 0 0 5px @secondary-color inset;
    }

    .previewTitle {
        color: @secondary-color;
        font-weight: bold;
        text-align: center;
    }

    input {
        max-width: 95%;
    }

    .topNote {
        padding: 3px;
        button {
            display: inline-block;
        }
    }

    .middleNote {
        .title {
            margin: 12px;
            text-align: center;
            a {
                color: @heading-color;
            }

            a:hover {
                text-decoration: underline;
            }
        }

        .previewNoteTitle {
            text-align: center;
        }

        .note-content {
            max-height: @note-height;
            overflow: auto;
            margin: 12px;

            h1, h2, h3, h4, h5, h6 {
                font-weight: bold;
            }

            table {
                border-collapse: collapse;
                max-width: 98%;

                th, td {
                    padding: 3px;
                    border: 1px solid gray;
                }

                th {
                    border-bottom: 2px solid gray;
                }

                tbody > tr:nth-child(even) {
                    background-color: rgb(243, 243, 243);
                }
            }

            img {
                max-width: 98%;
            }

            video {
                max-width: 98%;
            }

            blockquote {
                margin: 0;
                padding-left: 5px;
                background-color: #eee;
                padding-bottom: 5px;
                &:before {
                    height: 38px;
                    display: block;
                    font-size: 48px;
                    content: "\"";
                    font-style: italic;
                }
                p {
                    margin-left: 20px;
                    margin-top: 0;
                    margin-bottom: 0;
                }
            }

            pre {
                padding: 0;
                margin: 14px 0 14px 0;

                code {
                    background-color: rgb(68, 68, 68);
                    display: block;
                    padding: 7px
                }
            }
        }
    }

    .bottomNote {
        padding: 0;
        margin: 12px 12px 12px 40px;

        .tags {
            text-align: left;
        }

        .tag {
            display: inline-block;
            background-color: @secondary-color;
            border-radius: 5px;
            border: 1px solid @secondary-color-complementary;
            color: white;
            padding: 4px;
            margin-bottom: 4px;
            a {
                font-weight: bold;
                color: white;
                font-size: 14px;
            }
        }
    }

}
