﻿/* ---------------------------------------------------------- the board */
.coverage-tile {
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 12px 16px;
    text-align: center;
}

.coverage-tile-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
}

.coverage-tile-label {
    font-size: 13px;
    color: #6c757d;
}

.coverage-block {
    margin-bottom: 22px;
}

.coverage-block-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.coverage-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.coverage-card {
    border: 1px solid #e3e6ea;
    border-left-width: 4px;
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 190px;
}

.coverage-card-title {
    font-weight: 600;
    font-size: 14px;
}

.coverage-card-count {
    font-size: 13px;
}

.coverage-card-note,
.coverage-card-missing {
    font-size: 12px;
    color: #6c757d;
}

.coverage-full {
    border-left-color: #2e7d32;
}

.coverage-partial {
    border-left-color: #ed6c02;
}

.coverage-empty {
    border-left-color: #c62828;
}

/* ------------------------------------------------- one paper, one question */
.paper-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.paper-list {
    flex: 0 0 76px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 10px;
}

.paper-list-item {
    position: relative;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    padding: 8px 4px;
    cursor: pointer;
    text-align: center;
}

.paper-list-item.selected {
    border-color: #1976d2;
    background: #e7f1ff;
}

.paper-list-number {
    font-weight: 600;
}

.paper-list-state {
    color: #c62828;
    font-weight: 700;
    margin-left: 3px;
}

.paper-list-dot {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ed6c02;
}

.paper-list-item.changed .paper-list-dot {
    display: block;
}

.paper-editor {
    flex: 1 1 auto;
}

.paper-card {
    display: block;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 14px;
}

.paper-card.changed {
    border-left: 4px solid #ed6c02;
}

.paper-card-image {
    text-align: center;
}

.paper-image-holder {
    position: relative;
    display: block;
    border: 1px solid #e3e6ea;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* fills the column, so a small picture is enlarged instead of sitting in a corner */
.paper-image {
    display: block;
    width: 100%;
    height: auto;
}

.paper-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: crosshair;
}

.paper-frame {
    position: absolute;
    border: 2px solid #1976d2;
    background: rgba(25, 118, 210, 0.12);
    pointer-events: none;
}

.paper-no-image {
    border: 1px dashed #ced4da;
    border-radius: 6px;
    padding: 40px 12px;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
}

.paper-image-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.paper-image-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
    text-align: center;
}

/* the fields sit under the picture, low and wide, so that they take as little height as possible */
.paper-card-fields {
    border-top: 1px solid #e3e6ea;
    margin-top: 14px;
    padding-top: 12px;
}

.paper-card-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.paper-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 12px;
}

.paper-grid label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #495057;
}

.paper-wide {
    grid-column: span 2;
}

.paper-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.paper-state {
    font-size: 12px;
    color: #6c757d;
}

/* ------------------------------------------------------- the bulk import */
.import-box {
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 14px;
}

/* while a file is held over the box, so that it is plain where it will land */
.import-box.is-dropping {
    border-color: #1976d2;
    border-style: dashed;
    background-color: #f3f8fd;
}

.import-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

.import-progress {
    font-size: 13px;
    color: #1976d2;
    margin-top: 10px;
}

.import-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.import-count {
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 10px 18px;
    text-align: center;
    min-width: 130px;
}

.import-count-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.import-count-label {
    font-size: 12px;
    color: #6c757d;
}

.import-table {
    max-width: 780px;
}

.import-table .import-warning {
    color: #c62828;
    font-weight: 600;
}

.import-issues {
    margin-bottom: 0;
    padding-left: 18px;
    max-height: 260px;
    overflow-y: auto;
}

.import-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}

/* ------------------------------------------------------ the automatic cut */
.auto-papers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.auto-paper {
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 10px 12px;
    min-width: 330px;
}

.auto-paper-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.auto-paper-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auto-paper-fields > label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #495057;
}

.auto-grades {
    display: flex;
    gap: 3px;
}

.auto-grade {
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 13px;
    cursor: pointer;
}

.auto-grade:has(input:checked) {
    background: #e7f1ff;
    border-color: #1976d2;
}

.auto-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.auto-hint {
    font-size: 12px;
    color: #6c757d;
}

.auto-block {
    margin-bottom: 20px;
}

.auto-block-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.auto-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auto-thumb {
    position: relative;
    cursor: zoom-in;
    border: 1px solid #e3e6ea;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.auto-thumb-number {
    position: absolute;
    top: 0;
    left: 0;
    background: #1976d2;
    color: #fff;
    font-size: 11px;
    padding: 0 5px;
}

.auto-notes {
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 18px;
    font-size: 12px;
    color: #495057;
}

.auto-notes-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.auto-note {
    margin-bottom: 4px;
}

.auto-block-wrong {
    color: #c62828;
}

.auto-block-missing {
    font-size: 12px;
    color: #c62828;
    margin-bottom: 6px;
}

.bank-line {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
}

.bank-issues-table td,
.bank-issues-table th {
    font-size: 12px;
    vertical-align: middle;
}

/* one cut out question, opened as large as the screen allows */
.auto-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(33, 37, 41, 0.88);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    cursor: zoom-out;
    overflow: auto;
}

.auto-viewer-title {
    color: #fff;
    font-weight: 600;
}

.auto-viewer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.auto-viewer-image {
    max-width: 84vw;
    max-height: 80vh;
    background: #fff;
    border-radius: 4px;
    cursor: default;
}

.auto-viewer-arrow {
    flex: 0 0 auto;
    width: 48px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.auto-viewer-arrow:hover {
    background: rgba(255, 255, 255, 0.26);
}

.auto-viewer-hint {
    color: #ced4da;
    font-size: 12px;
}
