/* Onboarding module styles. Prefixed onb- so nothing leaks into or out of the host. Colours come from
   the Kendo theme's variables where there is one, so the host's theme carries through. */

.onb-page { max-width: 1400px; margin: 0 auto; padding: 12px 16px 32px; }
.onb-page h1 { font-size: 1.5rem; margin: 8px 0 4px; }
.onb-page h2 { font-size: 1.15rem; margin: 20px 0 8px; }
.onb-sub { color: var(--kendo-color-subtle, #666); margin: 0 0 12px; }

.onb-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--kendo-color-border, #ddd); margin-bottom: 8px; }
.onb-nav-title { font-weight: 600; margin-right: 8px; }
.onb-nav-link { text-decoration: none; padding: 2px 4px; border-bottom: 2px solid transparent; color: var(--kendo-color-primary, #04557d); }
.onb-nav-link.active { border-bottom-color: var(--kendo-color-primary, #04557d); font-weight: 600; }

.onb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.onb-toolbar .onb-spacer { flex: 1 1 auto; }
/* A checkbox and its label as one item; hosts' label margins (Bootstrap's, for one) would misalign them. */
.onb-check { display: inline-flex; align-items: center; gap: 6px; }
/* A queued communication's text, as the client receives it. */
.onb-notice-body { white-space: pre-wrap; font: inherit; font-size: 0.9em; margin: 6px 0 0; padding: 8px; background: var(--kendo-color-base-subtle, #f5f5f5); border-radius: 4px; }
.onb-check label, .onb-check .k-checkbox { margin: 0; }
.onb-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.onb-header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.onb-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--kendo-color-subtle, #555); margin: 4px 0 8px; }

.onb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
@media (max-width: 700px) { .onb-form { grid-template-columns: minmax(0, 1fr); } }
.onb-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.onb-field-wide { grid-column: 1 / -1; }
.onb-field label { font-weight: 600; font-size: 0.9rem; }
.onb-required { color: var(--kendo-color-error, #c00); }
.onb-hint { color: var(--kendo-color-subtle, #666); }
.onb-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.onb-problem { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 8px 12px; margin: 8px 0;
    border: 1px solid var(--kendo-color-error, #c00); border-left-width: 4px; background: var(--kendo-color-error-subtle, #fdecea); }
.onb-problem-close { border: 0; background: transparent; cursor: pointer; font-weight: 700; }
.onb-note { padding: 8px 12px; margin: 8px 0; border-left: 4px solid var(--kendo-color-warning, #e0a000); background: var(--kendo-color-warning-subtle, #fff6db); }
.onb-ok { padding: 8px 12px; margin: 8px 0; border-left: 4px solid var(--kendo-color-success, #2e7d32); background: var(--kendo-color-success-subtle, #e8f5e9); }

.onb-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.onb-badge-ok { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.onb-badge-warn { background: #fff6db; color: #7a5200; border-color: #f2d27a; }
.onb-badge-bad { background: #fdecea; color: #8e1b14; border-color: #f0a9a2; }
.onb-badge-info { background: #e3f0f7; color: #04557d; border-color: #9cc6dc; }
.onb-badge-muted { background: #eee; color: #555; border-color: #ccc; }

.onb-link { cursor: pointer; color: var(--kendo-color-primary, #04557d); text-decoration: underline; background: none; border: 0; padding: 0; }
.onb-muted { color: var(--kendo-color-subtle, #777); }
.onb-tab { padding-top: 6px; }

/* The public application form (Pages/Apply, Pages/ApplicationForm): narrower, cards instead of grids,
   so it reads on a phone. */
.onb-apply { max-width: 880px; }
.onb-section { margin: 18px 0; }
.onb-section > h2 { margin-top: 0; }
.onb-cards { display: flex; flex-direction: column; gap: 10px; }
.onb-card { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px;
    border: 1px solid var(--kendo-color-border, #ddd); border-radius: 6px; background: var(--kendo-color-surface-alt, #fff); }
.onb-card-block { flex-direction: column; align-items: stretch; }
.onb-card-main { display: flex; flex-direction: column; flex: 1 1 240px; min-width: 0; }
.onb-card-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.onb-card-head .onb-spacer, .onb-toolbar .onb-spacer { flex: 1 1 auto; }
.onb-card-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px;
    padding: 6px 0; border-top: 1px dashed var(--kendo-color-border, #ddd); overflow-wrap: anywhere; }
.onb-card-actions { display: inline-flex; gap: 6px; }
.onb-preview { margin-top: 10px; padding: 10px 12px; border-left: 4px solid var(--kendo-color-info, #04557d); background: var(--kendo-color-base-subtle, #f5f5f5); }
.onb-preview ul, .onb-todo ul { margin: 4px 0 8px; padding-left: 20px; }
/* The document viewer (Components/DocumentViewer): the document beside the details it proves. */
.onb-viewer-window .k-window-content { display: flex; padding: 8px 12px; overflow: hidden; }
.onb-viewer { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 12px; }
.onb-viewer-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.onb-viewer-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-bottom: 6px; }
.onb-viewer-bar .onb-spacer { flex: 1 1 auto; }
.onb-viewer-frame { flex: 1 1 auto; min-height: 0; border: 1px solid var(--kendo-color-border, #ddd); border-radius: 4px; background: var(--kendo-color-base-subtle, #f0f0f0); overflow: hidden; }
.onb-viewer-frame > p, .onb-viewer-frame > .onb-problem { margin: 12px; }
.onb-viewer-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.onb-viewer-image { width: 100%; height: 100%; overflow: auto; display: flex; align-items: flex-start; justify-content: flex-start; }
.onb-viewer-image img { transition: transform 0.15s; }
.onb-viewer-fit { align-items: center; justify-content: center; }
.onb-viewer-fit img { max-width: 100%; max-height: 100%; object-fit: contain; }
.onb-viewer-side { overflow-y: auto; min-height: 0; padding-right: 4px; }
.onb-viewer-side h3 { font-size: 1.05rem; margin: 4px 0 6px; }
.onb-viewer-facts-head { margin-top: 14px; border-top: 1px solid var(--kendo-color-border, #ddd); padding-top: 8px; }
.onb-viewer-facts-head h3 { margin: 0; }
.onb-viewer-decide { justify-content: flex-start; margin-top: 8px; }
.onb-evidence { margin: 8px 0 12px; }
.onb-evidence h4 { font-size: 0.95rem; margin: 0 0 4px; }
.onb-evidence-item { padding: 6px 0; border-top: 1px dashed var(--kendo-color-border, #ddd); }
.onb-dl { margin: 0; }
.onb-fact { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.onb-fact dt { font-weight: 600; color: var(--kendo-color-subtle, #555); }
.onb-fact dd { margin: 0; overflow-wrap: anywhere; user-select: text; }
/* Narrow screens: the document above its details, each with room to read. */
@media (max-width: 900px) {
    .onb-viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(55vh, 1fr) auto; overflow-y: auto; }
    .onb-viewer-side { overflow: visible; }
}
.onb-todo { padding: 10px 12px; border-left: 4px solid var(--kendo-color-warning, #e0a000); background: var(--kendo-color-warning-subtle, #fff6db); }
