/*
 *  Copyright 2020 wixette@gmail.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

body {
    border: 0;
    font-family: "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Segoe UI", Roboto, "Helvetica Neue", Arial,sans-serif;
    font-size: 14px;
    margin: 10px;
    padding: 0;
}

div, img {
    border: 0;
    margin: 0;
    padding: 0;
}

#container {
    align-items: center;
    display: flex;
    flex-direction: column;
}

#header {
    border: #57c 1px solid;
    box-shadow: 1px 1px 3px #ccc;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#titlebar {
    align-items: center;
    background-color: #57c;
    color: #eef;
    display: flex;
    flex-direction: row;
    font-size: 20px;
    height: 40px;
    justify-content: center;
    line-height: 30px;
}

#titlebar a {
    font-size: 14px;
    margin-left: 30px;
    text-decoration: none;
}

#titlebar a:link {
    color: #eef;
}
#titlebar a:visited {
    color: #eef;
}
#titlebar a:hover {
    color: #f80;
}
#titlebar a:active {
    color: #f80;
}

#controls {
    align-items: center;
    align-content: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
}

#controls input, #controls select {
    background-color: #fff;
    border: #abf 1px solid;
    border-radius: 4px;
    box-shadow: 0 0 2px #ccc;
    box-sizing: border-box;
    font-size: 14px;
    height: 28px;
    line-height: 28px;
    margin: 0 8px 0 8px;
    padding: 0 8px 0 8px;
}

.control-box {
    align-items: center;
    align-content: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    margin: 8px;
}

#text-container {
    margin: 20px 0 20px 0;
    width: 100%;
}

#text-container textarea {
    border: #57c 1px solid;
    box-shadow: 1px 1px 3px #ccc;
    box-sizing: border-box;
    font-size: 14px;
    height: 600px;
    line-height: 28px;
    margin: 0;
    padding: 10px;
    resize: none;
    width: 100%;
}

#paper-container {
    display: none;
    margin: 20px 0 20px 0;
    width: 100%;
}

.paper-canvas {
    border: #57c 1px solid;
    box-shadow: 1px 1px 3px #ccc;
    width:100%;
}

#footer {
    color: #666;
    line-height: 30px;
    text-align: center;
    text-size: 11px;
}

@media print {
    #header, #text-container, #footer {
        display: none;
    }

    body {
        border: 0;
        margin: 0;
        padding: 0;
    }

    container {
        border: 0;
        display: block;
        margin: 0;
        padding: 0;
    }

    #paper-container {
        border: 0;
        margin: 0;
        padding: 0;
    }

    /*
       A4 measures 210 × 297 millimeters
       Letter paper measures 215.9 x 279.4 mm
     */
    .paper-canvas {
        border: 0;
        box-shadow: none;
        height: 280mm;
        margin: 10mm;
        page-break-after: always;
        width: 210mm; /* A4 measures 210 × 297 millimeters */
    }
}
