/* Rob Helpford — floating chat widget (portaled to body) */

:root {
  --tt-helpford-bottom: 16px;
  --tt-chrome-z-helpford: 10030;
  /* Above sticky site header (10050); below mini-cart drawer (110010). */
  --tt-chrome-z-helpford-open: 109000;
}

#tt-helpford-root.tt-helpford {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  left: auto;
  bottom: var(--tt-helpford-bottom, 16px);
  z-index: var(--tt-chrome-z-helpford);
  font-family: inherit;
  pointer-events: none;
}

#tt-helpford-root.tt-helpford.tt-helpford-open {
  z-index: var(--tt-chrome-z-helpford-open);
}

#tt-helpford-root.tt-helpford--hidden-chrome {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

#tt-helpford-root .tt-helpford__fab,
#tt-helpford-root .tt-helpford__panel,
#tt-helpford-root .tt-helpford__nudge {
  pointer-events: auto;
}

#tt-helpford-root .tt-helpford__fab {
  width: 48px;
  height: 48px;
  padding: 4px;
  border: none;
  border-radius: 50%;
  background: var(--tt-chrome-white, #fff);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38), 0 1px 4px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
  box-sizing: border-box;
  transform-origin: bottom right;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tt-helpford-root .tt-helpford__fab:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.44), 0 2px 6px rgba(0, 0, 0, 0.24);
}

#tt-helpford-root .tt-helpford__nudge {
  position: absolute;
  right: 56px;
  left: auto;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  max-width: 140px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--e-global-color-secondary, var(--tt-chrome-secondary, #ff5a00));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255, 90, 0, 0.28);
  border: 1px solid transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  pointer-events: none;
  user-select: none;
}

#tt-helpford-root.tt-helpford-nudge-on .tt-helpford__nudge {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

#tt-helpford-root:not(.tt-helpford-nudge-on) .tt-helpford__nudge {
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

#tt-helpford-root.tt-helpford-open .tt-helpford__nudge,
#tt-helpford-root.tt-helpford--hidden-chrome .tt-helpford__nudge {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#tt-helpford-root.tt-helpford-open .tt-helpford__fab {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.85);
  pointer-events: none !important;
}

#tt-helpford-root .tt-helpford__panel {
  position: absolute;
  right: 0;
  left: auto;
  bottom: 0;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - var(--tt-helpford-bottom) - 24px));
  min-height: 360px;
  display: flex;
  flex-direction: column;
  background: var(--tt-chrome-white, #fff);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.08));
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.24s;
}

#tt-helpford-root.tt-helpford-open .tt-helpford__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#tt-helpford-root .tt-helpford__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 14px 22px;
  background: var(--tt-chrome-primary, #1b1b1b);
  color: var(--tt-chrome-white, #fff);
  border-radius: 20px 20px 0 0;
}

#tt-helpford-root .tt-helpford__head-avatar {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff;
}

#tt-helpford-root .tt-helpford__head-text {
  flex: 1;
  min-width: 0;
}

#tt-helpford-root .tt-helpford__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

#tt-helpford-root .tt-helpford__subtitle {
  display: block;
  font-size: 12px;
  opacity: 0.75;
}

#tt-helpford-root .tt-helpford__fab-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

#tt-helpford-root .tt-helpford__head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#tt-helpford-root .tt-helpford__expand,
#tt-helpford-root .tt-helpford__close,
#tt-helpford-root .tt-helpford__head-cart {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: var(--tt-chrome-white, #fff);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 0.15s ease, background 0.15s ease;
}

#tt-helpford-root .tt-helpford__head-cart {
  display: none;
}

#tt-helpford-root .tt-helpford__head-cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

#tt-helpford-root .tt-helpford__head-cart-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--e-global-color-secondary, var(--tt-chrome-secondary, #ff5a00));
  color: #fff !important;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}

#tt-helpford-root .tt-helpford__head-cart-badge.is-empty {
  display: none;
}

#tt-helpford-root .tt-helpford__close {
  font-size: 22px;
  line-height: 1;
}

#tt-helpford-root .tt-helpford__close-x {
  display: block;
  margin-top: -2px;
}

#tt-helpford-root .tt-helpford__expand:hover,
#tt-helpford-root .tt-helpford__close:hover,
#tt-helpford-root .tt-helpford__head-cart:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.08);
}

#tt-helpford-root .tt-helpford__expand-icon {
  display: block;
}

#tt-helpford-root .tt-helpford__expand-icon[hidden] {
  display: none !important;
}

/* Desktop expanded: tall panel below site header (not over chrome), same width */
@media (min-width: 1025px) {
  #tt-helpford-root.tt-helpford--expanded.tt-helpford-open {
    z-index: var(--tt-chrome-z-header-under, 10040);
  }

  #tt-helpford-root.tt-helpford--expanded .tt-helpford__panel {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    left: auto;
    top: var(--tt-helpford-panel-top, var(--tt-overlay-top, 72px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px), var(--tt-helpford-bottom, 16px));
    width: min(380px, calc(100vw - 24px));
    height: auto;
    min-height: 200px;
    max-height: none;
  }
}

/* Compact expanded: true fullscreen */
@media (max-width: 1024px) {
  #tt-helpford-root.tt-helpford--expanded .tt-helpford__panel {
    position: fixed;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }

  #tt-helpford-root.tt-helpford--expanded.tt-helpford-open .tt-helpford__head {
    border-radius: 0;
    padding-top: max(14px, env(safe-area-inset-top, 0px));
  }
}

#tt-helpford-root .tt-helpford__thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--tt-chrome-surface, #f7f6f5);
  -webkit-overflow-scrolling: touch;
}

#tt-helpford-root .tt-helpford__turn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  flex-shrink: 0;
}

#tt-helpford-root .tt-helpford__turn--user {
  align-items: flex-end;
  margin-bottom: 2px;
}

#tt-helpford-root .tt-helpford__turn--bot .tt-helpford__cards {
  margin-top: 2px;
}

#tt-helpford-root .tt-helpford__msg {
  display: flex;
  gap: 8px;
  max-width: 92%;
}

#tt-helpford-root .tt-helpford__msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

#tt-helpford-root .tt-helpford__msg--bot {
  align-self: flex-start;
}

#tt-helpford-root .tt-helpford__msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}

#tt-helpford-root .tt-helpford__msg-body {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

#tt-helpford-root .tt-helpford__msg--user .tt-helpford__msg-body {
  background: var(--tt-chrome-secondary, #ff5a00);
  color: #fff;
  border-bottom-right-radius: 4px;
}

#tt-helpford-root .tt-helpford__msg--bot .tt-helpford__msg-body {
  background: #fff;
  color: var(--tt-chrome-primary, #1b1b1b);
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.08));
  border-bottom-left-radius: 4px;
}

#tt-helpford-root .tt-helpford__msg-body--with-foot {
  padding: 0;
  overflow: hidden;
}

#tt-helpford-root .tt-helpford__msg-main {
  padding: 10px 12px;
}

#tt-helpford-root .tt-helpford__msg-foot {
  padding: 8px 12px 9px;
  font-size: 12px;
  line-height: 1.45;
  background: color-mix(in srgb, var(--tt-chrome-secondary, #ff5a00) 5%, #fff);
  border-top: 1px solid color-mix(in srgb, var(--tt-chrome-secondary, #ff5a00) 14%, rgba(0, 0, 0, 0.06));
  color: color-mix(in srgb, var(--tt-chrome-primary, #1b1b1b) 82%, #666);
}

/* Tray hint bar — inline Add / Buy / number pills */
#tt-helpford-root .tt-helpford__msg-foot .tt-helpford__inline-btn {
  display: inline-block;
  margin: 0 1px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: baseline;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

#tt-helpford-root .tt-helpford__msg-foot .tt-helpford__inline-btn--add {
  color: #fff;
  background: var(--tt-chrome-primary, #1b1b1b);
}

#tt-helpford-root .tt-helpford__msg-foot .tt-helpford__inline-btn--buy {
  color: #fff;
  background: var(--e-global-color-secondary, #ff5a00);
}

#tt-helpford-root .tt-helpford__msg-foot .tt-helpford__inline-pick {
  display: inline-block;
  margin: 0 1px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.45;
  vertical-align: baseline;
  color: #fff;
  background: var(--tt-chrome-secondary, #ff5a00);
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

#tt-helpford-root .tt-helpford__msg-foot .tt-helpford__inline-hint {
  font-weight: 600;
  color: color-mix(in srgb, var(--tt-chrome-primary, #1b1b1b) 82%, var(--tt-chrome-secondary, #ff5a00));
}

#tt-helpford-root .tt-helpford__msg--serious .tt-helpford__msg-body {
  background: #fff;
  border-color: color-mix(in srgb, var(--tt-chrome-primary) 20%, transparent);
}

#tt-helpford-root .tt-helpford__cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  width: 100%;
  max-width: 92%;
  align-self: flex-start;
}

#tt-helpford-root .tt-helpford__card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
}

#tt-helpford-root .tt-helpford__card--row,
#tt-helpford-root .tt-helpford__card--product {
  align-items: flex-start;
  padding: 8px 10px;
  gap: 10px;
}

#tt-helpford-root .tt-helpford__card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 16px;
  background: var(--tt-chrome-surface, #f7f6f5);
  color: var(--tt-chrome-primary, #1b1b1b);
}

#tt-helpford-root .tt-helpford__card-icon--nav {
  position: relative;
}

#tt-helpford-root .tt-helpford__card-icon--nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2.5px solid var(--tt-chrome-secondary, #ff5a00);
  border-bottom: 2.5px solid var(--tt-chrome-secondary, #ff5a00);
  transform: translate(-50%, -50%) rotate(-45deg);
}

#tt-helpford-root .tt-helpford__card-go {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-chrome-secondary, #ff5a00);
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

#tt-helpford-root .tt-helpford__card--nav:hover .tt-helpford__card-go,
#tt-helpford-root .tt-helpford__card--row:hover {
  border-color: var(--tt-chrome-secondary, #ff5a00);
}

#tt-helpford-root .tt-helpford__card-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--tt-chrome-surface, #f7f6f5);
}

#tt-helpford-root .tt-helpford__card-img-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  overflow: visible;
}

#tt-helpford-root .tt-helpford__card-img-wrap .tt-helpford__card-img {
  width: 100%;
  height: 100%;
}

#tt-helpford-root .tt-helpford__card--featured {
  border-color: color-mix(in srgb, var(--tt-chrome-secondary, #ff5a00) 42%, var(--tt-chrome-line, rgba(0, 0, 0, 0.08)));
}

#tt-helpford-root .tt-helpford__card-feat {
  position: absolute;
  top: 3px;
  right: 3px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--tt-chrome-secondary, #ff5a00);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  pointer-events: none;
}

#tt-helpford-root .tt-helpford__card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#tt-helpford-root .tt-helpford__card-sub {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.3;
}

#tt-helpford-root .tt-helpford__card-excerpt {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#tt-helpford-root .tt-helpford__card--product .tt-helpford__card-price {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
}

#tt-helpford-root .tt-helpford__card:hover {
  border-color: var(--tt-chrome-secondary, #ff5a00);
}

#tt-helpford-root .tt-helpford__card--with-add {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(27, 27, 27, 0.08);
  border-radius: 10px;
  background: #fff;
}

#tt-helpford-root .tt-helpford__card-pick {
  position: absolute;
  top: -7px;
  left: -5px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  background: #16a34a;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  box-sizing: border-box;
}
#tt-helpford-root .tt-helpford__card--with-add .tt-helpford__card-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
#tt-helpford-root .tt-helpford__card-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
#tt-helpford-root .tt-helpford__card-add,
#tt-helpford-root .tt-helpford__card-buy {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
#tt-helpford-root .tt-helpford__card-add {
  color: #fff;
  background: var(--tt-chrome-primary, #1b1b1b);
}
#tt-helpford-root .tt-helpford__card-add.is-in-cart {
  color: #fff;
  background: #16a34a;
  border: 1px solid #15803d;
  box-shadow: none;
}
#tt-helpford-root .tt-helpford__card-add.is-in-cart:hover {
  filter: none;
  background: #15803d;
}
#tt-helpford-root .tt-helpford__card-buy {
  color: #fff;
  background: var(--e-global-color-secondary, #FF5A00);
}
#tt-helpford-root .tt-helpford__card-add:hover,
#tt-helpford-root .tt-helpford__card-buy:hover {
  filter: brightness(0.95);
}
#tt-helpford-root .tt-helpford__card-add:disabled,
#tt-helpford-root .tt-helpford__card-buy:disabled {
  opacity: 0.6;
  cursor: wait;
}

#tt-helpford-root .tt-helpford__card-title {
  font-weight: 600;
}

#tt-helpford-root .tt-helpford__card-price {
  color: var(--tt-chrome-secondary, #ff5a00);
  white-space: nowrap;
}

#tt-helpford-root .tt-helpford__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

#tt-helpford-root .tt-helpford__chip {
  padding: 6px 10px;
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--tt-chrome-primary, #1b1b1b);
}

#tt-helpford-root .tt-helpford__chip:hover {
  border-color: var(--tt-chrome-secondary, #ff5a00);
  color: var(--tt-chrome-secondary, #ff5a00);
}

#tt-helpford-root .tt-helpford__typing {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  align-self: flex-start;
  max-width: 92%;
  padding: 2px 0;
}

#tt-helpford-root .tt-helpford__typing-bubble {
  padding: 12px 16px;
  background: var(--tt-chrome-white, #fff);
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.08));
  border-radius: 16px 16px 16px 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

#tt-helpford-root .tt-helpford__typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 10px;
}

#tt-helpford-root .tt-helpford__typing-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tt-chrome-muted, #94a3b8);
  animation: tt-helpford-dot 1.1s ease-in-out infinite;
}

#tt-helpford-root .tt-helpford__typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

#tt-helpford-root .tt-helpford__typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes tt-helpford-dot {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  35% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

#tt-helpford-root .tt-helpford__composer {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  padding: 12px;
  border-top: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.08));
  background: #fff;
}

#tt-helpford-root .tt-helpford__input {
  flex: 1;
  min-width: 0;
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.12));
  border-radius: 24px;
  padding: 12px 16px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  box-sizing: border-box;
  background: var(--tt-chrome-surface, #f7f6f5);
  color: var(--tt-chrome-primary, #1b1b1b);
  scrollbar-width: none;
}

#tt-helpford-root .tt-helpford__input::-webkit-scrollbar {
  display: none;
}

#tt-helpford-root .tt-helpford__input:focus {
  outline: 2px solid color-mix(in srgb, var(--tt-chrome-secondary, #ff5a00) 35%, transparent);
  outline-offset: 0;
  border-color: var(--tt-chrome-secondary, #ff5a00);
  background: #fff;
}

#tt-helpford-root .tt-helpford__send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--tt-chrome-secondary, #ff5a00);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

#tt-helpford-root .tt-helpford__handoff {
  background: #fff;
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#tt-helpford-root .tt-helpford__handoff-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

#tt-helpford-root .tt-helpford__handoff-email,
#tt-helpford-root .tt-helpford__handoff-msg {
  width: 100%;
  border: 1px solid var(--tt-chrome-line, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
}

#tt-helpford-root .tt-helpford__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

#tt-helpford-root .tt-helpford__handoff-btn {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--tt-chrome-primary, #1b1b1b);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1024px) {
  #tt-helpford-root.tt-helpford {
    right: max(8px, env(safe-area-inset-right, 0px));
    left: auto;
    width: auto;
  }

  #tt-helpford-root .tt-helpford__fab {
    position: fixed;
    right: max(8px, env(safe-area-inset-right, 0px));
    left: auto;
    bottom: var(--tt-helpford-bottom, 16px);
  }

  /* Nudge opens to the LEFT of the bottom-right FAB (not above it). */
  #tt-helpford-root .tt-helpford__nudge {
    position: fixed;
    right: calc(max(8px, env(safe-area-inset-right, 0px)) + 48px + 8px);
    left: auto;
    bottom: calc(var(--tt-helpford-bottom, 16px) + 10px);
    max-width: min(200px, calc(100vw - 80px));
    font-size: 11px;
    padding: 6px 10px;
    white-space: nowrap;
    text-align: left;
    line-height: 1.25;
    z-index: 1;
  }

  #tt-helpford-root .tt-helpford__fab {
    z-index: 2;
  }

  #tt-helpford-root .tt-helpford__head-cart {
    display: inline-flex;
  }

  #tt-helpford-root .tt-helpford__panel {
    position: fixed;
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: var(--tt-helpford-bottom, 16px);
    width: auto;
    max-width: none;
    height: min(72vh, calc(100dvh - var(--tt-helpford-bottom) - 16px));
    min-height: 300px;
    border-radius: 18px;
  }

  /* Peek: bottom sheet — shop stays visible above the panel. */
  #tt-helpford-root.tt-helpford--peek.tt-helpford-open .tt-helpford__panel {
    top: auto;
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px), var(--tt-helpford-bottom, 16px));
    width: auto;
    height: min(58vh, calc(100dvh - var(--tt-helpford-bottom) - 72px));
    min-height: 280px;
    max-height: 58vh;
    border-radius: 18px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22);
  }

  #tt-helpford-root.tt-helpford--peek.tt-helpford-open .tt-helpford__head {
    border-radius: 18px 18px 0 0;
    padding-top: 14px;
  }

  /* Expanded: near-fullscreen on compact (not peek). */
  #tt-helpford-root.tt-helpford--expanded.tt-helpford-open .tt-helpford__panel {
    top: max(8px, env(safe-area-inset-top, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px), var(--tt-helpford-bottom, 16px));
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 18px;
  }

  #tt-helpford-root.tt-helpford--expanded.tt-helpford-open .tt-helpford__head {
    border-radius: 18px 18px 0 0;
    padding-top: 14px;
  }

  html.tt-helpford-open.tt-helpford-expanded body {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  #tt-helpford-root .tt-helpford__card-title {
    font-size: 12px;
    line-height: 1.3;
  }

  #tt-helpford-root .tt-helpford__card-add,
  #tt-helpford-root .tt-helpford__card-buy {
    font-size: 11px;
    padding: 7px 6px;
  }

  #tt-helpford-root .tt-helpford__card-excerpt {
    -webkit-line-clamp: 1;
  }

  #tt-helpford-root .tt-helpford__chips {
    flex-wrap: wrap;
  }

  #tt-helpford-root .tt-helpford__chip {
    font-size: 12px;
    padding: 7px 10px;
  }

  #tt-helpford-root .tt-helpford__composer {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  #tt-helpford-root .tt-helpford__fab,
  #tt-helpford-root .tt-helpford__panel,
  #tt-helpford-root .tt-helpford__close,
  #tt-helpford-root .tt-helpford__typing-dots span,
  #tt-helpford-root .tt-helpford__nudge {
    transition: none !important;
    animation: none !important;
  }
}

/* Account / seller dash: stay bottom-right so seller Menu FAB (bottom-left) stays clear. */
body.td-vendor-dashboard-page #tt-helpford-root.tt-helpford--account,
body.td-public-my-account #tt-helpford-root.tt-helpford--account,
body.dokan-dashboard #tt-helpford-root.tt-helpford--account {
  right: max(12px, env(safe-area-inset-right, 0px));
  left: auto;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1279px) {
  body.td-vendor-dashboard-page #tt-helpford-root.tt-helpford--account,
  body.dokan-dashboard #tt-helpford-root.tt-helpford--account {
    /* Clear seller Menu FAB (~56px) on the opposite corner; keep right edge. */
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
}
