/* Pillar step 41 · back-to-top control · only loaded on Pillar V4 preview pages. */
.pillar-backtop41 {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(max(24px, env(safe-area-inset-bottom, 0px)) + 76px);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 54px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: #153d5f;
  line-height: 1.2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 10px 25px rgba(10, 32, 49, .20);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease, background-color .16s ease;
}
.pillar-backtop41--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.pillar-backtop41:hover { background: #ee7130; }
.pillar-backtop41:focus-visible { outline: 3px solid #f18b43; outline-offset: 3px; }
.pillar-backtop41__arrow { display: inline-block; font-size: 24px; line-height: 1; font-weight: 400; transform: translateY(-1px); }
@media (max-width: 640px) {
  .pillar-backtop41 {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 76px);
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
  }
  .pillar-backtop41__text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pillar-backtop41 { transition: none; }
}

/* PILLAR_BACKTOP_LEADBACK_V2: compact arrow, desktop beside LeadBack. */
.pillar-backtop41 {
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  gap: 0;
  background: #142c46;
}
.pillar-backtop41__text { display: none; }
.pillar-backtop41__arrow { font-size: 22px; }
/* Mobile: retain a larger touch target above the unverified mobile menu. */
@media (max-width: 640px) {
  .pillar-backtop41 {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 76px);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}
/* PILLAR_LEADBACK_STYLE_BRAND_V3: color only; no layout changes. */
body.pillar-new #lb_widget-root div.lb_wrapper > div.lb_widget {
  background: rgba(20, 44, 70, 0.95) !important;
}
@media (min-width: 641px) {
  .lb-widget.lb-widget-chat .lb-widget-layout-chat {
    background-color: #f1f5f9 !important;
    border-radius: 12px !important;
    box-shadow: 0 0 0 1px #b9c9d8, 0 12px 32px rgba(20,44,70,.18) !important;
  }
  .lb-widget.lb-widget-chat .lb-widget-layout-chat .lb-widget-layout-header {
    background-color: #142c46 !important;
    border-radius: 12px 12px 0 0 !important;
    color: #ffffff !important;
  }
  .lb-widget.lb-widget-chat .lb-widget-layout-header .lb-widget-header,
  .lb-widget.lb-widget-chat .lb-widget-layout-header .lb-widget-header-piece {
    color: #ffffff !important;
  }
}
/* PILLAR_LEADBACK_STYLE_FINAL_V6: confirmed composer containers; replaces V4/V5 broad rules. */
@media (min-width: 641px) {
 .lb-widget.lb-widget-chat .lb-widget-layout-chat {
   background-image: linear-gradient(rgba(241,245,249,.91),rgba(241,245,249,.91)), url('/local/templates/pillar_new/assets/pillar-logo48-candidate.png') !important;
   background-size: 100% 100%,44% auto !important;
   background-position: center,center 45% !important;
   background-repeat:no-repeat !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer__top-box,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer .lb-chat-enter,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer #lb-chat-enter-form {
   background-color:#142c46 !important;color:#fff !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer {
   border-radius:0 0 12px 12px !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer .lb-chat-enter {
   border-radius:0 !important;box-shadow:none !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is(textarea,input[type="text"],[contenteditable="true"]) {
   background:#fff !important;color:#142c46 !important;border:1px solid #a6bacd !important;border-radius:6px !important;box-shadow:none !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is(textarea,input[type="text"])::placeholder {color:#52677b !important;opacity:1 !important;}
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is(button[type="submit"],input[type="submit"],.lb-widget-send-button,.lb-widget-button-send) {
   background:#c4450c !important;color:#fff !important;min-height:36px !important;box-sizing:border-box !important;border:0 !important;border-radius:6px !important;font-weight:600 !important;box-shadow:none !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"],button[aria-label="Закрыть"],button[aria-label="Close"]) {color:#fff !important;}
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::before,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::after {border-color:#fff !important;}
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"]) svg {color:#fff !important;stroke:#fff !important;}
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer :is([class*="attach"],[class*="paperclip"]) {color:#fff !important;}
}
/* PILLAR_LEADBACK_STYLE_FINAL_V7: corner cleanup and composer polish. */
@media (min-width: 641px) {
 body.pillar-new .lb-widget.lb-widget-chat:has(> .lb-widget-layout-chat),
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-chat {
   border-radius:12px !important;
   background-clip:padding-box !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat:has(> .lb-widget-layout-chat) {
   background-color:transparent !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header {
   border-radius:12px 12px 0 0 !important;
   background-clip:padding-box !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer__bottom-box {
   background-color:#142c46 !important;
   border-radius:0 0 12px 12px !important;
   background-clip:padding-box !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"],[aria-label="Закрыть"],[aria-label="Close"],[title="Закрыть"]) {
   color:#fff !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"],[aria-label="Закрыть"],[aria-label="Close"],[title="Закрыть"]) :is(svg,img) {
   filter:brightness(0) invert(1) !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::before,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::after {
   filter:brightness(0) invert(1) !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer :is([class*="attach"],[class*="paperclip"],[class*="file-upload-button"]) {
   color:#fff !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer :is([class*="attach"],[class*="paperclip"],[class*="file-upload-button"]) :is(svg,img) {
   filter:brightness(0) invert(1) !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form td:has(:is(button[type="submit"],input[type="submit"],.lb-widget-send-button,.lb-widget-button-send)):not(:has(textarea,input[type="text"],[contenteditable="true"])) {
   padding-left:8px !important;
   padding-right:6px !important;
   box-sizing:border-box !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-footer__bottom-box {color:#b5c5d5 !important;}
}
/* PILLAR_LEADBACK_STYLE_FINAL_V8: three cosmetic fixes only. */
@media (min-width:641px) {
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"],[aria-label="Закрыть"],[aria-label="Close"],[title="Закрыть"]) {
   color:#fff !important;filter:brightness(0) invert(1) !important;opacity:1 !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"],[aria-label="Закрыть"],[aria-label="Close"],[title="Закрыть"]) :is(svg,img),
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::before,
 body.pillar-new .lb-widget.lb-widget-chat .lb-widget-layout-header :is([class*="close"],[class*="cross"])::after {filter:none !important;}
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is([class*="attach"],[class*="paperclip"],[class*="file-upload"],[class*="file_upload"],[class*="clip"]):not(input):not(:has(textarea,input[type="text"],button[type="submit"],[contenteditable="true"])) {
   color:#fff !important;opacity:1 !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is([class*="attach"],[class*="paperclip"],[class*="file-upload"],[class*="file_upload"],[class*="clip"]):not(input):not(:has(textarea,input[type="text"],button[type="submit"],[contenteditable="true"])):not(:has(svg,img)) {
   filter:brightness(0) invert(1) !important;
 }
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is([class*="attach"],[class*="paperclip"],[class*="file-upload"],[class*="file_upload"],[class*="clip"]) :is(svg,img) {filter:brightness(0) invert(1) !important;opacity:1 !important;}
 body.pillar-new .lb-widget.lb-widget-chat #lb-chat-enter-form :is(button[type="submit"],input[type="submit"],.lb-widget-send-button,.lb-widget-button-send) {
   border-left:6px solid transparent !important;background-clip:padding-box !important;
 }
}