/* Blazor-specific styles that the design theme (css/theme.css) does not cover. */
h1:focus { outline: none; }
#content:focus { outline: none; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.pill .dot.inactive { background: var(--inactive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--inactive) 22%, transparent); }
a.pill { color: inherit; }
.pill .harbor-select { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
a.side-foot { text-decoration: none; }
a.side-foot:hover { background: rgba(255,255,255,.06); }

input.input, select.select, textarea.textarea { width: 100%; max-width: 32rem; }
.field + .field { margin-top: 14px; }
.card .card-body > * + * { margin-top: 8px; }
.matrix th, .matrix td { text-align: center; }
.matrix th[scope=row] { text-align: left; }
.recovery-codes { list-style: none; padding: 0; columns: 2; font-size: 1.1rem; }
.qr svg { width: 12rem; height: 12rem; background: #fff; padding: 8px; border-radius: 8px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: 400; }

.validation-message { color: var(--overdue); }
.blazor-error-boundary { background: var(--overdue); padding: 1rem; color: #fff; border-radius: var(--r); }
.blazor-error-boundary::after { content: "An error has occurred."; }

#blazor-error-ui { color-scheme: light only; background: #fff3c4; color: #4a3b00; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Sign-in pages, security settings and administration screens use the components of the design theme. */
.account-content { display: flex; flex-direction: column; gap: 16px; }
.account-content label, .admin-content label, .card-body label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 8px 0 3px; }
.account-content label.inline, .admin-content label.inline { display: inline-flex; font-weight: 400; color: var(--text); margin: 0 16px 0 0; }
.account-content .btn, .admin-content .btn, .card-body .btn { margin-top: 12px; margin-right: 8px; }
.admin-content > * + * { margin-top: 10px; }
/* The buttons of the bars and headers are spaced by the flex gap: no top and right margin of the form buttons above. */
.toolbar .btn, .counters .btn, .page-head .btn { margin: 0; }
/* A field of a form grid in a card keeps the label glued to its control (the card spacing above is for loose labels). */
.card-body .field label { margin: 0; }
.form-grid > .field { margin-top: 0; }
.card-body .field .input { width: 100%; box-sizing: border-box; }
/* Forms placed directly on the page or in the steps of the authenticator setup (the screens of the account): the same spacing as in the cards. */
.page > p { margin: 0 0 12px; }
.page > form label, .steps form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 8px 0 3px; }
.page > form label.inline, .steps form label.inline { display: inline-flex; font-weight: 400; color: var(--text); margin: 0 16px 0 0; }
.page > form .btn, .steps form .btn { margin-top: 12px; margin-right: 8px; }
.page > form .validation-message, .steps form .validation-message { display: block; margin-top: 6px; }
.admin-content fieldset { border: 1px solid var(--border); border-radius: var(--r); margin-top: 14px; }
.admin-content h2 { margin-bottom: 4px; }
.admin-content .kv { margin: 12px 0; }
.admin-content .tbl, .card .tbl { width: 100%; border-collapse: collapse; }

.separator { text-align: center; color: var(--text-3); margin: 4px 0; }

/* Windows opened by the application (name em-window-*, see windows.js): no sidebar, the page uses the whole window. */
html.em-popup .sidebar { display: none; }
html.em-popup .app { grid-template-columns: 1fr; }
html.em-popup [data-open-window] { display: none; }

/* Customer display (second screen). */
.display-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar-bg); color: var(--sidebar-text); text-align: center; padding: 32px; }
.display-welcome { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.display-welcome .logo { width: 96px; height: 96px; }
.display-welcome .logo svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.display-welcome h1 { font-size: clamp(36px, 6vw, 72px); margin: 0; }
.display-marina { font-size: clamp(22px, 3.5vw, 40px); margin: 0; opacity: .9; }
.display-hint { font-size: 16px; margin: 24px 0 0; opacity: .6; }

/* Settings screen: the fields in columns. */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.settings-grid .setting-field { min-width: 0; }

/* Dictionaries: the list of the dictionaries on the left, the open dictionary on the right (mockup "Słowniki"). */
.dict-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.dict-side .card-body { padding: 10px; }
.dict-side .dict-search { margin: 4px 4px 8px; width: calc(100% - 8px); max-width: none; }
.dict-content { min-width: 0; }
@media (max-width: 900px) { .dict-layout { grid-template-columns: minmax(0, 1fr); } }

/* Compact forms: the pickers keep their buttons beside the search field (the results and the new-record form take a row of their own),
   and ".fields" puts the fields of a form in a row that wraps, each label glued to its control. */
.client-picker, .captain-picker, .yacht-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-picker > .alert, .client-picker > fieldset, .client-picker > ul, .captain-picker > .alert, .captain-picker > fieldset, .captain-picker > ul { flex-basis: 100%; }
.client-picker .btn, .captain-picker .btn, .yacht-picker .btn { margin: 0; }
.fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; }
.fields > .field { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.fields > .field label { margin: 0 0 3px; }
.fields > .field .input { width: 100%; box-sizing: border-box; }
.fields > .btn { margin: 0; }
/* Dashboard: tiles of the modules side by side, wrapping on narrow screens. */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.dash-tile h2 { margin: 0 0 8px; }
.dash-tile .counters { margin: 0 0 8px; }

/* Printing a screen (the Print button of a list): only the page content, without the menu, the top bar, the toolbars and the buttons. */
@media print {
    .sidebar, .topbar, .skip-link, .toolbar, .no-print, .scrim, .btn { display: none !important; }
    .app { display: block !important; }
    .app-main, .page, .admin-content { margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
}

/* A progress bar (for example the sending of the demands). */
.progress-bar { width: 100%; height: 10px; border-radius: 5px; background: var(--border, #ddd); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--accent, #1565c0); }

/* The chart of the charter fleet: a table of days, a bar of a charter, a block or a buffer is a cell that spans its days. The kind is told by text and a pattern, not by colour alone. */
.gantt-scroll { overflow-x: auto; margin: 12px 0; }
/* The theme (css/theme.css) has a grid rule for the mock-up chart under the same class: the real chart is a table. */
.gantt { display: table; grid-template-columns: none; border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.gantt th, .gantt td { border: 1px solid var(--border); padding: 0; height: 34px; }
.gantt .gantt-unit { position: sticky; left: 0; z-index: 1; background: var(--surface-2); min-width: 150px; text-align: left; padding: 0 8px; white-space: nowrap; }
.gantt .gantt-day { min-width: 34px; text-align: center; font-weight: 600; background: var(--surface-2); }
.gantt .gantt-day.weekend, .gantt .gantt-cell.weekend { background: var(--surface-3); }
.gantt .gantt-day.today, .gantt .gantt-cell.today { box-shadow: inset 0 0 0 2px var(--brand); }
.gantt .gantt-dow { display: block; font-size: 10.5px; color: var(--text-2); font-weight: 400; }
.gantt td.gantt-bar { cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 0; padding: 0 6px; color: var(--text); }
.gantt td.gantt-bar > span { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.gantt td.gantt-bar[draggable="true"] { cursor: grab; }
.gantt td.gantt-bar.selected { outline: 3px solid var(--brand); outline-offset: -3px; }
.bar-Reservation { background: var(--free-soft); border-left: 4px solid var(--free) !important; }
.bar-Buffer { background: repeating-linear-gradient(45deg, var(--inactive-soft), var(--inactive-soft) 4px, var(--surface) 4px, var(--surface) 8px); color: var(--text-2) !important; font-style: italic; }
.bar-Service { background: var(--overdue-soft); border-left: 4px solid var(--overdue) !important; background-image: repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(214, 69, 69, 0.18) 6px, rgba(214, 69, 69, 0.18) 12px); }
.bar-Season { background: var(--reserved-soft); border-left: 4px solid var(--reserved) !important; background-image: repeating-linear-gradient(90deg, transparent, transparent 6px, rgba(217, 130, 43, 0.2) 6px, rgba(217, 130, 43, 0.2) 12px); }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 8px 0; }
.gantt-swatch { display: inline-block; width: 22px; height: 14px; vertical-align: middle; border: 1px solid var(--border-strong); }

/* The status of a reservation on the chart is also in the text of the bar; an offer is drawn dashed, a reservation after the hand-over is solid. */
.gantt td.status-Offer { border: 2px dashed var(--free) !important; }
.gantt td.status-CheckedIn, .gantt td.status-CheckedOut, .gantt td.status-Settled { background: var(--brand-soft); border-left: 4px solid var(--brand) !important; }
