/* ══════════════════════════════════════════════════════════════════════
   Колы Swarm: график кола в карточке и окно картинок колера (05.10.2026)
   Разметка — call-chart.js (CallChart, CallerShare), картинки — caller-card.js.
   Цвета — только переменные темы панели (обе темы). Сам график рисует
   journal-chart.js: его цвета берутся из --tj-* (класс .tj на обёртке).
   Приставка cz-pc (price chart): имя cz-chart уже занято графиками «Сводки».
   ══════════════════════════════════════════════════════════════════════ */
.cz-pc { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--app-bg); overflow: hidden; }
.cz-pc--empty { padding: 14px 16px; font-size: 12.5px; color: var(--text-3); }
.cz-pc__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cz-pc__src { display: flex; align-items: center; gap: 8px; flex: 1 1 160px; min-width: 0; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-pc__plot { position: relative; height: 360px; }
/* График рисуется таблицей (так устроена библиотека), а карточка кола живёт
   внутри таблицы «Все колы» — её правила (на телефоне строки-карточки, подписи
   ::before, отступы ячеек) ломали бы график. Возвращаем его таблице обычный вид;
   класс повторён, чтобы перебить правила таблицы раздела */
.rz-table .cz-pc.cz-pc tbody, .rz-table .cz-pc.cz-pc tr,
.rz-table .cz-pc.cz-pc tr:hover, .rz-table .cz-pc.cz-pc td { all: revert; }
/* саму таблицу не трогаем: «all: revert» снял бы и её cellspacing="0" */
.rz-table .cz-pc.cz-pc td::before { content: none; display: none; }
.cz-pc__cv { position: absolute; inset: 0; }
.cz-pc__note { padding: 6px 12px 8px; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--border); }
.cz-pc__card, .cz-share-btn {
  height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s;
}
.cz-share-btn { flex: none; height: 33px; border-radius: 10px; color: var(--text-2); }
.cz-share-btn__s { display: none; }
@media (max-width: 480px) { .cz-share-btn__l { display: none; } .cz-share-btn__s { display: inline; } }
@media (hover: hover) { .cz-pc__card:hover, .cz-share-btn:hover { border-color: var(--text-3); color: var(--text); } }
@media (max-width: 640px) { .cz-pc__plot { height: 300px; } }

/* окно картинки */
.ccx { position: fixed; inset: 0; z-index: 90; }
.ccx__scrim { position: absolute; inset: 0; background: var(--scrim, var(--crm-scrim)); animation: ccx-fade .2s ease both; }
.ccx__win {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1120px, calc(100vw - 48px)); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: ccx-in .22s cubic-bezier(.32, .72, 0, 1) both;
}
.ccx__win.is-mob { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: 92dvh; border-radius: 16px 16px 0 0; animation: ccx-up .26s cubic-bezier(.32, .72, 0, 1) both; }
.ccx__head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.ccx__title { flex: 1; font-weight: 600; font-size: 15px; color: var(--text); }
.ccx__x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 15px; cursor: pointer; }
.ccx__body { display: flex; gap: 20px; padding: 18px 20px 20px; overflow: auto; }
.ccx__win.is-mob .ccx__body { flex-direction: column; }
.ccx__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ccx__cv { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--border); background: var(--app-bg); }
.ccx__acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ccx__btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ccx__btn--main { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.ccx__msg { font-size: 12.5px; color: var(--text-2); }
.ccx__opts { flex: 0 0 240px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ccx__win.is-mob .ccx__opts { flex: none; }
.ccx__opt { display: flex; flex-direction: column; gap: 8px; }
.ccx__l { font-size: 12px; color: var(--text-2); }
.ccx__sw { display: flex; gap: 10px; }
.ccx__dot { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.ccx__dot.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.ccx__chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.ccx__in { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--app-bg); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.ccx__in:focus { border-color: var(--accent); }
.ccx button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes ccx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccx-in { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes ccx-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ccx__win, .ccx__scrim { animation: none; } }
