/* Layout for the peer evaluation rubric chart, which is a reference sheet
 * rather than a page to read through. Loaded only on that page, by the
 * html-page-context handler in _ext/rubric.py, and applied on screen as well as
 * in print so that what is on the screen is what comes out of the printer.
 *
 * The theme's default layout reserves the left third of the window for
 * navigation and caps the content width, which leaves a six-column table very
 * little room. Here the chart gets the whole width instead. */

.wy-nav-side,
.wy-nav-top,
.rst-versions,
.rst-footer-buttons,
.wy-breadcrumbs,
.wy-breadcrumbs-aside,
.headerlink {
    display: none !important;
}

.wy-nav-content-wrap {
    margin-left: 0;
    background: #fff;
}

.wy-nav-content {
    max-width: none;
    padding: 1.5em 2em;
    background: #fff;
}

.rst-content table.docutils {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Cell text is wrapped in a paragraph, which the theme sizes on its own, so the
 * size has to be set on the paragraph and not left to inherit from the table. */
.rst-content table.docutils td,
.rst-content table.docutils th,
.rst-content table.docutils p {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
}

.rst-content table.docutils td,
.rst-content table.docutils th {
    border: 1px solid #444;
    padding: 4px 6px;
    white-space: normal !important;
    vertical-align: top;
    background: #fff !important;
}

.rst-content table.docutils thead th {
    background: #e8e8e8 !important;
}

.rst-content table.docutils p {
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

/* The chart is meant to come out on a single sheet. Every rule below exists to
 * keep it there: the type is small, the rows are tight, and the heading gives up
 * the space the theme normally reserves around it. */
@media print {
    @page {
        size: landscape;
        margin: 1cm;
    }

    body,
    .rst-content {
        color: #000;
        background: #fff;
    }

    .wy-nav-content {
        padding: 0;
    }

    /* The theme stretches these to the window height, which on paper spills a
     * blank second sheet past the end of the chart. */
    html,
    body,
    .wy-grid-for-nav,
    .wy-nav-content-wrap,
    .wy-nav-content,
    .rst-content {
        height: auto !important;
        min-height: 0 !important;
    }

    footer,
    .rst-content div[role="navigation"] {
        display: none !important;
    }

    .rst-content h1 {
        font-size: 12pt;
        margin: 0 0 6pt;
    }

    /* Sized to fill a landscape sheet without running onto a second one, on
     * Letter and on A4 alike. */
    .rst-content table.docutils td,
    .rst-content table.docutils th,
    .rst-content table.docutils p {
        font-size: 9.5pt !important;
        line-height: 1.2 !important;
    }

    .rst-content table.docutils {
        margin-bottom: 0;
    }

    .rst-content table.docutils td,
    .rst-content table.docutils th {
        border-color: #000;
        padding: 3px 5px;
    }

}
