/* ============================================================================
   Тема rolls-kran.ru для бандла конфигураторов.
   Подключается ПОСЛЕДНЕЙ (после css/*.css и assets/launcher.css) и переопределяет
   палитру Soft UI: вместо серого soft-ui + оранжевого #f58220 —
   белый фон, графит #242424/#292b2f, текст #535455, границы #e1e5e8/#deded8,
   жёлтый акцент #f8cc24 с тёмным текстом, hover #f0c012.
   Меняются только цвета, тени и радиусы; сетка, размеры и 3D-сцена не затрагиваются.
   Палитра 3D-моделей и её легенда (сталь/балки/поддоны) сохранены как в источнике.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Токены */
/* Те же имена переменных, что в css/soft-ui-theme.css: переопределение работает
   и для !important-правил (они читают var()), и для компонентов без !important. */
:root,
html[data-theme],
html[data-theme="dark"] {
  --soft-page: #ffffff;
  --soft-ink: #242424;
  --soft-muted: #535455;
  --soft-body: #535455;
  --soft-line: #e1e5e8;
  --soft-field: #ffffff;
  --soft-flat: #ffffff;
  --soft-border-top: transparent;
  --soft-border-bottom: #e1e5e8;
  --soft-surface: #ffffff;
  --soft-raised: 0 1px 2px rgba(36, 36, 36, .05);
  --soft-inset: inset 0 0 0 1px #e1e5e8;
  --soft-control-surface: #ffffff;
  --soft-control-shadow: 0 1px 2px rgba(36, 36, 36, .05);
  --soft-control-hover: 0 2px 10px rgba(36, 36, 36, .09);
  --soft-control-pressed: inset 0 0 0 1px #e1e5e8;
  --soft-tile-shadow: 0 1px 2px rgba(36, 36, 36, .05);
  --soft-selected-surface: #ffffff;
  --soft-accent-ink: #242424;
  --soft-accent-surface: #f8cc24;
  --soft-accent-shadow: 0 2px 8px rgba(248, 204, 36, .35);
  --soft-accent-hover: 0 4px 14px rgba(240, 192, 18, .45);
  --soft-accent-pressed: inset 0 2px 4px rgba(138, 109, 0, .18);

  --bg: #ffffff;
  --bg-alt: #f5f6f7;
  --card: #ffffff;
  --surface: #ffffff;
  --text: #242424;
  --text-body: #535455;
  --text-muted: #535455;
  --text-faint: #6b6f73;
  --border: #e1e5e8;
  --navy: #242424;
  --navy-light: #535455;
  --graphite: #242424;

  --amber: #f8cc24;
  --amber-hover: #f0c012;
  --amber-light: #8a6d00;
  --amber-deep: #242424;
  --amber-bg: #fff8dd;
  --amber-border: #e5b91a;
  --amber-gradient: #f8cc24;

  --radius-card: 16px;
  --radius-btn: 10px;
}

/* --------------------------------------------------- 2. Оболочка диалогов */
html body .rk-cfg-dialog.rk-ui {
  background: #ffffff !important;
  color: #242424 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  border: 0 !important;
  box-shadow: 0 24px 64px rgba(36, 36, 36, .18) !important;
}
html body .rk-cfg-dialog::backdrop {
  background: rgba(36, 36, 36, .38) !important;
  backdrop-filter: blur(2px);
}
html body .rk-cfg-dialog--page::backdrop {
  background: #f5f6f7 !important;
  backdrop-filter: none;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-top {
  background: #ffffff !important;
  border-bottom: 1px solid #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-top h2 {
  color: #242424 !important;
  font-weight: 600 !important;
  letter-spacing: -.02em !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-top p {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-close {
  background: #ffffff !important;
  color: #242424 !important;
  border: 1px solid #e1e5e8 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(36, 36, 36, .05) !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-close:hover {
  background: #f5f6f7 !important;
  border-color: #cfd5da !important;
}

/* ------------------------------------------------------ 3. Поля параметров */
html body .rk-cfg-dialog.rk-ui .rk-cfg-body {
  background: #ffffff !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-params fieldset {
  background: #ffffff !important;
  border: 1px solid #e1e5e8 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(36, 36, 36, .04) !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-params legend {
  color: #242424 !important;
  font-weight: 600 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-f {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-f input,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f select,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f textarea {
  background: #ffffff !important;
  color: #242424 !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-f input:hover,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f select:hover,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f textarea:hover {
  box-shadow: inset 0 0 0 1px #cfd5da !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-f input:focus-visible,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f select:focus-visible,
html body .rk-cfg-dialog.rk-ui .rk-cfg-f textarea:focus-visible {
  outline: 2px solid #6b5b16 !important;
  outline-offset: 2px !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-check {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: #b08d00 !important;
}
html body .rk-cfg-dialog.rk-ui :is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #6b5b16 !important;
  outline-offset: 3px !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-hint {
  color: #535455 !important;
}

/* -------------------------------------------------------------- 4. Кнопки */
/* Вторичные: белый фон + серая рамка сайта. */
html body .rk-cfg-dialog.rk-ui .rk-button {
  background: #ffffff !important;
  color: #242424 !important;
  border: 1px solid #e1e5e8 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(36, 36, 36, .05) !important;
  font-weight: 500 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-button:hover {
  background: #f5f6f7 !important;
  border-color: #cfd5da !important;
  box-shadow: 0 2px 8px rgba(36, 36, 36, .08) !important;
}
html body .rk-cfg-dialog.rk-ui .rk-button:active {
  background: #eef0f1 !important;
  box-shadow: inset 0 1px 2px rgba(36, 36, 36, .08) !important;
}
html body .rk-cfg-dialog.rk-ui .rk-button:disabled {
  opacity: .45 !important;
}
/* Основные (Далее, Открыть, play): жёлтый акцент сайта с тёмным текстом. */
html body .rk-cfg-dialog.rk-ui .rk-button--primary,
html body .rk-cfg-dialog.rk-ui [data-config-group-nav="next"],
html body .rk-cfg-dialog.rk-ui .rk-motion-controls .rk-button[data-rk-motion="play"] {
  background: #f8cc24 !important;
  color: #242424 !important;
  border: 1px solid #e5b91a !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-button--primary:hover,
html body .rk-cfg-dialog.rk-ui [data-config-group-nav="next"]:hover,
html body .rk-cfg-dialog.rk-ui .rk-motion-controls .rk-button[data-rk-motion="play"]:hover {
  background: #f0c012 !important;
  color: #242424 !important;
  border-color: #e5b91a !important;
  box-shadow: 0 6px 16px rgba(240, 192, 18, .28) !important;
}
html body .rk-cfg-dialog.rk-ui .rk-button--primary:active,
html body .rk-cfg-dialog.rk-ui [data-config-group-nav="next"]:active,
html body .rk-cfg-dialog.rk-ui .rk-motion-controls .rk-button[data-rk-motion="play"]:active {
  background: #e8b90f !important;
  color: #242424 !important;
  box-shadow: inset 0 1px 2px rgba(138, 109, 0, .25) !important;
}

/* Кнопки-«чипы», режимы и вкладки: белые, активное состояние — жёлтая линия/акцент. */
html body .rk-cfg-dialog.rk-ui .rk-cfg-chip,
html body .rk-cfg-dialog.rk-ui .rk-cfg-tab,
html body .rk-cfg-dialog.rk-ui .rk-cfg-view {
  background: #ffffff !important;
  color: #535455 !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-chip:hover,
html body .rk-cfg-dialog.rk-ui .rk-cfg-tab:hover,
html body .rk-cfg-dialog.rk-ui .rk-cfg-view:hover {
  color: #242424 !important;
  background: #f5f6f7 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-chip[aria-pressed="true"],
html body .rk-cfg-dialog.rk-ui .rk-cfg-chip.is-active,
html body .rk-cfg-dialog.rk-ui .rk-cfg-tab[aria-selected="true"],
html body .rk-cfg-dialog.rk-ui .rk-cfg-view[aria-pressed="true"] {
  background: #ffffff !important;
  color: #242424 !important;
  font-weight: 600 !important;
  box-shadow: inset 0 -3px 0 #f8cc24, inset 0 0 0 1px #e1e5e8 !important;
}
/* Шаги параметров и переключатель «Параметры / Компоновка». */
html body .rk-cfg-dialog.rk-ui .rk-config-group-tabs button,
html body .rk-cfg-dialog.rk-ui .rk-config-modebar button {
  background: #ffffff !important;
  color: #535455 !important;
  border: 1px solid #e1e5e8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
html body .rk-cfg-dialog.rk-ui .rk-config-group-tabs button:hover,
html body .rk-cfg-dialog.rk-ui .rk-config-modebar button:hover {
  background: #f5f6f7 !important;
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-config-group-tabs button[aria-selected="true"],
html body .rk-cfg-dialog.rk-ui .rk-config-modebar button[aria-pressed="true"] {
  background: #ffffff !important;
  color: #242424 !important;
  border-color: #e1e5e8 !important;
  box-shadow: inset 3px 0 0 #f8cc24, inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-config-modebar button[aria-pressed="true"] {
  box-shadow: inset 0 -3px 0 #f8cc24, inset 0 0 0 1px #e1e5e8 !important;
}

/* ------------------------------------------------------- 5. KPI и табло */
html body .rk-cfg-dialog.rk-ui .rk-cfg-kpi {
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tile {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tile b {
  color: #242424 !important;
  font-weight: 600 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tile span {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tile.is-accent {
  box-shadow: inset 0 -3px 0 #f8cc24, inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tile.is-accent b {
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-equipment-scene-title b {
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-equipment-scene-title span {
  color: #535455 !important;
}

/* ------------------------------------------------ 6. 3D-хост, план, легенда */
/* Палитра самой 3D-модели и её легенды не меняется (по ТЗ). Меняется только
   подложка вьюпорта: светлый графит вместо серого soft-ui. */
html body .rk-cfg-dialog.rk-ui .rk-r3d-host {
  background: #f5f6f7 !important;
  border-radius: 16px !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-svg {
  background: #f5f6f7 !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-legend {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-live {
  color: #535455 !important;
}

/* -------------------------------------------------- 7. Таблицы и заметки */
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-table, .rk-spec-table) {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-table, .rk-spec-table) th {
  color: #535455 !important;
  font-weight: 500 !important;
  border-bottom-color: #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-table, .rk-spec-table) td {
  color: #535455 !important;
  border-bottom-color: #eceff1 !important;
}
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-table, .rk-spec-table) td:first-child,
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-table, .rk-spec-table) th[scope="row"] {
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note {
  background: #f7f8f9 !important;
  color: #535455 !important;
  box-shadow: none !important;
  border: 1px solid #e1e5e8 !important;
  border-radius: 12px !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note b {
  color: #242424 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-warn {
  background: #fff8dd !important;
  border-color: #ecd98a !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-warn b {
  color: #6b5b16 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-bad {
  background: #fbe9e7 !important;
  border-color: #e8b4ae !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-bad b {
  color: #a3271f !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-offer {
  background: #eef6ef !important;
  border-color: #b7d5bb !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-offer b {
  color: #256b36 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-alt {
  background: #eef2f8 !important;
  border-color: #b9cbe0 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-note {
  background: #f5f6f7 !important;
  border-color: #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-note.is-note b {
  color: #535455 !important;
}

/* --------------------------------------------- 8. Поля ТЗ и выгрузки */
html body .rk-cfg-dialog.rk-ui .rk-cfg-tz {
  background: #ffffff !important;
  color: #242424 !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 0 1px #e1e5e8 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-tz:focus-visible {
  outline: 2px solid #6b5b16 !important;
  outline-offset: 2px !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-stamp,
html body .rk-cfg-dialog.rk-ui .rk-cfg-send-note,
html body .rk-cfg-dialog.rk-ui .rk-cfg-status {
  color: #535455 !important;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-status[data-error="true"] {
  color: #a3271f !important;
}

/* Кнопка «Отправить…» без серверного приёмника в статическом бандле не показывается:
   заявку оформляют по ссылке в сноске ниже. Выгрузки ТЗ/спецификации работают. */
html body .rk-cfg-dialog.rk-ui [data-act="send"],
html body .rk-cfg-dialog.rk-ui [data-wcfg="send"],
html body .rk-cfg-dialog.rk-ui .rk-cfg-send-note:empty {
  display: none !important;
}

/* ------------------------------------- 9. Сноска диалога: расчёт + заявка */
html body .rk-cfg-dialog.rk-ui .rk-cfg-site-note {
  flex: 1 1 100%;
  margin: 6px 0 0;
  padding-top: 9px;
  border-top: 1px solid #eceff1;
  color: #535455;
  font: 400 12.5px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-site-note a {
  display: inline-block;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f8cc24;
  color: #242424;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-site-note a:hover {
  background: #f0c012;
  color: #242424;
}
html body .rk-cfg-dialog.rk-ui .rk-cfg-site-note a:focus-visible {
  outline: 2px solid #6b5b16;
  outline-offset: 2px;
}

/* ------------------------------------ 10. Лаунчер: палитра сайта без оранжа */
html body .k1l-main a,
html body .k1l-footer a {
  color: #242424;
}
html body .k1l-status {
  color: #a3271f;
}
html body .k1l-embed-error {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid #ecd98a;
  border-radius: 10px;
  background: #fff8dd;
  color: #3a3526;
  font: 500 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --------------------------------------------- 11. Скроллбары в диалогах */
html body .rk-cfg-dialog.rk-ui :is(.rk-cfg-params, .rk-cfg-panels, .rk-cfg-out, .rk-cfg-body) {
  scrollbar-width: thin;
  scrollbar-color: #cfd5da transparent;
}

/* Встроенный подбор (?open&embed=1) показывает собственную кнопку «Закрыть»
   на странице сайта; внутренний крестик диалога скрываем, чтобы не было двух
   одинаковых кнопок в одном углу. Escape и программное закрытие работают. */
html.rk-embed-open .rk-cfg-dialog .rk-cfg-close,
html.rk-embed-open .rk-wcfg-dialog .rk-cfg-close {
  display: none !important;
}

/* Toshik 2026-11-03: stable scene window, independent of iframe height. */
html body .rk-cfg-dialog.rk-ui #cfg3dHost.rk-r3d-host {
 height:clamp(260px,34vw,440px)!important;min-height:0!important;max-height:440px!important;
}
html body .rk-cfg-dialog.rk-ui #cfg3dHost.rk-r3d-host canvas {width:100%!important;height:100%!important;display:block}
/* No spare full-height grid track below the bounded rack scene. */
html body .rk-cfg-dialog--page.rk-ui .rk-cfg-body{height:auto!important;align-items:start!important}
html body .rk-cfg-dialog--page.rk-ui .rk-cfg-out{height:auto!important;min-height:0!important;grid-template-rows:auto auto auto!important;align-self:start!important}
html body .rk-cfg-dialog--page.rk-ui .rk-cfg-panels{height:auto!important;min-height:0!important}
html body .rk-cfg-dialog--page.rk-ui #cfgPanel3d{display:block!important;height:auto!important;min-height:0!important}
