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

.dialog {
  border: 1px solid var(--border-strong); border-radius: var(--r-2xl); background: var(--surface-2); color: var(--text);
  padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--shadow-2);
}
.dialog[open] { display: flex; flex-direction: column; animation: dialog-in var(--t-med) var(--ease); }
.dialog-wide { width: min(640px, calc(100vw - 24px)); }
.dialog::backdrop { background: var(--scrim); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog-head { display: flex; align-items: center; gap: 12px; padding: 16px 12px 8px 20px; }
.dialog-title { flex: 1; font-size: var(--fs-15); font-weight: 700; }
.dialog-body { padding: 4px 20px 16px; overflow: auto; font-size: var(--fs-13); line-height: 1.6; }
.dialog-text { color: var(--muted); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dialog-error { border-color: var(--red); }
.dialog-error .dialog-head { color: var(--red-text); }
.dialog-warn { border-color: var(--amber); }

.rows { display: flex; flex-direction: column; }
.rows .row { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-12); padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.rows .row:last-child { border-bottom: 0; }
.rows .row b { font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

.keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; font-size: var(--fs-12); }
.keys-grid > div { display: flex; align-items: center; gap: 6px; }
.keys-grid .keys { display: inline-flex; gap: 4px; min-width: 76px; }
.keys-note { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-12); color: var(--muted); }
.keys-note > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) { .keys-grid { grid-template-columns: 1fr; } }

/* The stored chat of a meeting. */
.chatlog-dialog .dialog-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chatlog-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; font-size: var(--fs-12); color: var(--muted); }
.chatlog-tools .grow { flex: 1; }
.chatlog-tools .btn { display: inline-flex; align-items: center; gap: 6px; }
.chatlog { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 120px; max-height: min(60vh, 520px); padding: 4px 2px; }
.chatlog-note { color: var(--muted); font-size: var(--fs-12); }
.chatlog-msg { overflow-wrap: anywhere; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.chatlog-msg:last-child { border-bottom: 0; }
.chatlog-msg header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chatlog-msg header b { font-weight: 600; }
.chatlog-msg header time, .chatlog-to { font-size: var(--fs-11); color: var(--muted); }
.chatlog-msg header .grow { flex: 1; }
.chatlog-body p { margin: 0; }
.chatlog-body p + p, .chatlog-body ul, .chatlog-body ol, .chatlog-body pre, .chatlog-body blockquote { margin: 4px 0 0; }
.chatlog-body ul, .chatlog-body ol { padding-left: 18px; }
.chatlog-body pre { overflow-x: auto; }
.chatlog-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chatlog-files .btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.chatlog-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chatlog-file-size { color: var(--muted); flex: none; }
.chatlog-card { display: flex; flex-direction: column; margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--border-strong); color: inherit; text-decoration: none; font-size: var(--fs-12); }
.chatlog-card span { color: var(--muted); font-size: var(--fs-11); }
