/* styles of the moderation screens (loaded on every page; every class starts with md-) */
.md-cab .act{gap:8px}
.md-pendpill{text-decoration:none!important}
.md-card{margin-bottom:14px;min-width:0}
.md-lead{margin:-6px 0 14px;max-width:760px}
.md-limit{align-items:flex-start;margin-bottom:14px}
.md-limit>span{min-width:0;overflow-wrap:anywhere}
.md-form{margin:0;min-width:0}
.md-form label.f,.md-filters label.f,.md-pack label.f{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:600;color:var(--mut);margin:0;min-width:0}
.md-form label.f small{font-weight:500;line-height:1.4;text-transform:none;letter-spacing:0;font-size:12px}
.md-form label.f input,.md-form label.f select,.md-form label.f textarea,.md-filters input,.md-filters select{width:100%;max-width:100%;min-width:0}
.md-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}
.md-sticky{position:sticky;bottom:0;padding:12px 0;background:linear-gradient(to top,var(--bg) 70%,transparent);z-index:2}
.md-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;margin:14px 0}
.md-cell{display:flex;align-items:flex-end}
.md-fs{border:0;border-top:1px solid var(--line);margin:16px 0 0;padding:14px 0 0;min-width:0}
.md-fs legend{font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--mut);padding:0 8px 0 0}
.md-chks{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.md-chks .chk{height:auto;min-height:30px;padding:5px 11px}
.md-chks .chk span{white-space:normal}

/* switch made of a real checkbox (works without JS, posts with the form) */
.md-sw{display:flex;align-items:flex-start;gap:12px;cursor:pointer;margin:0;min-width:0}
.md-sw input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.md-track{position:relative;flex:none;width:44px;height:26px;border-radius:20px;border:1px solid var(--line2);background:var(--line);transition:background .15s,border-color .15s;margin-top:1px}
.md-track span{position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .15s}
.md-sw input:checked+.md-track{background:var(--em);border-color:var(--em)}
.md-sw input:checked+.md-track span{transform:translateX(18px)}
.md-sw input:focus-visible+.md-track{outline:2px solid var(--acc);outline-offset:2px}
.md-swt{display:flex;flex-direction:column;gap:2px;min-width:0}
.md-swt b{font-size:14px;font-weight:650;color:var(--txt)}
.md-swt small{font-size:12.5px;color:var(--mut);line-height:1.4}

/* rule packs */
.md-packs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.md-pack{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:10px;min-width:0;background:var(--card);transition:border-color .15s,background .15s}
.md-pack:has(.md-sw input:checked){border-color:var(--acc-line);background:var(--acc-bg)}
.md-pack-h{display:grid;grid-template-columns:auto minmax(0,1fr) 172px;gap:12px;align-items:start}
.md-pic{--c:var(--violet)}
.md-pack:not(:has(.md-sw input:checked)) .md-act,.md-pack:not(:has(.md-sw input:checked)) .md-extra{opacity:.55}
.md-act select{height:34px}
.md-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:14px}
.md-legend>span{display:inline-flex;align-items:center;gap:6px}

/* company words */
.md-add{margin-bottom:12px}
.md-add .md-act{min-width:150px}
.md-words{margin-top:4px}
.md-words td.act{text-align:right}
.md-pat{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:var(--hover-btn,var(--hover));border:1px solid var(--line);border-radius:6px;padding:2px 7px;overflow-wrap:anywhere;white-space:pre-wrap}

/* tester */
.md-test textarea{width:100%}
.md-out:empty{display:none}
.md-out{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.md-res{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-weight:650;font-size:14.5px}
.md-res-block{color:var(--bad)}.md-res-hold{color:var(--warn)}.md-res-log{color:var(--violet)}.md-res-allow{color:var(--ok)}
.md-hits{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.md-hits li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}

/* option cards (radios) */
.md-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.md-opts3{grid-template-columns:repeat(3,minmax(0,1fr))}
.md-opt{display:block;margin:0;cursor:pointer;min-width:0}
.md-opt input{position:absolute;opacity:0;width:1px;height:1px}
.md-opt-b{display:flex;flex-direction:column;gap:4px;height:100%;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card);transition:border-color .15s,background .15s}
.md-opt-b svg.i{width:20px;height:20px;color:var(--mut)}
.md-opt-b b{font-size:14px}
.md-opt-b small{color:var(--mut);font-size:12.5px;line-height:1.4}
.md-opt input:checked+.md-opt-b{border-color:var(--acc);background:var(--acc-bg);box-shadow:0 0 0 1px var(--acc) inset}
.md-opt input:checked+.md-opt-b svg.i{color:var(--acc)}
.md-opt input:focus-visible+.md-opt-b{outline:2px solid var(--acc);outline-offset:2px}

/* image categories */
.md-cats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.md-cat{display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:0;font-size:13px;font-weight:600;min-width:0}
.md-cat span{overflow-wrap:anywhere}
.md-cat select{width:100%;height:34px}
.md-cat:has(option[value=block]:checked){border-color:color-mix(in srgb,var(--bad) 40%,transparent)}
.md-cat:has(option[value=hold]:checked){border-color:color-mix(in srgb,var(--warn) 45%,transparent)}

/* approvals */
.md-chips{margin-bottom:14px}
.md-helds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.md-held{display:flex;flex-direction:column;gap:10px;min-width:0}
.md-held-h{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
.md-held-t{display:flex;flex-direction:column;min-width:0;flex:1}
.md-held-t b,.md-held-t span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-held-t span{font-size:12.5px}
.md-held-h time{font-size:12.5px;white-space:nowrap}
.md-rules{display:flex;flex-wrap:wrap;gap:6px}
.md-rules .pill{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-held-body{display:flex;flex-direction:column;gap:8px;min-width:0}
.md-quote{margin:0;padding:10px 12px;border-left:3px solid var(--acc-line);background:var(--acc-bg);border-radius:0 10px 10px 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
.md-media{display:block;max-width:260px;border-radius:10px;overflow:hidden;border:1px solid var(--line)}
.md-media img{display:block;width:100%;height:auto;max-height:240px;object-fit:cover}
.md-file{align-self:flex-start;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.md-trans{margin:0;font-size:13px;color:var(--mut);overflow-wrap:anywhere}
.md-trans b{color:var(--txt)}
.md-held-f{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:10px;border-top:1px solid var(--line)}
.md-held-f form{margin:0}
.md-rej{display:flex;gap:8px;flex:1 1 100%;order:3;min-width:0}
.md-held-f>form:not(.md-rej){margin-left:auto}
.md-rej input{flex:1;min-width:0;height:30px;font-size:13px}

/* attempts */
.md-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) minmax(0,1.6fr) auto;gap:12px;align-items:end;margin:0 0 12px}
.md-filters input,.md-filters select{height:36px}
.md-filters label.f input,.md-filters label.f .osel{margin:0}.md-filters .osel{--osel-h:36px}
.md-fbtn{display:flex;gap:8px}
.md-fbtn button,.md-fbtn .btn{height:36px}
.md-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;flex-wrap:wrap;font-size:13px}
.md-att td{vertical-align:top}
.md-att td>.pill{white-space:nowrap}
.md-nowrap{white-space:nowrap}
.md-hs{display:block;margin-top:4px;font-size:11.5px}
.md-ex{max-width:340px;min-width:0}
.md-exw{display:block;min-width:0}
.md-src{display:block;font-size:11.5px;margin-bottom:2px}
.md-clip{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:13px}
.md-ch{display:block;font-size:11.5px}
.md-att .md-rules{max-width:260px}

/* reply box notice in the conversation */
.md-reply{margin:0 12px 8px;align-items:flex-start}
.md-reply>span{min-width:0;overflow-wrap:anywhere}

/* admin.css hides columns 3 and 5 of every .tbl below 820px (made for the contacts list): ours carry the result / content */
@media (max-width:820px){table.tbl.md-att th:nth-child(3),table.tbl.md-att td:nth-child(3),table.tbl.md-att th:nth-child(5),table.tbl.md-att td:nth-child(5),table.tbl.md-words th:nth-child(3),table.tbl.md-words td:nth-child(3){display:table-cell}}
@media (max-width:1250px){.md-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.md-filters label.f:has(input[name=q]){grid-column:span 2}}
@media (max-width:1100px){.md-helds{grid-template-columns:minmax(0,1fr)}.md-cats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){.md-packs{grid-template-columns:minmax(0,1fr)}.md-opts3{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){
  .md-grid2,.md-opts,.md-cats{grid-template-columns:minmax(0,1fr)}
  .md-pack-h{grid-template-columns:auto minmax(0,1fr)}
  .md-pack-h .md-act{grid-column:1 / -1}
  .md-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .md-filters label.f:has(input[name=q]),.md-fbtn{grid-column:1 / -1}
  .md-fbtn button{flex:1;justify-content:center}
  .md-ex,.md-att .md-rules{max-width:none}
  .md-att td .md-rules{justify-content:flex-end}
  table.stk.md-att td:nth-child(3),table.stk.md-att td:nth-child(5),table.stk.md-words td:nth-child(3){display:flex}
  .md-rules .pill{white-space:normal;text-align:left}
  .md-exw{display:flex;flex-direction:column;align-items:flex-end;min-width:0}
  .md-clip{text-align:right}
  .md-held-h time{width:100%}
  .md-held-f>a,.md-held-f>form:last-child{flex:1}
  .md-held-f>form:last-child button,.md-held-f>a{width:100%;justify-content:center}
  .md-cab .act{margin-left:0;width:100%}
}
