/* Chat launcher sits above .whatsapp-fab. WhatsApp: right 32 / bottom 32 / 56px; ≤767 right 12 bottom 12; ≤575 52px. Gap 12px. */
.tbl-dock,
.tbl-panel {
  font-family: "Pliant", sans-serif;
  color: #0E0D22;
}

.tbl-dock {
  position: fixed;
  right: 32px;
  bottom: 100px;
  z-index: 730;
  width: 56px;
  height: 56px;
}

.tbl-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #DDD9FF;
  box-shadow: 0 8px 24px rgba(14, 13, 34, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tbl-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(14, 13, 34, 0.24);
}

.tbl-btn:focus-visible {
  outline: 2px solid #4B34F6;
  outline-offset: 3px;
}

/* Site critical CSS clears button shadows on touch. Keep the launcher shadow. */
@media (hover: none), (pointer: coarse) {
  .tbl-dock > button.tbl-btn,
  .tbl-dock > button.tbl-label {
    box-shadow: 0 8px 24px rgba(14, 13, 34, 0.16) !important;
  }
}

.tbl-mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.tbl-label {
  position: absolute;
  right: calc(100% + 12px);
  left: auto;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  margin: 0;
  max-width: min(240px, calc(100vw - 160px));
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  background: #FFFFFF;
  color: #0E0D22;
  box-shadow: 0 8px 24px rgba(14, 13, 34, 0.16);
  font-family: "Pliant", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tbl-label::before {
  content: "";
  position: absolute;
  right: -6px;
  left: auto;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
  box-shadow: 3px -3px 6px rgba(14, 13, 34, 0.04);
}

.tbl-label.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.tbl-panel {
  position: fixed;
  right: 32px;
  bottom: 168px;
  z-index: 740;
  width: min(400px, calc(100vw - 64px));
  height: min(640px, calc(100vh - 140px));
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(14, 13, 34, 0.12);
  overflow: hidden;
}

.tbl-panel[hidden] {
  display: none !important;
}

.tbl-panel:not([hidden]) ~ .tbl-dock {
  visibility: hidden;
  pointer-events: none;
}

.tbl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 16px 18px;
  border-bottom: 1px solid rgba(14, 13, 34, 0.08);
}

.tbl-head-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tbl-head h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: #0E0D22;
}

.tbl-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #0E0D22;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tbl-close:hover {
  background: #DDD9FF;
}

.tbl-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F6F5FA;
}

.tbl-row { display: flex; }
.tbl-row--user { justify-content: flex-end; }

.tbl-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

.tbl-row--bot .tbl-bubble {
  background: #DDD9FF;
  color: #0E0D22;
  border-bottom-left-radius: 6px;
}

.tbl-row--user .tbl-bubble {
  background: #0E0D22;
  color: #FFFFFF;
  border-bottom-right-radius: 6px;
}

.tbl-bubble p { margin: 0; white-space: pre-wrap; }

.tbl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tbl-chips button {
  border: 1px solid rgba(14, 13, 34, 0.08);
  background: #FFFFFF;
  color: #0E0D22;
  border-radius: 9999px;
  padding: 8px 14px;
  font: 500 13px/1.3 "Pliant", sans-serif;
  cursor: pointer;
  text-align: left;
}

.tbl-chips button:hover {
  border-color: #DDD9FF;
  background: #F7F6FF;
}

.tbl-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tbl-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(14, 13, 34, 0.08);
  border-radius: 18px;
  background: #FFFFFF;
}

.tbl-card img,
.tbl-card-ph {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: contain;
  background: #F6F5FA;
}

.tbl-card-ph { display: block; }

.tbl-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.3;
}

.tbl-card p {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(14, 13, 34, 0.56);
}

.tbl-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.tbl-link,
.tbl-more {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: #5A5968;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tbl-mark-badge {
  display: inline-flex;
  width: 32px;
  height: 32px;
}

.tbl-mark-badge img {
  width: 32px;
  height: 32px;
  display: block;
}

.tbl-badge-text {
  font-size: 13px;
  font-weight: 500;
  color: #0E0D22;
}

.tbl-wa {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 9px 9px 9px 24px;
  box-sizing: border-box;
  border-radius: 9999px;
  background: #00BC39;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.tbl-wa::after {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: url("../../images/icons/button-live-support-white.svg?v=1") center / 38px 38px no-repeat;
}

.tbl-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(14, 13, 34, 0.08);
  background: #FFFFFF;
}

.tbl-form textarea {
  flex: 1;
  min-width: 0;
  height: 56px;
  box-sizing: border-box;
  border: 1px solid rgba(14, 13, 34, 0.08);
  border-radius: 16px;
  padding: 17px 16px;
  background: rgba(9, 5, 56, 0.02);
  font-family: "Pliant", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #090538;
  resize: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
}

.tbl-form input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 1px solid rgba(14, 13, 34, 0.08);
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(9, 5, 56, 0.02);
  font-family: "Pliant", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #090538;
}

.tbl-form textarea::placeholder,
.tbl-form input::placeholder {
  color: #090538;
  opacity: 0.4;
}

.tbl-form button {
  height: 56px;
  width: fit-content;
  padding: 0 24px;
  border: 1px solid #DDD9FF;
  border-radius: 9999px;
  background: #DDD9FF;
  color: #4B34F6;
  font-family: "Pliant", sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}

.tbl-form button:disabled,
.tbl-form textarea:disabled,
.tbl-form input:disabled {
  opacity: 0.55;
  cursor: default;
}

.tbl-typing { color: rgba(14, 13, 34, 0.56); }

.tbl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.drawer-open .tbl-dock,
body.drawer-open .tbl-panel,
body.pd-lightbox-open .tbl-dock,
body.pd-lightbox-open .tbl-panel {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

@media (max-width: 767px) {
  .tbl-dock {
    right: 12px;
    bottom: 80px;
  }

  section#tbl-panel.tbl-panel:not([hidden]) {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0 !important;
    box-shadow: none;
    z-index: 1200;
  }

  section#tbl-panel.tbl-panel:not([hidden]) .tbl-head,
  section#tbl-panel.tbl-panel:not([hidden]) .tbl-form {
    flex-shrink: 0;
  }

  section#tbl-panel.tbl-panel:not([hidden]) .tbl-head {
    padding-top: max(16px, env(safe-area-inset-top));
  }

  section#tbl-panel.tbl-panel:not([hidden]) .tbl-form {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 575px) {
  .tbl-dock,
  .tbl-btn {
    width: 52px;
    height: 52px;
  }

  .tbl-dock {
    bottom: 76px;
  }

  .tbl-mark {
    width: 100%;
    height: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tbl-btn,
  .tbl-label {
    transition: none;
  }
}

.tbl-panel,
.tbl-log,
.tbl-form textarea {
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
}
