/*
 * Tutorial Book Maker: the chapter and key-term editors. The workspace,
 * question editor, preview stage and print column are shared with the Test
 * Paper Maker (test-paper.css); the book itself is styled inside the preview
 * frame (tutorial-book-layout.js).
 */

/* test-paper.css keys these to the test page's ids: the same rules for this page's */
#tb-details > label, #tb-details .field-grid { margin-bottom: .75rem; }
#tb-preview { width: 100%; height: 100%; }
#tb-preview .pe-frame { display: block; width: 100%; height: 100%; border: 0; }
#tb-summary { color: var(--text-secondary); font-size: var(--text-sm); white-space: nowrap; align-self: flex-end; }

.tb-chapter-card .tp-section-title input { font-weight: 700; }
.tb-block--example { border-left: 3px solid var(--accent-mint); }
.tb-block--tip { border-left: 3px solid var(--accent-gold); }
.tb-block--practice { border-left: 3px solid var(--accent-teal); }
.tb-block--picture { border-left: 3px solid var(--border-strong); }

.tb-term-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) auto; gap: .45rem; align-items: start; margin: .5rem 0; }
.tb-term-row input, .tb-term-row textarea { margin-top: 0; }
.tb-term-row textarea { min-height: 2.75rem; resize: vertical; }

@media (max-width: 28rem) {
    .tb-term-row { grid-template-columns: minmax(0, 1fr) auto; }
    .tb-term-row textarea { grid-column: 1; }
}
