/* CP84: One approved "Назад" control for all MySmart CRM Mini App screens.
 * The underlying text stays in the DOM for screen readers; only its
 * visual representation becomes the exact CP79 rounded left U-turn icon.
 * No user-approved brand gradient/color stop is touched.
 */
:root { --crm-back-glyph: url("/crmBackIcon.svg?v=20261023-84"); }

html body button:is(.crmBackButton, .crmSaleCalcBack):not(.crmBackKeepLabel) {
  box-sizing:border-box !important;
  appearance:none !important;
  position:relative !important;
  display:inline-grid !important;
  place-items:center !important;
  flex:0 0 44px !important;
  align-self:center !important;
  width:44px !important;
  max-width:44px !important;
  min-width:44px !important;
  height:44px !important;
  min-height:44px !important;
  max-height:44px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:var(--crm-action-secondary-bg,#f1f2f5) !important;
  color:var(--crm-action-secondary-color,#58667f) !important;
  font-size:0 !important;
  letter-spacing:0 !important;
  line-height:0 !important;
  text-align:center !important;
  white-space:nowrap !important;
  vertical-align:middle;
  box-shadow:none !important;
  cursor:pointer;
  overflow:hidden;
  -webkit-tap-highlight-color:transparent;
}

html body button:is(.crmBackButton, .crmSaleCalcBack):not(.crmBackKeepLabel)::before {
  content:"";
  display:block;
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  width:27px;
  height:27px;
  background-color:currentColor;
  -webkit-mask-image:var(--crm-back-glyph);
  mask-image:var(--crm-back-glyph);
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-size:contain;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
}

html body button:is(.crmBackButton, .crmSaleCalcBack):not(.crmBackKeepLabel):focus-visible {
  outline:3px solid rgba(47,149,255,.55) !important;
  outline-offset:2px !important;
}

html body button:is(.crmBackButton, .crmSaleCalcBack):not(.crmBackKeepLabel):disabled {
  opacity:.45 !important;
  cursor:not-allowed;
}

/* The PDF reader has dark chrome: retain high-contrast button affordance. */
html body .crmPdfPreviewTopbar button.crmBackButton:not(.crmBackKeepLabel) {
  color:#fff !important;
  background:#2b2e36 !important;
}

/* Preserve real "Готово"/finish controls. They are not Back actions. */
