/* ==== Main ==== */

html {
    height: 100%;
}

body {

    margin: 0;
    height: 100%;
    background-color: #ddd;

    display: flex;
    flex-direction: column;

    font-family: "微软雅黑", "Roboto", sans-serif;
}

div {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
}



/* ==== Widgets ==== */

button {

    font-size: 18px;
    font-weight: 300;

    padding: 10px;
    margin: 10px;

    font-family: "微软雅黑", "Roboto", sans-serif;
    
    background: #eee;
    border: none;
    outline: none;

    transition: all .1s;
}

button:hover {
    background: #ccc;
}

button:active {
    background: #f0f0f0;
}

input {

    padding: 10px;
    margin: 10px;
    width: 0;
    background-color: #ccc;

    font-family: "微软雅黑", "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 300;

    outline: none;
    border: none;
}

textarea {

    padding: 20px;
    background-color: #eee;

    font-family: "微软雅黑", "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 400;
    height: 100%;

    outline: none;
    border: none;
    resize: none;
}

#text_output {

    margin: 0;
    font-size: 16px;
    font-weight: 400;

    max-height: 88vh; /* "hack", solve this better */
    overflow: auto;
}



/* ==== Layout ==== */

header {

    flex: 1 0;

    display: flex;
    flex-direction: row;
    justify-content: start;
}

#main {

    flex: 15 0;

    display: flex;
    flex-direction: row;
    justify-content: start;
}

header > #title {

    flex: 1 0;
    margin: 10px;
    margin-right: 0;

    display: flex;
    flex-direction: row;
    align-items: center;
}

#title > div {

    font-size: 24px;
    font-weight: 300;
    padding-left: 2px;
}

header > #inputs {

    flex: 1 0;
    margin-left: 10px;
    margin-right: 10px;

    display: flex;
    flex-direction: row;
    justify-content: start;
}

#generate {
    flex: 2 0;
    margin-left: 0px;
    margin-right: 0px;
}

#output_length {
    flex: 1 0;
    margin-left: 0px;
}

#context_length {
    flex: 1 0;
    margin-left: 0px;
}

#left_section {

    background-color: #fff;

    padding: 20px;
    margin: 10px;
    margin-top: 0;
    margin-right: 10px;

    min-width: 45vh;
    flex: 1 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#right_section {

    background-color: #fff;
    padding: 20px;
    margin: 10px;
    margin-left: 0;
    margin-top: 0;
    min-width: 45vh;

    flex: 1 0;
}

@media (max-width: 1000px) {

    header > #title {
        display: none;
    }

    button {
        margin-left: 0;
        margin-right: 0;
        font-size: 16px;
    }

    textarea {
        min-height: 30vh;
        margin: 0;
        padding: 20px;
    }

    #text_output {
        max-height: none;
    }

    header > #inputs {
        flex-direction: column;
    }

    input {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 0;
        width: auto;
        font-size: 16px;
    }

    #main {
        flex-direction: column;
    }

    #left_section {
        min-width: auto;
        padding: 0;
    }

    #right_section {
        min-width: auto;
        margin: 10px;
        margin-top: 0;
    }
}
