/* Developed by w3bk1n9 */
.tu-help-chat {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 1100;
  font-family: inherit;
}

.tu-help-chat__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0b5f49, #16a085);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  font-weight: 700;
  cursor: pointer;
}

.tu-help-chat__button-icon {
  font-size: 22px;
  line-height: 1;
}

.tu-help-chat__panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(370px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
}

.tu-help-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #064e3b, #0f766e);
}

.tu-help-chat__header strong {
  display: block;
  font-size: 16px;
}

.tu-help-chat__header small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  line-height: 1.35;
}

.tu-help-chat__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.tu-help-chat__messages {
  flex: 1;
  min-height: 260px;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
}

.tu-help-chat__msg {
  display: flex;
  margin-bottom: 12px;
}

.tu-help-chat__msg--user {
  justify-content: flex-end;
}

.tu-help-chat__bubble {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.48;
}

.tu-help-chat__msg--user .tu-help-chat__bubble {
  color: #fff;
  background: #0f766e;
  border-bottom-right-radius: 5px;
}

.tu-help-chat__msg--bot .tu-help-chat__bubble {
  border-bottom-left-radius: 5px;
}

.tu-help-chat__links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tu-help-chat__links a,
.tu-help-chat__suggestions button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  color: #0f766e;
  background: #ecfdf5;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tu-help-chat__suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.tu-help-chat__suggestions button {
  flex: 0 0 auto;
}

.tu-help-chat__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.tu-help-chat__form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 11px 14px;
  outline: none;
}

.tu-help-chat__form input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tu-help-chat__form button {
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  color: #fff;
  background: #0f766e;
  font-weight: 800;
  cursor: pointer;
}

.tu-help-chat__typing .tu-help-chat__bubble::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 10px;
  margin-left: 4px;
  vertical-align: middle;
  background: radial-gradient(circle, #64748b 2px, transparent 3px) 0 50% / 8px 8px repeat-x;
  animation: tu-chat-dots 1s linear infinite;
}

@keyframes tu-chat-dots {
  from { opacity: 0.35; }
  50% { opacity: 1; }
  to { opacity: 0.35; }
}

@media (max-width: 520px) {
  .tu-help-chat {
    right: 14px;
    bottom: 14px;
  }
  .tu-help-chat__button-text {
    display: none;
  }
  .tu-help-chat__button {
    width: 56px;
    min-height: 56px;
    justify-content: center;
    padding: 0;
  }
  .tu-help-chat__panel {
    right: -2px;
    bottom: 66px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }
}

/* v1.0.33: chatbot starts closed and becomes fully responsive */
.tu-help-chat__panel[hidden] {
  display: none !important;
}

body.tu-help-chat-open .tu-help-chat__button {
  transform: translateY(-2px);
}

.tu-help-chat__panel,
.tu-help-chat__messages,
.tu-help-chat__form,
.tu-help-chat__suggestions {
  max-width: 100%;
}

.tu-help-chat__form input {
  font-size: 16px;
}

@media (max-width: 768px) {
  .tu-help-chat {
    right: 16px;
    bottom: 16px;
  }
  .tu-help-chat__panel {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 82px;
    width: auto;
    max-height: calc(100dvh - 104px);
    border-radius: 20px;
  }
  .tu-help-chat__messages {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .tu-help-chat {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .tu-help-chat__button {
    width: 56px;
    min-height: 56px;
    justify-content: center;
    padding: 0;
  }
  .tu-help-chat__button-text {
    display: none;
  }
  .tu-help-chat__panel {
    left: 10px;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 96px - env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .tu-help-chat__header {
    padding: 13px 14px;
  }
  .tu-help-chat__messages {
    min-height: 190px;
    padding: 13px;
  }
  .tu-help-chat__bubble {
    max-width: 92%;
    font-size: 13.5px;
  }
  .tu-help-chat__suggestions {
    padding: 9px 10px;
  }
  .tu-help-chat__form {
    gap: 7px;
    padding: 10px;
  }
  .tu-help-chat__form button {
    min-width: 58px;
    padding: 0 12px;
  }
}

@media (max-width: 360px) {
  .tu-help-chat__panel {
    left: 6px;
    right: 6px;
  }
  .tu-help-chat__header small {
    display: none;
  }
  .tu-help-chat__form {
    flex-direction: column;
  }
  .tu-help-chat__form button {
    min-height: 42px;
  }
}


/* v1.0.34: polished mobile chatbot layout - strong overrides for all phone widths */
.tu-help-chat,
.tu-help-chat * {
  box-sizing: border-box;
}

.tu-help-chat {
  max-width: 100vw !important;
}

.tu-help-chat__panel {
  width: 390px !important;
  max-width: min(390px, calc(100vw - 28px)) !important;
  min-width: 320px;
}

.tu-help-chat:not(.tu-help-chat--open) .tu-help-chat__panel,
.tu-help-chat__panel[hidden] {
  display: none !important;
}

.tu-help-chat.tu-help-chat--open .tu-help-chat__panel {
  display: flex !important;
}

.tu-help-chat__header > div {
  min-width: 0;
}

.tu-help-chat__header strong,
.tu-help-chat__header small,
.tu-help-chat__bubble,
.tu-help-chat__suggestions button,
.tu-help-chat__form input,
.tu-help-chat__form button {
  overflow-wrap: anywhere;
  word-break: normal;
}

.tu-help-chat__messages {
  min-height: 0 !important;
  overflow-x: hidden !important;
}

.tu-help-chat__bubble {
  max-width: 84%;
  overflow-x: hidden;
}

.tu-help-chat__suggestions {
  overflow-x: hidden !important;
  flex-wrap: wrap;
}

.tu-help-chat__form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.tu-help-chat__form input {
  width: 100% !important;
}

.tu-help-chat__form button {
  min-height: 44px;
  min-width: 68px;
}

@media (max-width: 640px) {
  .tu-help-chat {
    right: 14px !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    left: auto !important;
    width: auto !important;
    z-index: 3000 !important;
  }

  .tu-help-chat__button {
    width: auto !important;
    min-width: 104px !important;
    min-height: 52px !important;
    padding: 0 18px !important;
    justify-content: center !important;
    border-radius: 999px !important;
  }

  .tu-help-chat__button-text {
    display: inline !important;
  }

  .tu-help-chat__panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: min(560px, calc(100dvh - 104px - env(safe-area-inset-bottom))) !important;
    max-height: calc(100dvh - 104px - env(safe-area-inset-bottom)) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  .tu-help-chat__header {
    flex: 0 0 auto;
    min-height: 72px;
    padding: 14px 16px !important;
  }

  .tu-help-chat__header strong {
    font-size: 17px !important;
    line-height: 1.2;
  }

  .tu-help-chat__header small {
    max-width: 260px;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .tu-help-chat__close {
    flex: 0 0 34px;
  }

  .tu-help-chat__messages {
    flex: 1 1 auto;
    min-height: 0 !important;
    padding: 14px !important;
  }

  .tu-help-chat__bubble {
    max-width: 86% !important;
    padding: 11px 13px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .tu-help-chat__suggestions {
    flex: 0 0 auto;
    gap: 7px !important;
    padding: 10px 12px !important;
    max-height: 96px;
    overflow-y: auto !important;
  }

  .tu-help-chat__suggestions button,
  .tu-help-chat__links a {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .tu-help-chat__form {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) 74px !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  .tu-help-chat__form input {
    min-width: 0 !important;
    min-height: 44px !important;
    border-radius: 999px !important;
    font-size: 16px !important;
    padding: 10px 13px !important;
  }

  .tu-help-chat__form button {
    min-width: 74px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 380px) {
  .tu-help-chat {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }

  .tu-help-chat__button {
    min-width: 92px !important;
    min-height: 50px !important;
    padding: 0 14px !important;
  }

  .tu-help-chat__panel {
    left: 8px !important;
    right: 8px !important;
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 16px) !important;
    height: min(540px, calc(100dvh - 90px - env(safe-area-inset-bottom))) !important;
    max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)) !important;
    border-radius: 18px !important;
  }

  .tu-help-chat__header {
    min-height: 66px;
    padding: 12px 13px !important;
  }

  .tu-help-chat__header strong {
    font-size: 16px !important;
  }

  .tu-help-chat__header small {
    font-size: 11px !important;
    max-width: 220px;
  }

  .tu-help-chat__messages {
    padding: 12px !important;
  }

  .tu-help-chat__bubble {
    max-width: 88% !important;
    font-size: 13.5px !important;
  }

  .tu-help-chat__form {
    grid-template-columns: minmax(0, 1fr) 66px !important;
    padding: 10px !important;
  }

  .tu-help-chat__form button {
    min-width: 66px !important;
  }
}

@media (max-height: 560px) and (max-width: 640px) {
  .tu-help-chat__panel {
    height: calc(100dvh - 88px - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom)) !important;
  }
  .tu-help-chat__header small {
    display: none !important;
  }
  .tu-help-chat__suggestions {
    display: none !important;
  }
}
