/* ms4 feature "compare": several sites side by side (a dialog: chips, one chart, one table). */

/* five line colours, each stepped for its surface (light / dark); a site keeps its colour while it is in view */
.dcc-dlg{--dcc-1:#2a78d6;--dcc-2:#eb6834;--dcc-3:#1baf7a;--dcc-4:#eda100;--dcc-5:#e87ba4}
:root[data-theme="dark"] .dcc-dlg{--dcc-1:#3987e5;--dcc-2:#d95926;--dcc-3:#199e70;--dcc-4:#c98500;--dcc-5:#d55181}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .dcc-dlg{--dcc-1:#3987e5;--dcc-2:#d95926;--dcc-3:#199e70;--dcc-4:#c98500;--dcc-5:#d55181}
}

dialog.sheet.dcc-dlg{width:min(980px,calc(100vw - 24px));max-height:min(94vh,1040px)}
.dcc-dlg .sheet-head .btn svg{width:14px;height:14px}
.dcc-dlg .sheet-body{font-size:var(--fs-s)}

.dcc-add{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2);margin-bottom:var(--s3)}
.dcc-input{flex:0 1 300px;min-width:180px}
.dcc-add .btn svg{width:14px;height:14px}
.dcc-msg{color:var(--text-2);font-size:var(--fs-xs);min-height:1.3em;flex:1 1 200px}

.dcc-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:var(--s3)}
.dcc-chip{display:inline-flex;align-items:center;gap:6px;min-height:30px;max-width:100%;padding:0 2px 0 10px;border:1px solid var(--line-strong);border-radius:var(--r-pill);background:var(--bg);color:var(--text)}
.dcc-chip-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dcc-chip-note{color:var(--text-3);font-size:var(--fs-xs);white-space:nowrap}
.dcc-x{width:26px;height:26px;flex:none;color:var(--text-3)}
.dcc-x svg{width:14px;height:14px}
.dcc-x:hover{color:var(--text)}
.dcc-sw{flex:none}

.dcc-chart-head{display:flex;align-items:center;gap:var(--s2);min-height:28px}
.dcc-chart-head .dc-k{padding:0;align-items:center}
.dcc-chartbox{min-height:120px}
.dcc-chart svg{overflow:visible}
.dcc-line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.dcc-grid{stroke:var(--line);stroke-width:1}
.dcc-base{stroke:var(--line-strong);stroke-width:1}
.dcc-end{stroke:var(--bg);stroke-width:2}
.dcc-mark{stroke-width:1.5}
.dcc-mark.up{fill:var(--boost)}
.dcc-mark.down{fill:var(--block)}
.dcc-dot{fill:var(--bg);stroke-width:2}
.dcc-tip{gap:3px}
.dcc-tip-row{display:flex;align-items:center;gap:6px}
.dcc-tip-row .dcc-sw{background:var(--bg);border-radius:3px;padding:0 1px;box-sizing:content-box}
.dcc-tip-name{opacity:.9;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.dcc-tip-row strong{margin-left:auto;padding-left:10px}
.dcc-empty{margin:var(--s4) 0;color:var(--text-2)}
.dcc-dlg .dnt-range[hidden]{display:none}

.dcc-tablewrap{margin-top:var(--s3);overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-m)}
.dcc-tablewrap:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.dcc-table{border-collapse:collapse;width:100%;font-size:var(--fs-s)}
.dcc-table th,.dcc-table td{padding:8px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.dcc-table tbody tr:last-child th,.dcc-table tbody tr:last-child td{border-bottom:0}
.dcc-table thead th,.dcc-table thead td{background:var(--surface);border-bottom:1px solid var(--line-strong)}
.dcc-table thead th{min-width:150px;font-weight:600}
.dcc-table tbody th{position:sticky;left:0;z-index:1;width:150px;min-width:118px;background:var(--bg);color:var(--text-3);font-size:var(--fs-xs);font-weight:600}
.dcc-table thead td{position:sticky;left:0;z-index:1}
.dcc-table td{min-width:150px;color:var(--text);font-variant-numeric:tabular-nums}
.dcc-col{display:flex;align-items:center;gap:6px}
.dcc-col-name{overflow-wrap:anywhere}
.dcc-col-acts{display:flex;flex-wrap:wrap;gap:2px 10px;margin-top:4px;font-size:var(--fs-xs);font-weight:400;color:var(--link)}
.dcc-none{color:var(--text-3)}
.dcc-for{color:var(--text-3);font-size:var(--fs-xs)}
.dcc-risk{color:var(--bury);font-weight:600}

@media (max-width:640px){
  dialog.sheet.dcc-dlg{width:100vw;max-width:100vw;max-height:94vh;margin:auto 0 0;border-radius:var(--r-l) var(--r-l) 0 0}
  .dcc-input{flex:1 1 160px}
  .dcc-table th,.dcc-table td{padding:7px 10px}
  .dcc-table tbody th{width:104px;min-width:104px}
  .dcc-table td,.dcc-table thead th{min-width:132px}
}
#dcc-title:focus{outline:none}
.dcc-msg:empty{display:none}
.dcc-dlg .sheet-head a.btn:hover{text-decoration:none}
