/* r41aw35hov: плитки, значки и кнопки заметно шевелятся ТОЛЬКО при наведении мыши.
   В покое не двигаются. Эталон движения — живой значок «Персонал», но теперь
   так же и сама плитка, и все значки на ней. Золотая черта меню без изменений. */

@keyframes shop-icon-live{
  0%,100%{transform:translateY(0) scale(1)}
  35%{transform:translateY(-4px) scale(1.16)}
  68%{transform:translateY(1px) scale(.96)}
}
@keyframes shop-art-live{
  0%,100%{transform:translateY(0) scale(1)}
  40%{transform:translateY(-4px) scale(1.1)}
  70%{transform:translateY(0) scale(1)}
}
@keyframes shop-tile-live{
  0%,100%{transform:translateY(0) scale(1)}
  40%{transform:translateY(-3px) scale(1.025)}
  70%{transform:translateY(.5px) scale(1)}
}
@keyframes shop-btn-live{
  0%,100%{transform:translateY(0) scale(1)}
  35%{transform:translateY(-3px) scale(1.06)}
  68%{transform:translateY(.5px) scale(.99)}
}

@media (prefers-reduced-motion:no-preference){
  /* Значки — только hover по самому значку или по плитке */
  html:not([data-df-anim="off"]) .workshop-wrap .shop-signal:hover b,
  html:not([data-df-anim="off"]) .workshop-wrap .shop-area:hover .shop-signal b,
  html:not([data-df-anim="off"]) .workshop-wrap .shop-legend-icons>.shop-signal:hover b{
    animation:shop-icon-live .85s ease-in-out infinite;
    transform-origin:50% 80%;
  }
  html:not([data-df-anim="off"]) .workshop-wrap .shop-area:hover .shop-signals>.shop-signal:nth-child(2) b{animation-delay:.1s}
  html:not([data-df-anim="off"]) .workshop-wrap .shop-area:hover .shop-signals>.shop-signal:nth-child(3) b{animation-delay:.2s}

  /* Картинка, капля, компьютер, короба склада — при наведении на плитку */
  html:not([data-df-anim="off"]) .workshop-wrap .shop-area:hover .shop-area-art,
  html:not([data-df-anim="off"]) .workshop-wrap .shop-area:hover .shop-sklad-ico{
    animation:shop-art-live 1s ease-in-out infinite;
    transform-origin:50% 60%;
  }

  /* Сама плитка заметно дышит только на hover */
  html:not([data-df-anim="off"]) .workshop-wrap .workshop-map .shop-area:hover{
    animation:shop-tile-live 1.05s ease-in-out infinite;
    transform-origin:50% 50%;
    will-change:transform;
  }

  /* Кнопки шапки и пункты меню — только наведение на этот пункт, не у активного постоянно */
  html:not([data-df-anim="off"]) .workshop-wrap .workshop-head>.btn:hover,
  html:not([data-df-anim="off"]) .topbar .dfj-open:hover,
  html:not([data-df-anim="off"]) body:not(.copy-app) .topbar>.tabs>.tab:hover,
  html:not([data-df-anim="off"]) body:not(.copy-app) .topbar>.tabs>.df-graph-select:hover,
  html:not([data-df-anim="off"]) body:not(.copy-app) .topbar>.tabs>.df-diesel-menu>summary:hover{
    animation:shop-btn-live .9s ease-in-out infinite;
    transform-origin:50% 80%;
  }
}

/* Чтобы подпрыгивание не обрезалось */
html[data-theme] .workshop-wrap .workshop-map .shop-area,
html[data-theme] .workshop-wrap .workshop-map .shop-area:hover,
html[data-theme] .workshop-wrap .workshop-map .shop-area:focus{
  overflow:visible;
}
html[data-theme] .workshop-wrap .workshop-map .shop-signals,
html[data-theme] .workshop-wrap .workshop-map .shop-area-art{
  overflow:visible;
}
@media(min-width:1180px){
  body:not(.copy-app) .topbar>.tabs{overflow:visible!important}
}

/* Золотая черта под ВСЕМ активным пунктом, включая стрелку, без зазора */
html[data-theme] body:not(.copy-app) .topbar>.tabs>.tab.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>select.tab.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>#tab-planning.tab.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>#tab-workshop.tab.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>details.tab.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>details.active,
html[data-theme] body:not(.copy-app) .topbar>.tabs>details[aria-current="page"]{
  box-shadow:none!important;
  border-bottom:0!important;
  background-image:linear-gradient(#ffc440,#ffc440);
  background-repeat:no-repeat;
  background-position:left bottom;
  background-size:100% 3px;
  padding-bottom:0;
}
html[data-theme] body:not(.copy-app) .topbar>.tabs>details.tab.active>summary,
html[data-theme] body:not(.copy-app) .topbar>.tabs>details[aria-current="page"]>summary,
html[data-theme] body:not(.copy-app) .topbar>.tabs>details.active>summary{
  box-shadow:none!important;
  border-bottom:0!important;
  background-image:linear-gradient(#ffc440,#ffc440);
  background-repeat:no-repeat;
  background-position:left bottom;
  background-size:100% 3px;
}

@media (prefers-reduced-motion:reduce){
  .workshop-wrap .shop-area,
  .workshop-wrap .shop-signal,
  .workshop-wrap .shop-signal b,
  .workshop-wrap .shop-area-art,
  .workshop-wrap .shop-sklad-ico,
  .workshop-wrap .workshop-head>.btn,
  .topbar .dfj-open,
  body:not(.copy-app) .topbar>.tabs>.tab,
  body:not(.copy-app) .topbar>.tabs>.df-graph-select,
  body:not(.copy-app) .topbar>.tabs>.df-diesel-menu>summary{
    animation:none!important;
    transition:none!important;
  }
}
html[data-df-anim="off"] .workshop-wrap .shop-area,
html[data-df-anim="off"] .workshop-wrap .shop-signal b,
html[data-df-anim="off"] .workshop-wrap .shop-area-art,
html[data-df-anim="off"] .workshop-wrap .shop-sklad-ico,
html[data-df-anim="off"] .workshop-wrap .workshop-head>.btn,
html[data-df-anim="off"] .topbar .dfj-open,
html[data-df-anim="off"] body:not(.copy-app) .topbar>.tabs>.tab,
html[data-df-anim="off"] body:not(.copy-app) .topbar>.tabs>.df-graph-select,
html[data-df-anim="off"] body:not(.copy-app) .topbar>.tabs>.df-diesel-menu>summary{
  animation:none!important;
}

/* r41aw46new (t974): % выполнения на плитке — свой кликабельный элемент: шевелится и растёт при наведении, как значки. В покое неподвижен.
   Используем отдельные свойства translate/scale, чтобы не ломать transform:translateX(-50%) центровки. */
.workshop-wrap .workshop-map .shop-pct{cursor:pointer}
@keyframes shop-pct-live{
  0%,100%{translate:0 0;scale:1}
  35%{translate:0 -3px;scale:1.08}
  68%{translate:0 .5px;scale:.99}
}
@keyframes shop-pct-live-own{
  0%,100%{translate:0 -2px;scale:1.14}
  45%{translate:0 -5px;scale:1.2}
}
@media (prefers-reduced-motion:no-preference){
  html:not([data-df-anim="off"]) .workshop-wrap .workshop-map .shop-area:hover .shop-pct{
    animation:shop-pct-live .85s ease-in-out infinite;transform-origin:50% 80%}
  html:not([data-df-anim="off"]) .workshop-wrap .workshop-map .shop-pct:hover{
    animation:shop-pct-live-own .7s ease-in-out infinite;transform-origin:50% 80%;
    text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;
    filter:drop-shadow(0 3px 6px rgba(0,0,0,.25))}
}
html[data-df-anim="off"] .workshop-wrap .workshop-map .shop-pct:hover,
html .workshop-wrap .workshop-map .shop-pct:focus-visible{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}

/* r41aw83x: снято правило t1241 «стоять на месте» — снова работают анимации плитки и % (r41aw35hov, r41aw46new). */
html .workshop-wrap .workshop-map .shop-pct:focus-visible{outline:2px solid #64acff;outline-offset:2px}

/* r41aw80week (t1244): «Работы» в карточке участка — «Факт» с временем («13.11 09:59 ✎») помещается целиком
   и не залезает под «Состояние»; при ~1024 px тоже. Сужаем «Прогноз», «Факт» — по содержимому. */
@container (min-width:1051px){
html[data-theme] .workshop-works-table .ws-row,
.workshop-works-table .ws-row{grid-template-columns:minmax(170px,.95fr) 60px minmax(96px,130px) minmax(118px,max-content) minmax(160px,1.1fr) minmax(190px,220px)!important}
}
.workshop-works-table td[data-label="Факт"]{white-space:nowrap;overflow:visible;min-width:118px}
.workshop-works-table td[data-label="Факт"] .workshop-actual-date{display:inline-flex;flex-wrap:nowrap;white-space:nowrap;gap:4px}
.workshop-works-table td[data-label="Факт"] .workshop-actual-date>span{overflow:visible;text-overflow:clip;white-space:nowrap}
.workshop-works-table td[data-label="Состояние"]{min-width:0;overflow:hidden}

/* r41aw80week (t1248): «Действия» в карточке участка — компактно: «Дата факта» + поле + «Начать работу» в строку,
   без огромного овального фона ячейки и без подписи-причины под кнопкой (причина — в «Состоянии»). */
html[data-df-tone] #modal .workshop-works-table :is(.df-inline-mark,.df-act-row),
html #modal .workshop-works-table :is(.df-inline-mark,.df-act-row){background:none!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;min-height:0!important}
html #modal .workshop-works-table .df-inline-mark{display:flex!important;flex-wrap:wrap;align-items:center;gap:6px!important;margin:0!important}
html #modal .workshop-works-table .df-act-row{display:inline-flex!important;align-items:center;gap:6px}
html #modal .workshop-works-table .df-inline-mark .df-act-why{display:none!important}
html #modal .workshop-works-table .df-inline-date{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;margin:0}
html #modal .workshop-works-table .df-inline-mark input[type=date]{width:132px;min-width:0}
html #modal .workshop-works-table .df-inline-mark .df-inline-status:empty{display:none}

/* r41aw80week (t1249): ряд кружков «Персонал · Склад · Работы» на всех плитках карты — на одной высоте.
   Плитка — flex-колонка, ряд кружков прижат к низу (margin-top:auto) и имеет фиксированную высоту, по центру.
   Кружки одного размера на всех плитках (размер зависит от окна, а не от ширины плитки), отступы одинаковые.
   «!» лежит поверх кружка (position:absolute) и места не занимает. */
html .workshop-wrap .workshop-map{--df-sig:clamp(16px,1.55vw,26px);--df-sig-gap:clamp(3px,.45vw,8px)}
html .workshop-wrap .workshop-map .shop-area:not(.shop-sklad){display:flex!important;flex-direction:column!important}
html .workshop-wrap .workshop-map .shop-area>.shop-signals,
html .workshop-wrap .workshop-map .shop-area:not(.shop-sklad):has(> .shop-area-art:not(.shop-art-off))>.shop-signals{
  margin-top:auto!important;margin-bottom:6px!important;padding:0!important;
  height:calc(var(--df-sig) + 6px)!important;min-height:calc(var(--df-sig) + 6px)!important;max-height:calc(var(--df-sig) + 6px)!important;
  flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;
  gap:var(--df-sig-gap)!important;align-self:stretch!important;box-sizing:border-box!important;line-height:0!important}
html .workshop-wrap .workshop-map .shop-area>.shop-signals>.shop-signal{
  position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:0!important;margin:0!important;padding:0!important;line-height:0!important;flex:0 0 auto!important;
  width:var(--df-sig)!important;height:var(--df-sig)!important;vertical-align:middle!important}
html .workshop-wrap .workshop-map .shop-area>.shop-signals>.shop-signal>b{
  position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:var(--df-sig)!important;height:var(--df-sig)!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;flex:0 0 auto!important;box-sizing:border-box!important;overflow:visible!important}
html .workshop-wrap .workshop-map .shop-area>.shop-signals>.shop-signal>b>img,
html .workshop-wrap .workshop-map .shop-area>.shop-signals>.shop-signal>b>svg{width:100%!important;height:100%!important;margin:0!important;display:block!important;flex:none!important}
html .workshop-wrap .workshop-map .shop-area>.shop-signals .shop-sig-bang{
  position:absolute!important;top:-4px!important;right:-5px!important;left:auto!important;bottom:auto!important;margin:0!important;
  min-width:13px!important;min-height:13px!important;width:13px!important;height:13px!important;line-height:13px!important;font-size:10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;z-index:3;pointer-events:none}
/* t1249: страховка — ряд кружков стоит от низа плитки (bottom), поэтому у плиток одного ряда он на одной высоте,
   даже если текст выше по-разному переносится; место под ряд зарезервировано отступом снизу плитки. */
html .workshop-wrap .workshop-map .shop-area:not(.shop-sklad){padding-bottom:calc(var(--df-sig) + 14px)!important;box-sizing:border-box!important}
html .workshop-wrap .workshop-map .shop-area:not(.shop-sklad)>.shop-signals,
html .workshop-wrap .workshop-map .shop-area:not(.shop-sklad):has(> .shop-area-art:not(.shop-art-off))>.shop-signals{
  position:absolute!important;left:0!important;right:0!important;bottom:6px!important;top:auto!important;margin:0!important;z-index:2}
html .workshop-wrap .workshop-map .shop-area .df-sig-hide{visibility:hidden!important}
/* t1248: ячейка «Действия» — без отдельной заливки, всё в одну строку слева (и в узкой раскладке ~1024 px) */
html[data-df-tone] #modal .workshop-works-table td[data-label="Действия"],
html #modal .workshop-works-table td[data-label="Действия"]{background:transparent!important;border-radius:0!important;box-shadow:none!important;text-align:left!important}
html #modal .workshop-works-table td[data-label="Действия"] .df-inline-mark{justify-content:flex-start!important;flex-direction:row!important;text-align:left!important}
html #modal .workshop-works-table td[data-label="Действия"] .df-inline-mark>*{margin:0!important}
html[data-df-tone] body #modal#modal .workshop-works-table td .df-inline-mark.df-inline-mark,
html body #modal#modal .workshop-works-table td .df-inline-mark.df-inline-mark{background:transparent!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important}

/* r41aw81ui (t1255): «Графики» в шапке — один в один как «• Дизели ▾» в той же строке: высота 36, рамка 1px того же цвета,
   скругление 10px, без тени и без «подчёркивания» активной вкладки, тот же фон и шрифт; ширина — по подписи. */
html body select.tab.df-graph-select:not(#df-x):not(#df-y):not(#df-z),
html[data-df-tone] body select.tab.df-graph-select:not(#df-x):not(#df-y):not(#df-z),
html[data-df-tone] body select.tab.df-graph-select.active:not(#df-x):not(#df-y):not(#df-z){
  height:36px!important;min-height:36px!important;max-height:36px!important;box-sizing:border-box!important;
  padding:0 22px 0 11px!important;border:1px solid var(--zd-line-strong,#486782)!important;border-radius:10px!important;
  box-shadow:none!important;background-color:var(--zd-panel,#142d4a)!important;color:var(--zd-text-strong,#e9f2fb)!important;
  font-size:14px!important;font-weight:800!important;line-height:16.8px!important;
  align-self:center!important;margin-top:0!important;margin-bottom:0!important;
  field-sizing:content;width:auto!important;min-width:0!important;max-width:124px!important;text-overflow:clip!important}

html[data-df-tone="dark"] body select.tab.df-graph-select:not(#df-x):not(#df-y):not(#df-z):is(:hover,:open){
  background-color:var(--zd-panel-3,#1b3456)!important;
  background-image:none!important;
  border-color:var(--zd-link,#70baff)!important;
}
