/* Copyright 2026 CLEALINK TECHNOLOGY CO.,LTD. All rights reserved. */

/* The materials of a meeting: the list, and the viewer that covers the stage. */

.mat-box { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mat-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.mat-head .grow { flex: 1; }
.mat-status { font-size: var(--fs-12); color: var(--muted); }
.mat-add { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.mat-add[hidden], .mat-list[hidden], .mat-hint[hidden] { display: none; }
.mat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mat { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); min-width: 0; }
.mat:last-child { border-bottom: 0; }
.mat-open {
  appearance: none; border: 0; background: none; color: var(--text); text-align: left; flex: 1; min-width: 0; padding: 8px 4px;
  display: flex; align-items: center; gap: 10px; border-radius: var(--r-sm); cursor: pointer;
}
:root[data-hover="1"] .mat-open:hover { background: var(--raised); }
.mat-open > svg.icon { color: var(--muted); flex: none; }
.mat-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.mat-name { font-size: var(--fs-13); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-sub { font-size: var(--fs-11); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-mark { display: inline-flex; color: var(--muted); flex: none; padding: 0 2px; }
.mat-mark-shield { color: var(--amber); }
.mat[data-preparing="1"] .mat-name { color: var(--muted); }
.mat[data-preparing="1"] .mat-sub { color: var(--amber); white-space: normal; }
.mat-open:disabled { cursor: default; }
.mat-prepare { flex: none; white-space: nowrap; }
.mat-hint { font-size: var(--fs-11); color: var(--muted); line-height: 1.6; margin: 0; }
:root[data-density="large"] .mat-open { padding: 12px 4px; }

/* In the side panel of the meeting and in the host console. */
.side-panel.docs { overflow: hidden; }
.docs-scroll { padding: 12px 14px; overflow: auto; min-height: 0; flex: 1; }
.host-docs .docs-scroll { padding: 0; }
.host-docs { max-height: 260px; }

/* The viewer. */
.doc-view {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border);
}
.doc-view[hidden] { display: none; }
.doc-view:fullscreen { border-radius: 0; border: 0; }
.doc-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface); flex: none; flex-wrap: wrap; }
.doc-bar .grow { flex: 1; min-width: 4px; }
.doc-pick { appearance: auto; max-width: min(260px, 40vw); height: 32px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--raised); color: var(--text); font-size: var(--fs-12); padding: 0 6px; }
.doc-flags { font-size: var(--fs-11); color: var(--muted); white-space: nowrap; }
.doc-group { display: inline-flex; align-items: center; gap: 2px; }
.doc-group[hidden] { display: none; }
.doc-count { font-size: var(--fs-12); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.doc-btn {
  appearance: none; border: 1px solid var(--border); background: var(--raised); color: var(--text); border-radius: var(--r-md);
  height: 32px; min-width: 32px; padding: 0 6px; font-size: var(--fs-12); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.doc-btn[hidden] { display: none; }
.doc-btn-text { padding: 0 10px; }
.doc-btn:disabled { opacity: .5; cursor: default; }
.doc-btn[aria-pressed="true"] { background: var(--on-bg); border-color: var(--on-border); color: var(--on-text); }
:root[data-hover="1"] .doc-btn:hover:not(:disabled) { border-color: var(--faint); }
:root[data-density="large"] .doc-btn { height: 40px; min-width: 40px; }
.doc-stage { flex: 1; min-height: 0; overflow: auto; position: relative; display: flex; padding: 12px; outline: none; background: var(--bg); }
.doc-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.doc-page { margin: auto; position: relative; }
.doc-page[hidden] { display: none; }
.doc-canvas { display: block; background: #fff; box-shadow: var(--shadow-1); border-radius: 2px; }
.doc-text { display: none; background: #fff; color: #17202B; padding: 28px 32px; width: min(820px, 100%); min-height: 240px; box-shadow: var(--shadow-1); border-radius: 2px; font-size: var(--fs-14); line-height: 1.7; overflow-wrap: anywhere; box-sizing: border-box; }
.doc-text pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: var(--fs-13); margin: 0; }
.doc-text a { color: #2C67B2; }
.doc-text h1, .doc-text h2, .doc-text h3, .doc-text h4, .doc-text h5, .doc-text h6 { margin: 1.2em 0 .5em; line-height: 1.35; }
.doc-text h1 { font-size: 22px; } .doc-text h2 { font-size: 18px; } .doc-text h3 { font-size: 16px; }
.doc-text > :first-child { margin-top: 0; }
.doc-text hr { border: 0; border-top: 1px solid #D9DFE7; margin: 1.2em 0; }
.doc-text code { font-family: var(--font-mono); background: #F0F3F7; border-radius: 3px; padding: 1px 4px; }
.doc-text blockquote { margin: 1em 0; padding-left: 12px; border-left: 3px solid #D9DFE7; color: #3A4656; }
.doc-view[data-kind="markdown"] .doc-text, .doc-view[data-kind="text"] .doc-text { display: block; }
.doc-view[data-kind="markdown"] .doc-canvas, .doc-view[data-kind="text"] .doc-canvas { display: none; }
.doc-view[data-kind="markdown"] .doc-page, .doc-view[data-kind="text"] .doc-page { width: min(820px, 100%); margin: 0 auto; }
.doc-view[data-kind="markdown"] .doc-zoom, .doc-view[data-kind="text"] .doc-zoom { display: none; }
.doc-wm { position: absolute; inset: 0; overflow: hidden; pointer-events: none; display: none; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 70px 40px; padding: 30px; }
.doc-wm span { transform: rotate(-24deg); white-space: nowrap; font-size: 15px; font-weight: 600; color: rgba(23, 32, 43, .16); }
.doc-view[data-protect="1"][data-kind="markdown"] .doc-wm, .doc-view[data-protect="1"][data-kind="text"] .doc-wm { display: flex; }
.doc-view[data-protect="1"] .doc-stage { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.doc-status { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 16px; font-size: var(--fs-13); color: var(--muted); max-width: 80%; text-align: center; }
.doc-status[hidden] { display: none; }
.doc-status[data-tone="error"] { color: var(--red-text); border-color: var(--red); }
.doc-status[data-tone="warn"] { color: var(--amber-text); border-color: var(--amber); }
.doc-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--bg); color: var(--muted); font-size: var(--fs-13); text-align: center; padding: 20px; cursor: pointer; }
.doc-cover[hidden] { display: none; }
.doc-cover p { margin: 0; max-width: 360px; line-height: 1.6; }
.doc-note { margin: 0; padding: 6px 12px; font-size: var(--fs-11); color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); flex: none; }
.doc-note[hidden] { display: none; }

/* Narrow screens: the tools wrap, the less needed ones go. */
@media (max-width: 640px) {
  .doc-view { border-radius: 0; border-width: 0; }
  .doc-flags { display: none; }
  .doc-pick { max-width: 46vw; }
  .doc-stage { padding: 6px; }
  .doc-text { padding: 18px 16px; }
}
@media (max-height: 420px) {
  .doc-note { display: none; }
  .doc-bar { padding: 3px 6px; }
}

/* A protected material is not printed. */
@media print {
  .doc-view[data-protect="1"] .doc-page { display: none; }
}

/* The materials of a meeting in a dialog (stored data, booking). */
.mat-dialog.dialog-wide { width: min(1080px, calc(100vw - 24px)); }
.mat-dialog .dialog-body { display: flex; min-height: 0; }
.mat-dialog-body { display: flex; gap: 14px; min-height: min(62vh, 560px); flex: 1; min-width: 0; }
.mat-dialog-list { width: 300px; flex: none; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.mat-dialog-status { font-size: var(--fs-12); color: var(--muted); }
.mat-dialog .doc-view { position: relative; inset: auto; flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .mat-dialog-body { flex-direction: column; }
  .mat-dialog-list { width: auto; max-height: 30vh; }
  .mat-dialog .doc-view { min-height: 50vh; }
}

/* Outside the signed-in pages the small button has no size of its own. */
.mat-add.btn { height: 28px; padding: 0 10px; font-size: var(--fs-12); }

/* Narrow phones: the texts of the tools go, their marks stay. */
@media (max-width: 480px) {
  .doc-btn[data-doc="download"] span { display: none; }
  .doc-btn[data-doc="fit"] { padding: 0 8px; }
  .doc-count { min-width: 44px; }
}
