﻿#thw-wa-root,
#thw-wa-root * {
  box-sizing: border-box;
}

#thw-wa-root {
  --thw-border: rgba(0, 0, 0, 0.10);
  --thw-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  --thw-shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.12);
  --thw-soft: #f3f4f6;
  --thw-radius: 16px;
  --thw-z: 999999;
  font-family: inherit;
}

#thw-wa-root.thw-dark {
  --thw-soft: #1f2937;
  --thw-border: rgba(255, 255, 255, 0.14);
  --thw-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

#thw-wa-root .thw-floating {
  position: fixed;
  bottom: 16px;
  z-index: var(--thw-z);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: calc(100vw - 24px);
}

#thw-wa-root[style*='--thw-pos:right'] .thw-floating {
  right: 16px;
}

#thw-wa-root[style*='--thw-pos:left'] .thw-floating {
  left: 16px;
  align-items: flex-start;
}

#thw-wa-root .thw-card,
#thw-wa-root .thw-panel {
  width: min(380px, calc(100vw - 24px));
  background: var(--thw-bg);
  border: 1px solid var(--thw-border);
  border-radius: var(--thw-radius);
  box-shadow: var(--thw-shadow);
}

#thw-wa-root .thw-card {
  padding: 16px;
}

#thw-wa-root .thw-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#thw-wa-root .thw-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--thw-text);
  line-height: 1.4;
}

#thw-wa-root .thw-text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--thw-muted);
  display: block;
  clear: both;
}

#thw-wa-root .thw-phone-line {
  margin-top: 6px;
  font-size: 12px;
  color: #7a7f87;
}

#thw-wa-root .thw-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

#thw-wa-root .thw-actions.thw-one-col {
  grid-template-columns: 1fr;
}

#thw-wa-root .thw-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100%;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer;
}

#thw-wa-root .thw-btn svg,
#thw-wa-root .thw-btn-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: inline-block !important;
  flex: 0 0 16px !important;
  margin: 0 !important;
}

#thw-wa-root .thw-btn-primary {
  background: var(--thw-primary) !important;
  color: #fff !important;
}

#thw-wa-root .thw-btn-secondary {
  background: var(--thw-secondary) !important;
  color: #fff !important;
}

#thw-wa-root #thw-wa-options-btn,
#thw-wa-root .thw-btn-soft {
  margin-top: 8px !important;
  background: var(--thw-soft) !important;
  color: var(--thw-text) !important;
}

#thw-wa-root .thw-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: .2s ease;
  overflow: hidden;
}

#thw-wa-root .thw-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

#thw-wa-root .thw-panel-head {
  padding: 12px;
  border-bottom: 1px solid var(--thw-border);
}

#thw-wa-root .thw-panel-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--thw-text);
}

#thw-wa-root .thw-panel-subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--thw-muted);
}

#thw-wa-root .thw-panel-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

#thw-wa-root button.thw-wa-item {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  width: 100% !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  border: 1px solid var(--thw-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111 !important;
  text-align: right !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-indent: 0 !important;
  letter-spacing: 0 !important;
  line-height: 1.45 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  overflow: visible !important;
  white-space: normal !important;
  cursor: pointer;
}

#thw-wa-root button.thw-wa-item:hover {
  border-color: rgba(37, 211, 102, 0.45) !important;
}

#thw-wa-root.thw-dark button.thw-wa-item {
  background: #111827 !important;
  color: #f9fafb !important;
}

#thw-wa-root .thw-wa-item::before,
#thw-wa-root .thw-wa-item::after,
#thw-wa-root .thw-btn::before,
#thw-wa-root .thw-btn::after {
  content: none !important;
  display: none !important;
}

#thw-wa-root .thw-fab-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#thw-wa-root .thw-mini-btn,
#thw-wa-root .thw-fab {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none !important;
}

#thw-wa-root .thw-mini-btn {
  width: 40px;
  height: 40px;
  background: var(--thw-bg);
  color: var(--thw-text);
  border: 1px solid var(--thw-border) !important;
  box-shadow: var(--thw-shadow-soft);
}

#thw-wa-root .thw-label {
  padding: 8px 10px;
  background: var(--thw-secondary);
  color: #fff !important;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
}

#thw-wa-root .thw-open-trigger {
  border: 0;
  cursor: pointer;
}

#thw-wa-root .thw-fab {
  width: 52px;
  height: 52px;
  background: var(--thw-primary);
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--thw-shadow-soft);
}

#thw-wa-root .thw-fab svg {
  width: 26px !important;
  height: 26px !important;
}

@media (max-width: 640px) {
  #thw-wa-root .thw-floating {
    left: 10px !important;
    right: 10px !important;
    max-width: none;
    align-items: stretch;
  }

  #thw-wa-root .thw-card,
  #thw-wa-root .thw-panel {
    width: 100%;
  }

  #thw-wa-root .thw-actions {
    grid-template-columns: 1fr;
  }

  #thw-wa-root .thw-title {
    font-size: 18px;
  }

  #thw-wa-root .thw-text {
    font-size: 13px;
  }
}
