#ts-assistant { --tsa-green: #286b35; --tsa-ink: #17281c; --tsa-muted: #59665d; font: 15px/1.5 Arial, sans-serif; color: var(--tsa-ink); position: relative; z-index: 1099; }
#ts-assistant.tsa-is-open { z-index: 10050; }
.is-page-lock .tsa-launch, .is-cart-open .tsa-launch, .fancybox-active .tsa-launch { visibility: hidden; pointer-events: none; }
@media (max-width: 1199px) {
  /* One compositor animation for both actions, driven by the menu's own state. */
  html.tsa-ready body { --tsa-menu-offset: 0px; --tsa-sku-offset: 0px; }
  html.tsa-ready body.is-page-sticky { --tsa-menu-offset: var(--tsa-menu-height, 0px); }
  html.tsa-ready.is-header-sticky body { --tsa-menu-offset: 0px; }
  html.tsa-ready.is-header-sticky-open body.is-page-sticky { --tsa-menu-offset: var(--tsa-menu-height, 0px); }
  html.tsa-ready.is-sku-compact body { --tsa-sku-offset: var(--tsa-sku-height, 0px); }
  html.tsa-ready .tsa-launch, html.tsa-ready .filter-aside__toggle {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translate3d(0, calc(0px - max(calc(var(--tsa-menu-offset) + var(--tsa-sku-offset)), var(--tsa-cookie-lift, 0px))), 0);
    transition: transform .25s ease;
  }
  html.tsa-ready .tsa-launch { right: 14px; }
  .tsa-ready .js-chat .js-chat-toggle { visibility: hidden; pointer-events: none; }
  .tsa-ready .js-chat .js-chat-offcanvas { display: none; }
}
#ts-assistant *, #ts-assistant *::before, #ts-assistant *::after { box-sizing: border-box; }
#ts-assistant [hidden], #ts-assistant[hidden] { display: none !important; }
#ts-assistant button, #ts-assistant input, #ts-assistant a { font: inherit; }
#ts-assistant button { cursor: pointer; }
#ts-assistant button:disabled { opacity: .55; cursor: wait; }
#ts-assistant button:focus-visible, #ts-assistant a:focus-visible, #ts-assistant [tabindex]:focus-visible { outline: 3px solid #e4ad27; outline-offset: 3px; }
#ts-assistant svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tsa-launch { position: fixed; bottom: 26px; right: 26px; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 12px 20px; border: 0; border-radius: 28px; background: var(--tsa-green); color: #fff; box-shadow: 0 6px 22px #17351d33; }
.tsa-panel { position: fixed; right: 24px; bottom: 24px; width: 410px; max-width: calc(100vw - 32px); height: min(720px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: #f5f7f3; border: 1px solid #d9e1d6; border-radius: 20px; box-shadow: 0 20px 70px #142a2438; overflow: hidden; }
.tsa-header { display: flex; align-items: center; gap: 10px; padding: 17px 14px 15px 18px; flex: none; background: #fff; border-bottom: 1px solid #e1e7dd; }
.tsa-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; }
.tsa-avatar img { display: block; width: 42px; height: 42px; object-fit: contain; }
.tsa-heading { min-width: 0; flex: 1; }
#ts-assistant h2 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 700; }
.tsa-heading p { margin: 3px 0 0; font-size: 12px; color: var(--tsa-muted); }
.tsa-close { flex: none; border: 0; background: transparent; width: 44px; height: 44px; border-radius: 50%; color: var(--tsa-muted); font-size: 30px !important; line-height: 1; }
.tsa-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 15px; background: #fff; border-bottom: 1px solid #e1e7dd; flex: none; font-size: 12px; }
.tsa-progress { color: var(--tsa-muted); }
.tsa-reset { border: 0; background: transparent; color: var(--tsa-green); min-height: 38px; padding: 4px; font-size: 12px !important; text-decoration: underline; text-underline-offset: 3px; }
.tsa-log { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 16px; flex: 1; min-height: 0; scrollbar-width: thin; }
.tsa-message { margin-bottom: 16px; max-width: 100%; }
.tsa-bubble { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; padding: 12px 14px; border-radius: 3px 16px 16px; border: 1px solid #e2e7de; }
.tsa-thinking { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; padding: 15px 17px; margin: 12px 0; color: #286b35; background: #fff; border: 1px solid #cbdcc5; border-radius: 3px 18px 18px; font-size: 14px; font-weight: 600; }
.tsa-thinking-dots { display: flex; gap: 4px; flex: none; }
.tsa-thinking-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tsa-thinking 1.2s ease-in-out infinite; }
.tsa-thinking-dots i:nth-child(2) { animation-delay: .15s; }
.tsa-thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tsa-thinking { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tsa-thinking-dots i { animation: none; opacity: .7; } }
.tsa-message--user { margin-left: 42px; }
.tsa-message--user .tsa-bubble { background: #e5eedf; border-color: #dce7d5; border-radius: 16px 3px 16px 16px; }
.tsa-card { background: #fff; border: 1px solid #dbe4d7; border-radius: 13px; padding: 12px; margin-top: 10px; }
.tsa-card-top { display: flex; gap: 12px; align-items: center; }
.tsa-product-image { width: 76px; height: 76px; object-fit: contain; flex: none; }
.tsa-card-heading { min-width: 0; }
#ts-assistant h3 { margin: 0 0 6px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; font-weight: 600; }
.tsa-price { display: block; font-size: 18px; color: var(--tsa-ink); }
.tsa-facts { margin: 10px 0; padding-left: 18px; font-size: 12px; color: var(--tsa-muted); }
.tsa-delivery { font-size: 12px; margin: 8px 0; color: var(--tsa-green); }
.tsa-product-link { display: block; padding: 11px; border-radius: 8px; text-align: center; background: var(--tsa-green); color: #fff !important; text-decoration: none !important; min-height: 44px; }
.tsa-card-note { margin: 8px 3px; font-size: 11px; color: var(--tsa-muted); }
.tsa-bottom { background: #fff; padding: 0 14px 10px; border-top: 1px solid #e1e7dd; flex: none; }
.tsa-status { font-size: 12px; color: #7b5019; padding-top: 8px; overflow-wrap: anywhere; }
.tsa-status:empty { display: none; }
.tsa-choices { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 10px; }
.tsa-choice { min-height: 44px; padding: 8px 12px; border: 1px solid #bfd0b7; background: #fff; color: #255b30; border-radius: 9px; font-size: 13px !important; }
.tsa-choice:hover, .tsa-close:hover { background: #eef4e9; }
.tsa-contact { display: inline-block; font-size: 12px !important; color: var(--tsa-muted) !important; padding: 10px 2px; text-underline-offset: 3px; }
.tsa-form { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid #bdcaba; border-radius: 12px; background: #fff; margin: 0; }
#ts-assistant .tsa-form:focus-within { outline: 2px solid var(--tsa-green); outline-offset: 2px; border-color: var(--tsa-green); }
#ts-assistant .tsa-form input:focus, #ts-assistant .tsa-form input:focus-visible { outline: none; box-shadow: none; }
#ts-assistant input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--tsa-ink); outline-offset: 0; height: 42px; font-size: 16px; padding: 4px 0; margin: 0; box-shadow: none; }
.tsa-form button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 9px; background: var(--tsa-green); color: #fff; display: grid; place-items: center; }
.tsa-note { margin: 8px 0 0; font-size: 10px; color: var(--tsa-muted); text-align: center; }
.tsa-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .tsa-launch { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 48px; padding: 10px 15px; font-size: 13px !important; }
}
@media (max-width: 600px), (max-width: 1199px) and (pointer: coarse) {
  html.tsa-chat-open { overflow: hidden; overscroll-behavior: none; }
  /* Cover the layout viewport too: Safari toolbars can reveal space below visualViewport. */
  #ts-assistant.tsa-is-open { position: fixed; inset: 0; width: 100%; height: 100%; background: #f5f7f3; overflow: hidden; overscroll-behavior: none; }
  .tsa-panel { top: var(--tsa-top, 0px); right: 0; bottom: auto; width: 100%; max-width: 100%; height: var(--tsa-height, 100dvh); border: 0; border-radius: 0; }
  .tsa-header { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 14px; }
  .tsa-bottom { padding: 0 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .tsa-log { padding: 14px 12px; }
  .tsa-contact { padding: 7px 2px; }
}
/* Use visual viewport height, not a height media query that ignores the iOS keyboard. */
#ts-assistant.tsa-compact .tsa-heading p, #ts-assistant.tsa-compact .tsa-note,
#ts-assistant.tsa-compact .tsa-toolbar, #ts-assistant.tsa-compact .tsa-summary { display: none; }
#ts-assistant.tsa-compact .tsa-header { padding: 5px 10px; }
#ts-assistant.tsa-compact .tsa-bottom { padding: 0 12px 8px; }
#ts-assistant.tsa-compact .tsa-log { padding: 10px 12px; }
.tsa-summary { margin: 0; padding: 7px 15px; border-bottom: 1px solid #e1e7dd; background: #fff; font-size: 12px; color: var(--tsa-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: none; }
#ts-assistant .tsa-log .tsa-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 2px 0 6px; max-height: none; overflow: visible; }
#ts-assistant .tsa-choice { white-space: normal; line-height: 1.35; text-align: left; font-weight: 600; }
#ts-assistant .tsa-choice--contact { grid-column: 1 / -1; background: var(--tsa-green); color: #fff; border-color: var(--tsa-green); text-align: center; font-weight: 600; }
.tsa-contact-card { padding: 14px; margin-top: 10px; background: #fff; border: 1px solid #bfd0b7; border-radius: 13px; display: grid; gap: 8px; }
#ts-assistant .tsa-contact-action { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px; border-radius: 8px; background: #e9f1e4; color: #255b30; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.tsa-bottom .tsa-form { margin-top: 10px; }

.tsa-confirm { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 20px; background: #17281c66; overflow-y: auto; }
.tsa-confirm-card { width: 100%; max-width: 350px; max-height: 100%; overflow-y: auto; padding: 24px 20px; border: 1px solid #d9e1d6; border-radius: 18px; background: #fff; box-shadow: 0 12px 36px #142a2430; }
.tsa-confirm-card p { margin: 12px 0 20px; color: var(--tsa-muted); font-size: 14px; }
.tsa-confirm-actions { display: grid; gap: 10px; }
.tsa-confirm-actions button { min-height: 44px; padding: 10px 12px; border: 1px solid #bfd0b7; border-radius: 9px; background: #fff; color: var(--tsa-green); white-space: normal; }
.tsa-confirm-actions .tsa-confirm-reset { background: var(--tsa-green); border-color: var(--tsa-green); color: #fff; }
.tsa-confirm-cancel:hover { background: #eef4e9; }

/* Keep catalog actions separate on the theme's mobile/tablet breakpoint. */
@media (max-width: 1199px) {
  html .filter-aside__close { display: flex; }
  html .filter-aside__more { display: block; }
  html .filter-aside__toggle {
    left: 14px; right: auto; width: auto; max-width: calc(100vw - 28px);
    height: 54px; min-height: 54px; padding: 12px 20px; gap: 10px;
    border: 0; border-radius: 28px; background: #2167c9; color: #fff;
    font: 15px/1.5 Arial, sans-serif; box-shadow: 0 6px 22px #173b7133;
  }
  html .filter-aside__toggle::before {
    content: ''; width: 24px; height: 24px; flex: none;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6h4m4 0h8M4 12h10m4 0h2M4 18h2m4 0h10M8 3v6m6 0v6M6 15v6'/%3E%3C/svg%3E");
  }
  html .filter-aside__toggle .filter-aside__counter,
  html .filter-aside__toggle svg.icon-arrow-right { display: none; }
  html .filter-aside__toggle:hover, html .filter-aside__toggle:active { background: #1958b0; }
  .is-page-lock .filter-aside__toggle, .is-cart-open .filter-aside__toggle,
  .fancybox-active .filter-aside__toggle, .tsa-chat-open .filter-aside__toggle { visibility: hidden; pointer-events: none; }
}
@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  html.tsa-ready .tsa-launch, html.tsa-ready .filter-aside__toggle, html.tsa-ready .header__sticky { transition: none; }
}
@media (max-width: 600px) {
  html .filter-aside__toggle { height: 48px; min-height: 48px; padding: 10px 15px; font-size: 13px; }
}
@media (max-width: 359px) {
  html .filter-aside__toggle::before { display: none; }
}
