/* Notification settings components: the personal settings page, the school defaults page and their dialogs.
   Each page appends its blocks under its own root class and reuses the component rules here.
   Every rule sits under a notices-* root class */

/* notes and muted text */
.notices-note                                 { font-size: 12px; color: #6b7280; line-height: 17px; }
.notices-muted                                { color: #6b7280; }

/* sections */
.notices-section                              { padding: 16px 20px; border-bottom: 1px solid #eef0f3; }
.notices-section > h3                         { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: #282828; }
.notices-section > .notices-note              { margin-bottom: 10px; }

/* matrix, with child combinators as the shared stylesheet writes tables */
.notices-matrix                               { width: 100%; border-collapse: collapse; font-size: 13px; }
.notices-matrix > thead > tr > th             { text-align: left; font-weight: 600; color: #4b5563; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; background: #fafafa; }
.notices-matrix > thead > tr > th:first-child { width: 44%; }
/* column widths: the email column is wide */
.notices-matrix > thead > tr > th:nth-child(2) { width: 13.5%; }
.notices-matrix > thead > tr > th:nth-child(3) { width: 31%; }
.notices-matrix > thead > tr > th:nth-child(4) { width: 11.5%; }
.notices-matrix > thead > tr > th.c           { text-align: center; }
.notices-matrix > thead > tr > th > .notices-sub { font-weight: 400; color: #6b7280; }
.notices-matrix > tbody > tr > td             { padding: 9px 10px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; color: #282828; }
.notices-matrix > tbody > tr > td.c           { text-align: center; }
.notices-matrix > tbody > tr > td.ev          { font-weight: 500; }
.notices-matrix > tbody > tr > td.ev small    { display: block; font-weight: 400; color: #6b7280; font-size: 12px; margin-top: 1px; }
.notices-matrix > tbody > tr > td.ev > .notices-reasons { display: block; }
.notices-matrix > tbody > tr > td.ev > .notices-chip { margin-left: 6px; }
.notices-matrix .notices-muted                { font-size: 12px; white-space: normal; }


/* chips */
.notices-chip                                 { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; background: #eef2f7; color: #374151; white-space: nowrap; }
.notices-chip.blue                            { background: #e3f1fb; color: #0d5f94; }
.notices-chip.grey                            { background: #f1f2f4; color: #4b5563; }

/* callout */
.notices-callout                              { border-radius: 6px; padding: 10px 14px; font-size: 13px; line-height: 19px; display: flex; gap: 10px; align-items: flex-start; }
.notices-callout > i                          { margin-top: 2px; font-size: 13px; }
.notices-push .notices-callout > i            { font-size: 18px; }
.notices-callout.warn                         { background: #fff8eb; border: 1px solid #f6dfb3; color: #6b4300; }
.notices-callout.grey                         { background: #f6f7f9; border: 1px solid #e5e7eb; color: #374151; }

/* button size; the colour comes from .classowl-button.blue-ns */
.notices-btn                                  { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 4px; font-size: 13px; font-weight: 600; line-height: normal; border: 1px solid transparent; white-space: nowrap; }
.notices-btn.classowl-button                  { width: auto; }

/* link, the reset link under a cell */
.notices-link                                 { color: #228dcf; text-decoration: none; }
.notices-matrix > tbody > tr > td > .notices-link { display: block; font-size: 12px; margin-top: 2px; }

/* personal settings page */
.settings-other.notices-settings > .inner > form { max-width: none; }
.notices-settings > .inner > .notices-saved   { margin: 0 0 24px; padding: 0; }
.notices-settings .notices-push .notices-callout > div { min-width: 0; }

/* school defaults page, under .notices-defaults and .notices-overlay;
   the matrix, switch, chip, callout, note and section rules above are shared */
.notices-defaults .notices-section             { padding: 0; border-bottom: 0; margin: 0 0 8px; }
.notices-defaults .notices-section > .notices-note { margin-bottom: 0; }
.notices-defaults .notices-callout             { margin: 0 0 16px; }
.notices-defaults .notices-callout[hidden]     { display: none; }
.notices-defaults .notices-matrix > thead > tr > th:first-child { width: 24%; }
.notices-defaults .notices-matrix > thead > tr > th:nth-child(2),
.notices-defaults .notices-matrix > thead > tr > th:nth-child(3),
.notices-defaults .notices-matrix > thead > tr > th:nth-child(4) { width: auto; }
.notices-defaults .notices-matrix > tbody > tr > td.notices-count { white-space: normal; }
.notices-defaults .notices-k                   { color: #6b7280; font-size: 12px; }
.notices-defaults button.usage-link            { border: 0; background: none; color: #228dcf; padding: 0; font: inherit; font-size: 13px; cursor: pointer; }

/* buttons of the dialog; the primary colour comes from .classowl-button.blue-ns */
.notices-btn.grey                              { background: #fff; border-color: #d5d7da; color: #374151; cursor: pointer; }

/* counts dialog; shown and hidden by doModalShow and doModalHide, which fade it in as a block */

/* the unavailable-cell text takes the cell colour, and the long reason texts and the locked chip may wrap
   so the event column keeps its width at 1280px */
.notices-defaults .notices-matrix td > .notices-muted { color: #282828; white-space: normal; }
.notices-defaults .notices-matrix td .notices-chip  { white-space: normal; height: auto; min-height: 22px; }

/* users per event dialog; the frame
   (.notices-overlay, .notices-modal), the matrix, chip, muted, note and link rules above are reused */
.notices-users__reason                       { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; white-space: normal; }

/* person dialog of the admin; the frame
   (.notices-overlay, .notices-modal), the buttons, the key and value block and the matrix rules above are reused. The dialog
   sits inside the page root .notices-defaults, so the rules of that root which would reach its callouts and its matrix are
   put back to the personal page's values */
.notices-callout.info                          { background: #eef6fc; border: 1px solid #cfe5f5; color: #164e75; }
.notices-person .notices-person__sub           { font-size: 13px; color: #6b7280; margin-top: 2px; }
.notices-defaults .notices-person .notices-callout { margin: 0 0 12px; }
.notices-defaults .notices-person .notices-matrix > thead > tr > th:first-child { width: 44%; }
.notices-defaults .notices-person .notices-matrix > thead > tr > th:nth-child(2) { width: 13.5%; }
.notices-defaults .notices-person .notices-matrix > thead > tr > th:nth-child(3) { width: 31%; }
.notices-defaults .notices-person .notices-matrix > thead > tr > th:nth-child(4) { width: 11.5%; }
.notices-defaults .notices-person .notices-matrix td > .notices-muted { color: #6b7280; white-space: normal; }
/* the toast is a child of body with z-index 300 (class-wall.css); the overlay is at 1000 */
.notices-defaults .notices-person .notices-callout.info > i { font-size: 13px; }

/* email modes and own digest times of the personal page; reuses the section, note, button and chip rules above */
.notices-digest-times .notices-time-add:disabled { opacity: .5; cursor: default; }

/* notification texts editor, page root .notices-texts */
.notices-texts .notices-callout                 { margin: 12px 20px 0; }
.notices-texts .notices-callout[hidden]         { display: none; }
.notices-texts .notices-texts-pane[hidden]      { display: none; }
.notices-texts .notices-texts-pickers           { display: flex; flex-wrap: wrap; gap: 14px; }
.notices-texts .notices-texts-picker            { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.notices-texts .notices-texts-picker > label    { font-size: 12px; color: #6b7280; }
.notices-texts .notices-texts-picker select     { height: 32px; max-width: 100%; padding: 0 8px; border: 1px solid #d5d7da; border-radius: 4px; background: #fff; font: inherit; font-size: 13px; color: #282828; }
.notices-texts .notices-texts-picker-event select { min-width: 260px; }
.notices-texts .notices-texts-sensitive         { margin: 10px 0 0; }
.notices-texts .notices-texts-sensitive[hidden] { display: none; }
.notices-texts .notices-texts-field > .notices-texts-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #282828; }
.notices-texts .notices-texts-field > .input    { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.notices-texts .notices-texts-field > textarea  { resize: vertical; }
.notices-texts .notices-texts-line              { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.notices-texts .notices-texts-line > .notices-btn { height: 28px; padding: 0 10px; font-weight: 400; }
.notices-texts .notices-texts-default           { margin-top: 4px; overflow-wrap: anywhere; }
.notices-texts .notices-texts-placeholders[hidden] { display: none; }
.notices-texts .notices-texts-chips             { display: flex; flex-wrap: wrap; gap: 6px; }
.notices-texts .notices-texts-chip              { padding: 2px 8px; border-radius: 4px; background: #eef2f7; color: #374151; font-size: 12px; }
.notices-texts .notices-actions                 { padding: 14px 20px 20px; display: flex; justify-content: space-between; align-items: center; }

/* the notification pages built from the site's components (switch, dropdown, time field, tabs, modal, buttons).
   Appended block, nothing above is edited. Site classes carry the look; the rules here only add what no site class has:
   key and value row, dropdown width, dimmed switch, group row, foot bar, chip, callout, note and the tab rules that
   profile-inputs.css scopes to two other page roots. Rhythm: 15 px page inset, 24 px between sections, 8 px between
   controls in a row and between a label and its control */

/* page frame: the site inset of 15 px (settings.css); these two selectors repeat the ones of the first block that set padding to 0 */
.settings-page.notices-settings > .inner,
.settings-page.notices-defaults > .inner       { padding: 15px; }
.notices-settings > .inner fieldset,
.notices-defaults > .inner fieldset            { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.notices-settings > .inner fieldset > legend,
.notices-defaults > .inner fieldset > legend   { margin-bottom: 8px; padding: 0; }

/* note, muted text, chip and callout in the site palette */
.notices-note                                  { font-size: 12px; line-height: 18px; color: #6b7280; }
.notices-muted                                 { color: #6b7280; }
.notices-chip                                  { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; line-height: 18px; background: #F0F4FA; color: #657FAC; white-space: nowrap; }
.notices-chip.blue                             { background: #e3f1fb; color: #0d5f94; }
.notices-chip.grey                             { background: #f1f2f4; color: #4b5563; }
.notices-callout                               { padding: 12px 16px; border-radius: 5px; font-size: 13px; line-height: 20px; }

/* help text of the site: modals.css scopes form-hint to .modal-form, so the notification roots get the same rule */
.notices-settings .form-hint,
.notices-defaults .form-hint,
.notices-texts .form-hint                      { font-size: 12px; line-height: 17px; color: #6b7280; }

/* switch: label.cikumas-switch from styles.css. The checkbox stays focusable (the site hides it with display none) */
.cikumas-switch.notices-switch                 { position: relative; display: inline-flex; vertical-align: middle; cursor: default; }
.cikumas-switch.notices-switch.notices-can-change { cursor: pointer; }
.cikumas-switch.notices-switch > input         { display: block; position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.cikumas-switch.notices-switch > input:focus-visible ~ .switch { outline: 2px solid #228dcf; outline-offset: 2px; }
.cikumas-switch.notices-dimmed > .switch       { opacity: .6; outline: 1px dashed #6b7280; outline-offset: 2px; }

/* dropdown: classowl-input-frame icon-right icon-wide with the read-only input; in a table cell 176 px up to its longest title (matrix.js), 220 px in a filter row */
.classowl-input-frame.notices-dd               { width: 176px; min-width: 176px; max-width: 100%; }
.classowl-input-frame.notices-dd > .input      { cursor: pointer; text-overflow: ellipsis; }
.classowl-input-frame.notices-dd > .input:disabled { cursor: default; }
.classowl-input-frame.notices-dd > ul.autocomplete { min-width: 240px; }
.notices-filter > .classowl-input-frame.notices-dd,
.filter > .classowl-input-frame.notices-dd     { width: 220px; }
.notices-filter                                { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }

/* a classowl-table-large clips its overflow, which would cut the dropdown list of a cell */
.classowl-table-large.notices-table            { overflow: visible; }

/* chips of a matrix cell wrap like the text, so a long chip does not widen its column (all roots) */
.notices-matrix td .notices-chip               { white-space: normal; height: auto; min-height: 22px; }

/* table group row of the matrix */
.notices-matrix > tbody > tr.notices-group > td { padding: 7px 10px; background: #f3f6fa; font-size: 12px; font-weight: 600; letter-spacing: .2px; color: #374151; }
.notices-matrix > tbody > tr.notices-group > td > small { display: block; font-weight: 400; color: #6b7280; }
/* the chip "Hidden from users" keeps its group row as tall as the others (a 22px chip adds 5px): 18px, the chip's own type,
   on the label's baseline; the -1px margins keep it inside the normal line height of the defaults page (same font) */
.notices-matrix > tbody > tr.notices-group > td > .notices-hidden-chip { height: 18px; min-height: 0; margin: -1px 0; line-height: 18px; font-weight: 400; letter-spacing: 0; vertical-align: baseline; }

/* key and value row: key 12 px #6b7280 (the one label style), value takes the rest; k150 and k210 set the key column */
.notices-kvrow                                 { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; align-items: start; margin: 0 0 8px; }
.notices-kvrow.k150                            { grid-template-columns: 150px minmax(0, 1fr); }
.notices-kvrow.k210                            { grid-template-columns: 210px minmax(0, 1fr); }
.notices-kvrow > .k                            { font-size: 12px; line-height: 20px; padding-top: 6px; color: #6b7280; }
.notices-kvrow > .v                            { min-width: 0; }

/* foot bar: note on the left, Save on the right */
.notices-foot                                  { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 24px 0 0; }
.notices-foot > .notices-note                  { flex: 1 1 240px; margin-right: auto; }
.notices-foot > .classowl-button               { margin-left: auto; }

/* exact modal widths of the person form and the users dialog (the site has 320, 640, 960, 1280) */
.classowl-modal-form.notices-w860 > .container { width: 860px; max-width: 100%; }
.classowl-modal-form.notices-w900 > .container { width: 900px; max-width: 100%; }

/* tabs: the site's ul.tabs (views/tabs.html, styles.css); role-tabs and role-tab stay only as hooks for the scripts and tests */
.notices-defaults ul.tabs.notices-roletabs,
.notices-texts ul.tabs.notices-texts-tabs      { margin: 0 0 24px; }

/* time field of the digest times: classowl-input-frame timepicker (calendar.css is not loaded on every settings page) */
.notices-times-ui                              { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.notices-times-line                            { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notices-times-list                            { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* a time is a compact blue chip "07:00 x" (the chip colours of .notices-chip.blue); the field inside keeps the site's time
   picker, its frame and border are taken off */
.notices-time                                  { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; box-sizing: border-box; border: 1px solid #cfe5f5; border-radius: 14px; background: #e3f1fb; }
.notices-time:focus-within                     { border-color: #228dcf; box-shadow: 0 0 0 2px rgba(34, 141, 207, .15); }
.notices-time > .classowl-input-frame.timepicker { width: 44px; }
.notices-time > .classowl-input-frame > .input { height: 26px; padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 500; line-height: 26px; color: #0d5f94; }
.notices-time > .classowl-input-frame > .input::placeholder { color: #6b9cc0; font-weight: 400; }
.notices-time > .classowl-input-frame > .input:disabled { background: transparent; }
.notices-time .timepicker ul.autocomplete      { min-width: 260px; }
.notices-time .timepicker ul.autocomplete li   { display: inline-block; width: 25%; text-align: center; }
.notices-time .timepicker ul.autocomplete li a { text-align: center; }
.notices-time-remove                           { width: 20px; height: 20px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: #0d5f94; font-size: 11px; line-height: 20px; cursor: pointer; }
.notices-time-remove:hover                     { background: #cfe5f5; }
.notices-time-remove:disabled                  { opacity: .35; cursor: default; background: none; }
/* "+ Add a time" is a link-style button of the chip height */
.notices-times-ui .classowl-button.notices-time-add { height: 28px; padding: 0 4px; border: 0; background: none; box-shadow: none; font-size: 13px; font-weight: 600; line-height: 28px; color: #228dcf; }
.notices-times-ui .classowl-button.notices-time-add:hover:not(:disabled) { color: #1F3C77; }
.notices-times-ui > .notices-times-hint        { margin: 0; }
/* the problem of the times under the chips (matrix.js times setError) in the red of the site's .warning line, the chip of
   the field it names with a red border */
.notices-times-ui > .notices-times-error       { margin: 0; font-size: 13px; font-weight: 600; line-height: 19px; color: #ef4949; }
.notices-times-ui > .notices-times-error[hidden] { display: none; }
.notices-time:has(.input[aria-invalid="true"]) { border-color: #ef4949; }
/* ready choices: soft pills of the chip height, the matching one light blue with a tick */
.notices-times-choice                          { display: inline-flex; align-items: center; height: 28px; margin: 0; padding: 0 12px; box-sizing: border-box; border: 1px solid #e5e7eb; border-radius: 14px; background: #f6f7f9; font-family: inherit; font-size: 13px; line-height: 26px; color: #374151; white-space: nowrap; cursor: pointer; }
.notices-times-choice:hover:not(:disabled)     { border-color: #cfe5f5; color: #0d5f94; }
.notices-times-choice.notices-times-choice-on  { border-color: #cfe5f5; background: #e3f1fb; color: #0d5f94; font-weight: 500; }
.notices-times-choice:disabled                 { opacity: .5; cursor: default; }
.notices-times-picks                           { display: flex; flex-wrap: wrap; gap: 8px; }
.notices-times-notes                           { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 6px; font-size: 12px; line-height: 17px; color: #6b7280; }
.notices-times-notes > .notices-note           { margin: 0; }
/* the keys of rows with chips sit on the chip's text line */
.notices-kvrow:has(.notices-times-ui) > .k,
.notices-kvrow.notices-times-choices > .k      { padding-top: 4px; }

/* narrow screens: key above value */
@media screen and (max-width: 600px) {
    .notices-kvrow,
    .notices-kvrow.k150,
    .notices-kvrow.k210                        { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .notices-kvrow > .k                        { padding-top: 0; line-height: 18px; }
    .notices-kvrow .classowl-input-frame.notices-dd { width: 100%; }
}

/* personal page: help line under a legend, the digest times section, the reset link, the dropdown of a dimmed cell */
.notices-settings > .inner fieldset > .notices-note { margin: 0 0 8px; }
.notices-digest-times > .notices-note          { margin: 0 0 8px; }
.notices-digest-times > .notices-note:last-child { margin-bottom: 0; }
.notices-time-add > i                          { margin-right: 6px; }
.notices-times-choice > i                       { margin-right: 6px; }
.notices-times-choices-label                   { margin: 0; }
/* the note on the four email modes starts under the values (key column 150 + gap 16), not under the keys, and keeps a readable length */
.notices-settings > .inner .notices-digest-times > .notices-modes-note { max-width: 720px; margin: 4px 0 0 166px; }
@media screen and (max-width: 600px) {
    .notices-settings > .inner .notices-digest-times > .notices-modes-note { margin-left: 0; }
}
.notices-matrix > tbody > tr > td > .notices-link[hidden] { display: none; }
.classowl-input-frame.notices-dd.notices-dimmed { opacity: .6; }

/* personal page: every rule is scoped to .notices-settings so the admin pages keep their look.
   One small-text style (12 px / 17 px, #6b7280, the site's form-hint) for notes, descriptions, reasons, hints, unavailable
   texts and the reset link. Every event row keeps the height of the mode dropdown (36 px content): two lines of small text,
   a two-line chip, a switch with its reset link and a label with its description all fit in it */
.notices-settings .notices-note,
.notices-settings .notices-matrix small,
.notices-settings .notices-matrix .notices-muted,
.notices-settings .notices-matrix > tbody > tr > td > .notices-link { font-size: 12px; line-height: 17px; }
.notices-settings .notices-matrix > tbody > tr > td.ev small { margin-top: 0; }
/* an inline text would take the 14 px line box of the cell for each of its lines; as a block of its own it keeps 17 px */
.notices-settings .notices-matrix > tbody > tr > td > .notices-muted { display: inline-block; vertical-align: middle; }
/* a locked chip of a narrow column takes two lines at most at 1280 px */
.notices-settings .notices-matrix > tbody > tr > td > .notices-chip { padding: 0 6px; }
/* column spread with room for the dropdown and its reset link on one line at 1280 px (176 + 8 + link) */
.notices-settings .notices-matrix > thead > tr > th:first-child { width: 35%; }
.notices-settings .notices-matrix > thead > tr > th:nth-child(2) { width: 15%; }
.notices-settings .notices-matrix > thead > tr > th:nth-child(3) { width: 35%; }
.notices-settings .notices-matrix > thead > tr > th:nth-child(4) { width: 15%; }
/* the reset link of an email cell sits right of its dropdown; it wraps under it only when the column is too narrow */
.notices-settings .notices-matrix > tbody > tr > td.l > .notices-dd { display: inline-block; margin-right: 8px; vertical-align: middle; }
.notices-settings .notices-matrix > tbody > tr > td.l > .notices-link:not([hidden]) { display: inline-block; margin: 0; vertical-align: middle; }
.notices-settings .notices-matrix > tbody > tr > td.c > .notices-link { margin-top: 1px; }
/* group rows: one height with or without gate switches (line box 20 px holds the 18 px switch); a cell text stays regular */
.notices-settings .notices-matrix > tbody > tr.notices-group > td { line-height: 20px; }
.notices-settings .notices-matrix > tbody > tr.notices-group > td > small,
.notices-settings .notices-matrix > tbody > tr.notices-group > td > .notices-muted { font-weight: 400; letter-spacing: 0; }
/* foot: the note explains Save, so both sit together on the right */
.notices-settings .notices-foot                { justify-content: flex-end; }
.notices-settings .notices-foot > .notices-note { flex: 0 1 auto; margin-right: 0; text-align: right; }
.notices-settings .notices-foot > .classowl-button { margin-left: 0; }
/* narrow screens (the settings frame keeps about 520 px for the table): a wider event column, 13 px event labels so two
   lines keep the row height, and the site's compact cell padding cut to 6 px at the sides */
@media screen and (max-width: 600px) {
    .notices-settings .notices-matrix > thead > tr > th:first-child { width: 34%; }
    .notices-settings .notices-matrix > thead > tr > th:nth-child(2) { width: 15%; }
    .notices-settings .notices-matrix > thead > tr > th:nth-child(3) { width: 37%; }
    .notices-settings .notices-matrix > thead > tr > th:nth-child(4) { width: 14%; }
    .notices-settings .notices-table.compact > table > * > * > th,
    .notices-settings .notices-table.compact > table > * > * > td { padding-left: 6px; padding-right: 6px; }
    .notices-settings .notices-matrix > tbody > tr > td.ev { font-size: 13px; line-height: 18px; }
}
.notices-table > table > thead > tr > th       { font-weight: 600; color: #4b5563; }
.notices-table > table > thead > tr > th > .notices-sub { font-weight: 400; }
#modal-notices-users .classowl-table-large > table > thead > tr > th,
.notices-texts .classowl-table-large > table > thead > tr > th { font-weight: 600; color: #4b5563; }

/* apply dialog of the defaults page (site modal w640): impact blocks, key and value rows as text, check box, keep-choice line */
#notices-defaults-apply .notices-impact > .head  { font-size: 14px; line-height: 21px; margin-bottom: 8px; }
#notices-defaults-apply .notices-impact + .notices-impact { margin-top: 16px; }
#notices-defaults-apply .notices-impacts         { margin-bottom: 16px; }
#notices-defaults-apply .notices-kvrow           { margin: 0 0 8px; font-size: 13px; }
#notices-defaults-apply .notices-kvrow > .k      { line-height: 20px; }
#notices-defaults-apply .notices-kvrow > .v      { line-height: 20px; color: #282828; }
#notices-defaults-apply .notices-check           { margin-top: 16px; }
#notices-defaults-apply .notices-keep-choice     { margin-top: 16px; }

/* Cancel and Save sit together on the right, (the site form-ctrls spreads them) */
#notices-defaults-apply .form-ctrls,
#modal-notices-users .form-ctrls,
#modal-notices-person .form-ctrls               { justify-content: flex-end; gap: 8px; }

/* key and value rows as text, the users dialog search, right-aligned foot, the person matrix at 390 px */
.notices-kvrow > .v                            { font-size: 13px; line-height: 20px; color: #282828; }
.notices-kvrow > .v:not(:has(.classowl-input-frame, .notices-times-ui, .cikumas-switch, button)) { padding-top: 6px; }
.notices-filter > .classowl-input-frame.notices-search { width: 220px; max-width: 100%; }
#modal-notices-users .notices-filter > .classowl-input-frame.notices-dd,
#modal-notices-users .notices-filter > .classowl-input-frame.notices-search { width: 180px; }
.classowl-modal-form .form-ctrls.notices-end,
.classowl-modal-form .form-ctrls.notices-foot  { justify-content: flex-end; gap: 8px; }
#modal-notices-users.w960 > .container,
.notices-person.w960 > .container,
.notices-text-modal.w960 > .container { max-width: 100%; }
@media screen and (max-width: 600px) {
    .notices-person .form-title > .form-subtitle { white-space: normal; }
    /* the dropdown list of a cell may be cut here; at this width the table scrolls sideways instead of being clipped */
    .notices-person__matrix > .classowl-table-large.notices-table { overflow-x: auto; }
}

/* Notification texts page, root .notices-texts: events list, editor modal, shared email layout tab. Site components
   carry the look (classowl-modal-form, role-tabs, classowl-input-frame, classowl-table-large, classowl-button); the rules below
   add only what no site class has. Rhythm: 15 px page inset, 24 px between blocks, 16 px between fields, 8 px between controls */
.settings-page.notices-texts > .inner                 { padding: 15px; }
.notices-texts .notices-callout                       { margin: 0 0 16px; }
.notices-texts .notices-callout[hidden],
.notices-texts .notices-texts-pane[hidden],
.notices-texts .notices-text-field[hidden],
.notices-texts .notices-text-tabrow[hidden],
.notices-texts .notices-text-markers[hidden],
.notices-texts .notices-text-pushbox[hidden],
.notices-texts .notices-text-layoutnote[hidden],
.notices-texts .form-hint[hidden]                     { display: none; }
.notices-texts .notices-texts-sensitive               { margin: 0 0 16px; }

/* events list */
.notices-texts .notices-texts-filters                 { margin: 0 0 16px; }
.notices-texts .notices-texts-filters > .classowl-input-frame.notices-texts-kind { width: 290px; }
.notices-texts .notices-chip.orange                   { background: #fff4e0; color: #8a5300; }
.notices-texts .notices-texts-list td                 { vertical-align: middle; }
.notices-texts tr.notices-group > td                  { padding: 7px 10px; background: #f3f6fa; font-size: 12px; font-weight: 600; letter-spacing: .2px; color: #374151; }
.notices-texts a.notices-texts-open                   { white-space: nowrap; }
.notices-texts a.notices-texts-open > i               { margin-right: 4px; }

/* editor modal: tabs without the page tab frame, two columns (form, side panel) */
.notices-texts .notices-text-modal .role-tabs         { margin: 0; padding: 0; border: 0; }
.notices-texts .notices-text-body                     { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
.notices-texts .notices-text-main                     { min-width: 0; }
.notices-texts .notices-text-tabrow                   { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.notices-texts .notices-text-tablabel                 { font-size: 13px; line-height: 20px; color: #6b7280; }
.notices-texts .notices-text-field                    { padding-top: 22px; min-width: 0; }
.notices-texts .notices-text-field > .classowl-input-frame.labeled { margin-top: 0; }
.notices-texts .notices-text-meta                     { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin: 4px 0 16px; }
.notices-texts .notices-text-count                    { margin-left: auto; font-size: 12px; line-height: 17px; color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }
.notices-texts .notices-text-count.over               { color: #c0392b; }
.notices-texts .notices-text-pair                     { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.notices-texts .notices-text-side                     { display: flex; flex-direction: column; gap: 24px; min-width: 0; padding-top: 6px; }
.notices-texts .notices-text-side .notices-callout    { margin: 0; }
.notices-texts .notices-heading                       { margin: 0 0 8px; font-size: 12px; font-weight: 600; line-height: 17px; letter-spacing: .4px; text-transform: uppercase; color: #6b7280; }
.notices-texts .notices-text-marker                   { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #e5e5e5; font-size: 12px; line-height: 17px; }
.notices-texts .notices-text-marker > .token          { flex-shrink: 0; color: #282828; overflow-wrap: anywhere; }
.notices-texts .notices-text-marker > .description    { color: #6b7280; text-align: right; }
.notices-texts .notices-pushframe                     { padding: 12px; border-radius: 10px; background: #eef2f7; }
.notices-texts .notices-pushcard                      { padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.notices-texts .notices-pushhead                      { display: flex; justify-content: space-between; margin: 0 0 4px; font-size: 11px; line-height: 16px; color: #6b7280; }
.notices-texts .notices-pushtitle                     { font-size: 13px; font-weight: 600; line-height: 18px; overflow-wrap: anywhere; }
.notices-texts .notices-pushtext                      { font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.notices-texts .notices-pushtext[hidden]              { display: none; }
.notices-texts .notices-text-foot                     { flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid #e5e5e5; }
.notices-texts .notices-text-actions                  { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
#notices-defaults-apply.w640 > .container,
.notices-text-modal.w640 > .container                { max-width: 100%; }

/* shared email layout tab: form left, live preview right */
.notices-texts .notices-layout                        { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.notices-texts .notices-layout-form,
.notices-texts .notices-layout-side                   { min-width: 0; }
.notices-texts .notices-colour                        { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 32px; color: #282828; }
.notices-texts .notices-swatch                        { -webkit-appearance: none; appearance: none; flex: none; width: 16px; height: 16px; margin: 0; padding: 0; border: 0; border-radius: 3px; background: none; opacity: 1; cursor: default; }
.notices-texts .notices-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.notices-texts .notices-swatch::-webkit-color-swatch  { border: 0; border-radius: 3px; }
.notices-texts .notices-layout-shade                  { margin: 0 0 0 24px; }
.notices-texts fieldset.notices-layout-texts          { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.notices-texts .notices-layout-texts > legend         { margin: 0 0 8px; padding: 0; font-size: 12px; font-weight: 600; line-height: 17px; letter-spacing: .4px; text-transform: uppercase; color: #6b7280; }
.notices-texts .notices-layout-langs                  { margin: 0 0 8px; }
.notices-texts .notices-layout-texts .notices-text-field { margin: 0 0 16px; }
.notices-texts .notices-layout-markers                { margin: 4px 0 0; }
.notices-texts .notices-layout-locked                 { margin: 0; }
.notices-texts .notices-layout-locked > i             { margin-right: 4px; }
.notices-texts .notices-layout-frame                  { padding: 16px; border-radius: 5px; background: #f3f4f6; }
.notices-texts .notices-layout-frame > iframe         { display: block; width: 100%; height: 520px; border: 0; border-radius: 4px; background: #fff; }
.notices-texts .notices-layout-foot                   { justify-content: flex-end; gap: 8px; }
.notices-texts .notices-layout-foot > .classowl-button { margin-left: 0; }
.notices-texts .notices-layout-active > .classowl-input-frame.notices-dd { width: 220px; }
@media screen and (max-width: 1400px) {
    .notices-texts .notices-layout                    { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 800px) {
    .notices-texts .notices-text-body,
    .notices-texts .notices-layout                    { grid-template-columns: minmax(0, 1fr); }
    .notices-texts .notices-text-pair                 { grid-template-columns: minmax(0, 1fr); }
    .notices-texts .notices-text-modal .form-subtitle { white-space: normal; }
}

/* notification texts, school defaults, users per event and person dialogs. Site components carry the
   look; the rules below set the list density, the sticky columns of a narrow list, the colour rows, the whole school
   heading and the narrow frames. Scoped under the page roots and the two dialog ids */

/* events list: 13 px rows with 10 px cell padding; below 900 px of frame the table scrolls sideways and keeps the
   event and its Text link in view with the site's sticky-l and sticky-r cells, whose edge line shows only while it scrolls */
.notices-texts .notices-texts-list > table                                   { min-width: 900px; }
.notices-texts .notices-texts-list > table > thead > tr > th                 { padding: 8px 10px; line-height: 17px; white-space: nowrap; }
.notices-texts .notices-texts-list > table > tbody > tr > td                 { padding: 10px; font-size: 13px; line-height: 18px; }
.notices-texts .notices-texts-list > table > tbody > tr.notices-group > td    { padding: 7px 10px; font-size: 12px; line-height: 18px; }
.notices-texts .notices-texts-list > table > * > tr:not(.notices-group) > :first-child { width: 20%; }
.notices-texts .notices-texts-list > table > * > tr > :nth-child(2),
.notices-texts .notices-texts-list > table > * > tr > :nth-child(7),
.notices-texts .notices-texts-list > table > * > tr > .notices-texts-action    { white-space: nowrap; }
.notices-texts .notices-texts-list:not(.notices-texts-overflow) > table > * > tr > .sticky-l,
.notices-texts .notices-texts-list:not(.notices-texts-overflow) > table > * > tr > .sticky-r { box-shadow: none; }
.notices-texts .notices-texts-grouplabel                                     { display: inline-block; position: sticky; left: 10px; }
/* a narrow window: the eight columns share the frame without a sideways scroll, so the Text column stays in view; the headers
   and the Text link (a text in four languages) wrap inside their cells */
@media screen and (min-width: 801px) and (max-width: 1320px) {
    .notices-texts .notices-texts-list > table                                   { min-width: 0; }
    .notices-texts .notices-texts-list > table > thead > tr > th                 { padding: 8px 6px; white-space: normal; }
    .notices-texts .notices-texts-list > table > tbody > tr > td                 { padding: 10px 6px; }
    .notices-texts .notices-texts-list > table > tbody > tr.notices-group > td    { padding: 7px 6px; }
    .notices-texts .notices-texts-list > table > * > tr:not(.notices-group) > :first-child { width: 18%; }
    .notices-texts .notices-texts-list > table > * > tr > :nth-child(7),
    .notices-texts .notices-texts-list > table > * > tr > .notices-texts-action,
    .notices-texts a.notices-texts-open                                          { white-space: normal; }
}
/* the three filters share one row and shrink with the frame (a wrapping flex row would break the line before shrinking) */
.notices-texts .notices-texts-filters                                        { flex-wrap: nowrap; }
.notices-texts .notices-texts-filters > .classowl-input-frame                 { flex: 0 1 220px; min-width: 150px; }
.notices-texts .notices-texts-filters > .classowl-input-frame.notices-texts-kind { flex-basis: 290px; min-width: 200px; }

/* editor modal: the language tabs end the tab block, 16 px above the first field as between the fields */
.notices-texts .notices-text-tabrow.notices-text-langs                        { margin-bottom: 16px; }

/* shared email layout: a colour row sits on the key's text line, the language tabs start under their heading */
.notices-texts .notices-colour                                               { align-items: flex-start; line-height: 20px; }
.notices-texts .notices-colour > .notices-swatch                              { margin-top: 2px; }
.notices-texts .notices-layout-shade                                         { margin: 2px 0 0 24px; }
.notices-texts ul.tabs.notices-layout-langs                                  { margin: 0 0 16px; text-align: left; }

/* school defaults: the "For the whole school" heading (the settings-list root sets the font size to 0, the
   settings-other legend style of settings.css is copied) and the line that closes the section above the role tabs */
.notices-defaults > .inner > fieldset.notices-school-times                    { padding: 0 0 24px; border-bottom: 1px solid #e5e5e5; }
.notices-defaults > .inner > fieldset.notices-school-times > legend           { font-size: 16px; font-weight: 600; line-height: 22px; color: #282828; }
/* the groups block (Hide and one switch per module) closes like the school section; its header reads like the matrix header */
.notices-defaults > .inner > fieldset.notices-groups                         { padding: 0 0 24px; border-bottom: 1px solid #e5e5e5; }
.notices-defaults > .inner > fieldset.notices-groups > legend                { font-size: 16px; font-weight: 600; line-height: 22px; color: #282828; }
.notices-groups-table > table > thead > tr > th                              { font-weight: 600; color: #4b5563; }
/* the two switch columns are equally wide in every language; the module names take the rest (.notices-defaults so that
   the matrix widths of the defaults page above do not win) */
.notices-defaults .notices-groups-table > table > thead > tr > th:first-child { width: 40%; }
.notices-defaults .notices-groups-table > table > thead > tr > th:nth-child(n+2) { width: 30%; }
/* a count keeps "5 / 5" and "email on" whole; in a narrow frame the label goes under the number */
.notices-defaults .notices-matrix > tbody > tr > td.notices-count > .usage-link,
.notices-defaults .notices-matrix > tbody > tr > td.notices-count > .notices-k { white-space: nowrap; }
/* the narrowest settings frame (549 px) holds the four role tabs on one line */
@media screen and (max-width: 960px) {
    .notices-defaults ul.tabs.notices-roletabs li > *                         { width: 100px; }
}
@media screen and (max-width: 1000px) {
    .notices-defaults > .inner > .classowl-table-large.notices-table          { overflow-x: auto; }
    .notices-defaults > .inner > .classowl-table-large.notices-table > table  { min-width: 640px; }
}

/* users per event dialog: steady column spread across filters and pages, one-line values, no empty foot */
#modal-notices-users .classowl-table-large > table > thead > tr > th          { white-space: nowrap; }
#modal-notices-users .classowl-table-large > table > tbody > tr > td         { font-size: 13px; line-height: 18px; }
#modal-notices-users .classowl-table-large > table > tbody > tr > td.not-found { font-size: 18px; }
#modal-notices-users .classowl-table-large > table > tbody > tr > td:nth-child(n+3) { white-space: nowrap; }
#modal-notices-users .classowl-table-large > table > tbody > tr > td > .notices-users__reason { white-space: normal; }
#modal-notices-users .notices-users__pager                                   { margin-top: 16px; }
#modal-notices-users .notices-users__pager:has(> .notices-users__count:empty) { display: none; }
@media screen and (max-width: 600px) {
    #modal-notices-users .notices-filter > .classowl-input-frame.notices-dd,
    #modal-notices-users .notices-filter > .classowl-input-frame.notices-search { width: 100%; }
    /* names and children keep a readable width; the table scrolls sideways in its frame */
    #modal-notices-users .classowl-table-large > table                       { min-width: 600px; }
    #modal-notices-users .classowl-table-large > table > * > tr > :first-child { min-width: 110px; }
    /* the person matrix scrolls sideways (see above) with the event text kept readable */
    .notices-person .notices-person__matrix .notices-matrix                  { min-width: 600px; }
}

/* person dialog: 16 px between the banner, the digest and push rows and the matrix */
.notices-defaults .notices-person .notices-callout.notices-person__notice     { margin-bottom: 16px; }
.notices-person .notices-person__kvbox                                       { margin-bottom: 16px; }

/* one button height per button row: the site's white button is 34 px with its border, the blue one 32 px */
.notices-texts .notices-text-foot .classowl-button.blue-ns,
.notices-texts .notices-layout-foot .classowl-button.blue-ns,
#notices-defaults-apply .form-ctrls .classowl-button.blue-ns,
.notices-person .form-ctrls .classowl-button.blue-ns,
.notices-texts .notices-text-foot .classowl-button.link2                     { border: 1px solid transparent; }
/* the person dialog's foot note is empty until a save answers; empty, it does not push Cancel and Save onto two lines, and
   Save keeps to Cancel's right (only Cancel takes the free space on its left) */
.notices-person .form-ctrls > .notices-note:empty                            { display: none; }
.notices-person .form-ctrls > .classowl-button + .classowl-button            { margin-left: 0; }
/* a short locked chip of a switch column ("Always shown in ClassOwl") stays on one line; the event column gives the room */
.notices-person .notices-matrix > tbody > tr > td.c > .notices-chip          { white-space: nowrap; }
