/* Compact reminder list and an editor alongside it, in the existing OSTRO palette. */
.mailing-root [hidden] { display: none !important; }
.mailing-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line-strong); margin-bottom: 24px; }
.mailing-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 0 12px; background: none; color: var(--muted); font: 500 14px var(--f-body); cursor: pointer; }
.mailing-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.mailing-tabs button:hover { color: var(--ink); }
.notice-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.notice-layout.has-editor { grid-template-columns: minmax(0, 1fr) 440px; }
.notice-layout > .mailing-panel { padding: 0; overflow: hidden; }
.notice-layout > .mailing-panel > .panel-head { margin: 0; padding: 20px; flex-wrap: wrap; }
.notice-list-heading { display: flex; align-items: center; gap: 10px; }
.notice-list-heading h3 { font-size: 15px; }
.notice-list-heading > span { font: 12px var(--f-mono); color: var(--muted); }
.mailing-root .notice-list { display: block; }
.notice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 18px 20px; border-top: 1px solid var(--line); }
.notice-row:hover, .notice-row.is-selected { background: var(--accent-soft); }
.notice-row.is-selected { box-shadow: inset 2px 0 var(--accent); }
.notice-summary { min-width: 0; }
.notice-summary-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 6px; }
.notice-summary-head b { font-size: 14px; font-weight: 500; }
.notice-summary-head > span { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.notice-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; color: var(--muted); }
.notice-excerpt a { color: inherit; pointer-events: none; }
.notice-excerpt blockquote { margin: 0; }
.notice-row.is-off .notice-summary { opacity: .6; }
.notice-row-actions { display: flex; align-items: center; gap: 16px; }
.notice-row-actions .switch em { min-width: 70px; font-size: 12px; }
.notice-edit { min-height: 32px; }
.has-editor .notice-row { gap: 14px; }
.has-editor .notice-row-actions { flex-direction: column; align-items: flex-end; gap: 10px; }
.has-editor .notice-summary-head { display: grid; gap: 4px; }
.has-editor .notice-list-heading { flex-wrap: wrap; }
.has-editor #addNotification { font-size: 12px; }
.notice-editor { position: sticky; top: 20px; margin: 0; width: 100%; min-width: 0; max-width: none; max-height: min(calc(100dvh - 40px), var(--editor-room, calc(100dvh - 40px))); padding: 0; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); overflow: hidden; }
.notice-editor[open] { display: flex; flex-direction: column; }
.notice-editor form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.notice-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.notice-editor-head h3 { font: 600 15px/1.5 var(--f-body); letter-spacing: 0; }
.notice-editor-head .icon-button { width: 30px; height: 30px; font-size: 23px; }
.notice-editor-body { overflow-y: auto; padding: 20px; min-height: 0; }
.notice-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.notice-field-label { display: block; color: var(--muted); font-size: 12px; }
.notice-fields > label[for="noticeText"] { margin-top: 12px; }
.notice-editor .notice-when { flex-wrap: nowrap; }
.notice-editor .notice-when select { flex: 1; min-width: 0; width: 100%; }
.notice-editor .notice-days input { width: 64px; }
.notice-editor textarea { width: 100%; min-height: 180px; resize: vertical; font-size: 14px; line-height: 1.6; }
.notice-character-count { color: var(--muted); font: 11px var(--f-mono); text-align: right; }
.notice-preview-section { display: grid; gap: 10px; margin-top: 24px; }
.notice-preview { padding: 14px; border-left: 2px solid var(--accent); background: var(--sunken); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-preview a { color: var(--accent-text); }
.notice-preview blockquote { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--muted); }
.notice-error { font-size: 13px; color: var(--danger); white-space: pre-wrap; }
.notice-error:empty { display: none; }
.notice-error:not(:empty) { margin-top: 16px; }
.notice-editor-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); flex-shrink: 0; }
.notice-editor-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.notice-editor::backdrop { background: rgb(0 5 30 / .65); }
body:has(#noticeEditor:modal), body:has(#faqEditor:modal) { overflow: hidden; }
body[data-readonly] .notice-editor .text-tools { display: none; }
body[data-readonly] .notice-editor .notice-character-count { display: none; }
.faq-compact-root [hidden] { display: none !important; }
.faq-tabs button { display: flex; align-items: baseline; gap: 8px; }
.faq-tabs button > span { color: var(--muted); font: 11px var(--f-mono); }
.faq-row .notice-summary-head { margin-bottom: 6px; }
.faq-row .notice-summary-head b { overflow-wrap: anywhere; }
.faq-row-actions .switch em { min-width: 90px; }
.faq-order-actions { display: inline-flex; align-items: center; gap: 4px; }
.faq-order-actions .table-action { min-width: 28px; min-height: 30px; padding: 0 6px; font-size: 16px; }
.faq-order-actions .table-action:disabled { opacity: .35; cursor: default; }
.faq-layout.has-editor .faq-row-actions { display: grid; grid-template-columns: auto auto; gap: 10px; align-items: center; }
.faq-layout.has-editor .faq-row-actions .switch { grid-column: 1 / -1; justify-self: end; }
.faq-layout.has-editor .faq-order-actions { justify-self: start; }
.faq-layout.has-editor .faq-edit { justify-self: end; }
.faq-editor .notice-fields > label:not(:first-child) { margin-top: 8px; }
.faq-editor .faq-question { width: 100%; font-weight: 500; }
.faq-editor .faq-answer { resize: vertical; overflow-y: auto; }
.faq-preview > b { display: block; margin-bottom: 12px; }
.faq-compact-panel #faqShownCount { font: 12px var(--f-body); }
@media (max-width: 1200px) {
  .notice-layout.has-editor { grid-template-columns: minmax(0, 1fr); }
  .notice-editor { position: fixed; inset: 0 0 0 auto; width: min(100%, 520px); height: 100dvh; max-height: 100dvh; border-top: 0; border-bottom: 0; }
  .notice-editor form { height: 100%; }
  .notice-editor-body { flex: 1; }
  .has-editor .notice-row-actions { flex-direction: row; align-items: center; }
  .has-editor .notice-summary-head { display: flex; }
  .faq-layout.has-editor .faq-row-actions { display: flex; flex-direction: row; }
}
@media (max-width: 600px) {
  .mailing-tabs { gap: 24px; margin-bottom: 18px; }
  .mailing-tabs button { font-size: 13px; }
  .notice-layout > .mailing-panel > .panel-head { padding: 16px; gap: 14px; }
  .notice-list-heading h3 { font: 600 14px/1.4 var(--f-body); }
  #addNotification { min-height: 34px; font-size: 12px; }
  .notice-row, .has-editor .notice-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .notice-summary-head b { font-size: 13px; }
  .notice-row-actions, .has-editor .notice-row-actions { flex-direction: row; justify-content: space-between; }
  .notice-editor { width: 100%; border: 0; }
  .notice-editor-head, .notice-editor-body, .notice-editor-foot { padding: 16px; }
  .notice-editor textarea, .notice-editor input, .notice-editor select { font-size: 16px; }
  .mailing-root .broadcast-actions { align-items: stretch; }
  .mailing-root .broadcast-actions label { min-width: 0; width: 100%; }
  .mailing-root #broadcastStart { width: 100%; }
  .faq-tabs { gap: 20px; }
  .faq-row .notice-summary-head b { font-size: 14px; }
  .faq-row-actions, .faq-layout.has-editor .faq-row-actions { flex-wrap: wrap; gap: 12px; }
  .faq-order-actions { margin-left: auto; }
}

/* «Отправить тест» (16.11.2026): one person gets the draft before the broadcast */
.broadcast-test { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.broadcast-test label { display: grid; gap: 6px; min-width: 260px; }
.broadcast-test .table-action { min-height: 38px; }
@media (max-width: 600px) {
  .broadcast-test label { min-width: 0; width: 100%; }
  .broadcast-test .table-action { width: 100%; }
  .broadcast-test input { font-size: 16px; }
}

/* a photo or a video with a broadcast (13.11.2026): the file, Telegram's limits, the caption's count */
.broadcast-count { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: -4px; }
.broadcast-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.broadcast-count .notice-character-count { margin-left: auto; white-space: nowrap; }
.broadcast-count .notice-character-count.is-over { color: var(--danger); }
.broadcast-media { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.broadcast-attach { cursor: pointer; }
.broadcast-limits { font-size: 12px; }
.broadcast-file { font-size: 13px; overflow-wrap: anywhere; }
