/* «Помощник по каталогу» (site-atlas). Everything under .tsa-*; colours and font as the site's buttons. */

.tsa-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 10040;
  display: flex; align-items: center; gap: 8px; height: 48px; margin: 0; padding: 0 20px 0 16px;
  border: 0; border-radius: 24px; background: #1976d2; color: #fff;
  font: 600 14px/1 Montserrat, Arial, sans-serif; letter-spacing: 0; text-transform: none;
  box-shadow: 0 6px 18px rgba(25, 118, 210, .35); cursor: pointer;
}
.tsa-launcher:hover { background: #1565c0; }
.tsa-launcher:focus-visible { outline: 3px solid #90caf9; outline-offset: 2px; }
.tsa-launcher .tsa-icon svg { display: block; width: 22px; height: 22px; fill: currentColor; }

.tsa-panel {
  position: fixed; right: 20px; bottom: 80px; z-index: 10050;
  display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 32px);
  height: 640px; max-height: calc(100vh - 110px); box-sizing: border-box;
  background: #fff; color: #222; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  font: 14px/1.4 Montserrat, Arial, sans-serif; text-align: left; overflow: hidden;
}
.tsa-panel[hidden], .tsa-panel [hidden] { display: none !important; }
.tsa-panel *, .tsa-panel *::before, .tsa-panel *::after { box-sizing: border-box; }

.tsa-head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px 16px; }
.tsa-head .tsa-back { margin-left: -8px; }
.tsa-title { flex: 1; font-size: 16px; font-weight: 700; color: #1a1a1a; }
.tsa-panel .tsa-iconbtn {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: none; color: #5f6b77; cursor: pointer;
}
.tsa-panel .tsa-iconbtn:hover { background: #f0f3f7; color: #222; }
.tsa-iconbtn svg { width: 22px; height: 22px; fill: currentColor; }

.tsa-search { padding: 0 16px 12px; border-bottom: 1px solid #e8ecf0; }
.tsa-panel .tsa-input {
  display: block; width: 100%; height: 42px; margin: 0; padding: 0 12px;
  border: 1px solid #c9d3de; border-radius: 6px; background: #fff; color: #222;
  font: 15px Montserrat, Arial, sans-serif; outline: none; box-shadow: none;
}
.tsa-panel .tsa-input:focus { border-color: #1976d2; box-shadow: 0 0 0 3px rgba(25, 118, 210, .15); }

.tsa-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px 14px; }
.tsa-hint { margin: 10px 0 6px; color: #555; }
.tsa-h { margin: 16px 0 6px; color: #7a8794; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tsa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tsa-panel .tsa-chip {
  margin: 0; padding: 5px 11px; border: 1px solid #c9d3de; border-radius: 14px; background: #fff;
  color: #1976d2; font: 13px/1.2 Montserrat, Arial, sans-serif; cursor: pointer;
}
.tsa-panel .tsa-chip:hover { border-color: #1976d2; background: #f3f7fc; }

.tsa-panel a { color: #1976d2; text-decoration: none; }
.tsa-panel a:hover { text-decoration: underline; }
.tsa-links { margin: 0; padding: 0; list-style: none; }
.tsa-links li { margin: 0; padding: 0; }
.tsa-links li::before { display: none; }
.tsa-links li a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0f2f5; }
.tsa-count { flex: none; margin-left: 8px; color: #8a96a3; font-size: 12px; white-space: nowrap; }

.tsa-groups { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.tsa-panel .tsa-group {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 0; padding: 10px 6px 10px 12px;
  border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; color: #1a1a1a;
  font: 14px/1.3 Montserrat, Arial, sans-serif; text-align: left; text-transform: none; cursor: pointer;
}
.tsa-panel .tsa-group:hover { border-color: #1976d2; background: #f3f7fc; }
.tsa-group-text { flex: 1; min-width: 0; }
.tsa-group-title { display: block; font-size: 15px; font-weight: 700; }
.tsa-group-types { display: block; margin-top: 2px; color: #7a8794; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsa-chevron svg { display: block; width: 20px; height: 20px; fill: #9aa6b2; }
.tsa-panel .tsa-type {
  display: flex; justify-content: space-between; gap: 8px; width: 100%; margin: 0; padding: 9px 0;
  border: 0; border-bottom: 1px solid #f0f2f5; background: none; color: #1976d2;
  font: 14px Montserrat, Arial, sans-serif; text-align: left; text-transform: none; cursor: pointer;
}
.tsa-panel .tsa-type:hover span:first-child { text-decoration: underline; }
.tsa-links li:first-child .tsa-type { font-weight: 600; }
.tsa-crumbs { margin: 12px 0 8px; color: #7a8794; font-size: 13px; line-height: 1.5; }
.tsa-panel .tsa-crumb {
  display: inline; margin: 0; padding: 0; border: 0; background: none; color: #1976d2;
  font: inherit; text-transform: none; cursor: pointer;
}
.tsa-panel .tsa-crumb:hover { text-decoration: underline; }
.tsa-crumb-here { color: #1a1a1a; font-weight: 600; }

.tsa-items { margin: 0; padding: 0; list-style: none; }
.tsa-items li { margin: 0; padding: 0; }
.tsa-items li::before { display: none; }
.tsa-panel .tsa-item { display: flex; gap: 10px; margin: 0 -6px; padding: 8px 6px; border-radius: 6px; color: #222; text-decoration: none; }
.tsa-panel .tsa-item:hover, .tsa-panel .tsa-item:focus { background: #f3f7fc; text-decoration: none; }
/* The site's img { margin: 0 auto } would centre the picture in the flex row. */
.tsa-panel .tsa-pic { flex: 0 0 48px; width: 48px; height: 48px; margin: 0; border-radius: 4px; background: #f3f5f8; object-fit: contain; }
.tsa-nopic { display: flex; align-items: center; justify-content: center; }
.tsa-nopic svg { width: 24px; height: 24px; fill: #b8c2cc; }
.tsa-item-text { min-width: 0; }
.tsa-name { display: block; color: #1a1a1a; font-weight: 600; }
.tsa-meta { display: block; margin-top: 2px; color: #7a8794; font-size: 12px; }
.tsa-match { color: #2e7d32; }
.tsa-note { margin: 10px 0 4px; padding: 6px 10px; border-radius: 4px; background: #fff8e1; font-size: 13px; }
.tsa-empty { padding: 6px 0; }
.tsa-empty p { margin: 8px 0; }
.tsa-empty-title { font-weight: 600; }
.tsa-empty-call { color: #555; }

.tsa-panel .tsa-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; margin: 4px 0; padding: 0 18px;
  border: 0; border-radius: 3px; background: #1976d2; color: #fff; font: 600 14px Montserrat, Arial, sans-serif;
  text-transform: none; cursor: pointer;
}
.tsa-panel .tsa-btn:hover { background: #1565c0; }
.tsa-panel .tsa-btn[disabled] { opacity: .6; cursor: default; }
.tsa-panel a.tsa-btn, .tsa-panel a.tsa-btn:hover, .tsa-panel a.tsa-btn:focus { color: #fff; text-decoration: none; }
.tsa-panel .tsa-catalog-link { display: flex; width: 100%; margin: 0 0 10px; }

.tsa-foot { padding: 10px 16px 12px; border-top: 1px solid #e8ecf0; background: #fafbfc; }
.tsa-panel .tsa-foot-request {
  display: block; width: 100%; margin: 0 0 8px; padding: 9px 12px; border: 1px dashed #90b4dc; border-radius: 6px;
  background: #fff; color: #1a1a1a; font: 14px Montserrat, Arial, sans-serif; text-align: left; cursor: pointer;
}
.tsa-panel .tsa-foot-request b { color: #1976d2; }
.tsa-panel .tsa-foot-request:hover { border-color: #1976d2; background: #f3f7fc; }
.tsa-foot-form .tsa-foot-request { display: none; }
.tsa-contacts { display: flex; align-items: center; gap: 10px; }
.tsa-phone-icon svg { display: block; width: 20px; height: 20px; fill: #1976d2; }
.tsa-phone-box { flex: 1; min-width: 0; line-height: 1.25; }
.tsa-panel .tsa-phone { display: block; color: #1a1a1a; font-weight: 700; }
.tsa-phone-note { display: block; color: #7a8794; font-size: 11px; }
.tsa-panel .tsa-messenger {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; text-decoration: none;
}
.tsa-panel .tsa-messenger:hover { text-decoration: none; opacity: .9; }
.tsa-tg { background: #29a9eb; }
.tsa-max { background: linear-gradient(135deg, #3d8bff, #8f4dff); }
.tsa-messenger svg { width: 18px; height: 18px; fill: #fff; }

.tsa-form { padding-bottom: 4px; }
.tsa-field { margin: 10px 0 0; }
.tsa-field > label { display: block; margin: 0 0 4px; color: #333; font-size: 13px; font-weight: 600; }
.tsa-panel .tsa-form input[type="text"], .tsa-panel .tsa-form input[type="tel"], .tsa-panel .tsa-form input[type="email"], .tsa-panel .tsa-form textarea {
  display: block; width: 100%; margin: 0; padding: 9px 11px; border: 1px solid #c9d3de; border-radius: 6px;
  background: #fff; color: #222; font: 14px Montserrat, Arial, sans-serif; outline: none; box-shadow: none;
}
.tsa-panel .tsa-form input:focus, .tsa-panel .tsa-form textarea:focus { border-color: #1976d2; box-shadow: 0 0 0 3px rgba(25, 118, 210, .15); }
.tsa-panel .tsa-form textarea { min-height: 72px; resize: vertical; }
.tsa-panel .tsa-form .tsa-invalid { border-color: #c62828; }
.tsa-field-note { display: block; margin-top: 3px; color: #7a8794; font-size: 12px; }
.tsa-field-error { display: block; margin-top: 3px; color: #c62828; font-size: 12px; }
.tsa-field > .tsa-consent { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.tsa-consent input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
.tsa-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tsa-error { margin: 10px 0; padding: 8px 10px; border-radius: 4px; background: #fdecea; color: #b71c1c; font-size: 13px; }
.tsa-submit { margin-top: 12px !important; }
.tsa-captcha-note { margin: 8px 0 0; color: #8a96a3; font-size: 11px; }
.tsa-done { padding: 16px 0; }
.tsa-done-title { margin: 0 0 8px; color: #2e7d32; font-size: 16px; font-weight: 700; }
.tsa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The chat with a manager. */
.tsa-badge {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #e53935; color: #fff; font: 700 12px/20px Montserrat, Arial, sans-serif; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.tsa-foot-actions { display: flex; gap: 8px; margin: 0 0 8px; }
.tsa-panel .tsa-foot-chat {
  position: relative; display: flex; flex: 1 1 55%; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 9px 10px;
  border: 0; border-radius: 6px; background: #1976d2; color: #fff; font: 600 14px Montserrat, Arial, sans-serif; text-transform: none; cursor: pointer;
}
.tsa-panel .tsa-foot-chat:hover { background: #1565c0; }
.tsa-foot-chat .tsa-icon svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.tsa-chat-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; line-height: 18px; }
.tsa-panel .tsa-foot-request.tsa-foot-request-short { flex: 1 1 45%; width: auto; margin: 0; text-align: center; color: #1976d2; font-weight: 600; }
.tsa-panel .tsa-btn-light { margin-left: 8px; background: #fff; color: #1976d2; box-shadow: inset 0 0 0 1px #1976d2; }
.tsa-panel .tsa-btn-light:hover { background: #f3f7fc; }

.tsa-chat-note { margin: 10px 0; padding: 8px 10px; border-radius: 6px; background: #f3f7fc; color: #4a5866; font-size: 12px; }
.tsa-chat-call { margin: 10px 0 0; color: #7a8794; font-size: 12px; }
.tsa-msgs { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.tsa-msg { max-width: 85%; padding: 7px 10px 5px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.tsa-msg-me { align-self: flex-end; border-bottom-right-radius: 4px; background: #1976d2; color: #fff; }
.tsa-msg-staff { align-self: flex-start; border-bottom-left-radius: 4px; background: #f0f2f5; color: #1a1a1a; }
.tsa-msg-sending { opacity: .7; }
.tsa-msg-who { display: block; margin-bottom: 2px; color: #1976d2; font-size: 11px; font-weight: 700; }
.tsa-msg-text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.tsa-panel .tsa-msg-staff a { color: #1565c0; text-decoration: underline; }
.tsa-msg-time { display: block; margin-top: 2px; font-size: 10px; text-align: right; opacity: .7; }
.tsa-composer { padding: 8px 12px 10px; border-top: 1px solid #e8ecf0; background: #fafbfc; }
.tsa-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.tsa-panel .tsa-composer-input {
  flex: 1; min-height: 40px; max-height: 120px; margin: 0; padding: 9px 12px; border: 1px solid #c9d3de; border-radius: 20px;
  background: #fff; color: #222; font: 14px/1.4 Montserrat, Arial, sans-serif; resize: none; outline: none; box-shadow: none;
}
.tsa-panel .tsa-composer-input:focus { border-color: #1976d2; }
.tsa-panel .tsa-composer-send {
  display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: #1976d2; color: #fff; cursor: pointer;
}
.tsa-panel .tsa-composer-send:hover { background: #1565c0; }
.tsa-composer-send svg { width: 20px; height: 20px; fill: currentColor; }
.tsa-composer-error { margin: 0 0 6px; color: #b71c1c; font-size: 12px; }

/* The site's «наверх» button sat beside Jivo's round button; our wider one would cover it: above ours. */
#scrollToTop.scroll-to-top { right: 22px !important; bottom: 80px !important; }

@media (max-width: 640px) {
  #scrollToTop.scroll-to-top { right: 18px !important; bottom: 78px !important; }
  .tsa-launcher { right: 14px; bottom: 14px; width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .tsa-launcher-text { display: none; }
  .tsa-panel { top: 0; right: 0; bottom: 0; left: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; }
  .tsa-panel .tsa-input, .tsa-panel .tsa-form input[type="text"], .tsa-panel .tsa-form input[type="tel"], .tsa-panel .tsa-form input[type="email"], .tsa-panel .tsa-form textarea, .tsa-panel .tsa-composer-input { font-size: 16px; }
  html.tsa-open .tsa-launcher { display: none; }
  html.tsa-open, html.tsa-open body { overflow: hidden; }
}

@media print {
  .tsa-launcher, .tsa-panel { display: none !important; }
}
