.support-chat-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  font-family: "Manrope", sans-serif;
}

.support-chat-widget[hidden] {
  display: none !important;
}

.support-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(14,165,233,.94), rgba(16,185,129,.92));
  box-shadow: 0 24px 64px rgba(8, 47, 73, 0.36);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.support-chat-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 0 0 8px rgba(255,255,255,.16);
}

.support-chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(78vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 15, 35, 0.97), rgba(5, 10, 24, 0.98)),
    radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 42%);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.55);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}

.support-chat-widget.is-open .support-chat-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.support-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.14);
}

.support-chat-kicker {
  margin-bottom: 6px;
  color: rgba(125, 211, 252, 0.92);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.support-chat-title {
  margin: 0;
  color: #f8fafc;
  font-size: 21px;
  line-height: 1.1;
}

.support-chat-status {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.support-chat-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.support-chat-meta {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(8, 15, 35, 0.56);
}

.support-chat-meta-copy {
  margin: 0 0 10px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.support-chat-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.support-chat-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-chat-field-wide {
  grid-column: 1 / -1;
}

.support-chat-field span {
  color: rgba(203, 213, 225, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.support-chat-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  padding: 12px 13px;
  font: inherit;
}

.support-chat-field input::placeholder,
.support-chat-input::placeholder {
  color: rgba(148, 163, 184, 0.78);
}

.support-chat-messages {
  flex: 1 1 auto;
  min-height: 240px;
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-chat-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  color: rgba(226, 232, 240, 0.85);
  font-size: 14px;
  line-height: 1.5;
}

.support-chat-bubble {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  word-break: break-word;
}

.support-chat-bubble.is-client {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.94), rgba(16, 185, 129, 0.92));
  color: #ecfeff;
}

.support-chat-bubble.is-operator {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  border: 1px solid rgba(125, 211, 252, 0.18);
}

.support-chat-bubble.is-system {
  align-self: center;
  max-width: 94%;
  background: rgba(51, 65, 85, 0.58);
  color: rgba(226, 232, 240, 0.86);
  text-align: center;
}

.support-chat-bubble-meta {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(226, 232, 240, 0.68);
  font-size: 11px;
}

.support-chat-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.support-chat-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.support-chat-attachment-list {
  padding: 0 18px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-chat-attachment-list[hidden] {
  display: none !important;
}

.support-chat-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  font-size: 12px;
}

.support-chat-attachment-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
}

.support-chat-form {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.support-chat-input {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  padding: 14px 15px;
  font: inherit;
}

.support-chat-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-chat-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-chat-secondary-btn,
.support-chat-send-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.support-chat-secondary-btn {
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
}

.support-chat-send-btn {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(14,165,233,.96), rgba(16,185,129,.94));
}

.support-chat-send-btn[disabled],
.support-chat-secondary-btn[disabled] {
  opacity: .56;
  cursor: not-allowed;
}

.support-chat-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .support-chat-widget {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .support-chat-toggle {
    width: 100%;
    justify-content: center;
  }

  .support-chat-panel {
    right: 0;
    left: 0;
    bottom: 68px;
    width: 100%;
    max-height: min(calc(100dvh - 92px), 680px);
  }

  .support-chat-header {
    padding: 16px 16px 10px;
  }

  .support-chat-meta {
    padding: 12px 16px;
  }

  .support-chat-meta-grid {
    grid-template-columns: 1fr;
  }

  .support-chat-messages {
    min-height: 84px;
    padding: 12px 16px;
  }

  .support-chat-attachment-list {
    padding: 0 16px 8px;
  }

  .support-chat-form {
    flex: 0 0 auto;
    padding: 12px 16px 16px;
  }

  .support-chat-input {
    min-height: 88px;
    max-height: 24dvh;
  }

  .support-chat-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .support-chat-actions-left {
    justify-content: space-between;
  }

  .support-chat-send-btn,
  .support-chat-secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .support-chat-bubble {
    max-width: 100%;
  }
}
