/* «Добавить на главный экран» (install.js): полоса внизу экрана телефона.
 * Синий фон и белый текст в обеих темах; кнопки одной высоты. */

.ib {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 72;
  display: grid; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--accent, #1C5CAB);
  color: #FFFFFF;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
  font-family: var(--font, "Onest", system-ui, sans-serif);
  transform: translateY(110%);
  transition: transform 280ms cubic-bezier(.2, .8, .2, 1);
}
.ib.show { transform: none; }
/* Над нижним меню кабинета: отступ снизу даёт само меню. */
.ib.above { padding-bottom: 12px; border-radius: 18px 18px 0 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .16); }
.ib-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ib-icon { width: 44px; height: 44px; flex: none; border-radius: 11px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.ib-text { display: grid; gap: 2px; min-width: 0; }
.ib-text b { font-size: 16px; line-height: 1.25; font-weight: 650; color: #FFFFFF; overflow-wrap: anywhere; }
.ib-text span { font-size: 13.5px; line-height: 1.35; color: rgba(255, 255, 255, .88); }

.ib-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ib-steps li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; line-height: 1.4; color: #FFFFFF; }
.ib-steps li > i {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .2);
  font-style: normal; font-size: 13px; font-weight: 700;
}
.ib-key {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; margin: -3px 1px;
  border-radius: 8px;
  background: #FFFFFF; color: #174E93;
  vertical-align: middle;
}

.ib-btns { display: flex; gap: 8px; }
.ib-btn {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px;
  border-radius: 12px;
  font: inherit; font-size: 15.5px; font-weight: 650;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 120ms ease, background 120ms ease;
}
.ib-btn:active { transform: scale(.98); }
.ib-go { flex-grow: 2; background: #FFFFFF; color: #174E93; }
.ib-later, .ib-done { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .55); }
/* «Уже добавил»: больше не показывать на этом телефоне. Под шагами — компактная, по ширине текста. */
.ib-btns-end { justify-content: flex-start; }
.ib-btns-end .ib-done { flex: none; min-height: 40px; padding: 0 14px; font-size: 14.5px; }
.ib-row .ib-text { flex: 1; }
.ib-row .ib-later { flex: none; min-height: 40px; padding: 0 14px; font-size: 14.5px; align-self: flex-start; }
.ib-btn:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.ib-btn:disabled { opacity: .6; }

@media (min-width: 600px) {
  .ib { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); transform: translate(-50%, 110%); }
  .ib.show { transform: translate(-50%, 0); }
}

/* Полоса не закрывает содержимое и кнопки страниц. */
body.has-install { padding-bottom: var(--install-h, 0px); }
body.has-install .w { padding-bottom: calc(28px + var(--install-h, 0px)); }
body.has-install .submit-dock { bottom: calc(58px + var(--safe-bottom, 0px) + var(--install-h, 0px)); }
body.has-install .toast { bottom: calc(24px + var(--install-h, 0px) + 58px + var(--safe-bottom, 0px)); }
body.has-install .update-bar, body.has-install .jobs-dock { bottom: calc(84px + var(--safe-bottom, 0px) + var(--install-h, 0px)); }
/* Карточка работника на телефоне во весь экран: полоса уходит, чтобы не закрыть «Сохранить». */
html.qp-locked .ib { display: none; }

@media (prefers-reduced-motion: reduce) { .ib, .ib.show { transition: none; } }

/* На раздаче полоса установки не закрывает строку ввода: там каждый пиксель экрана занят. */
body:has(#view-scan.active) .ib { display: none !important; }
