.pl-support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
}

.pl-support-widget * {
  box-sizing: border-box;
}

.pl-support-toggle {
  min-width: 128px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc 0%, #d9f99d 100%);
  color: #0f172a;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.pl-support-toggle:focus-visible,
.pl-support-icon-button:focus-visible,
.pl-support-form input:focus,
.pl-support-form button:focus-visible,
.pl-support-quick-replies button:focus-visible {
  outline: 3px solid rgba(217, 249, 157, 0.58);
  outline-offset: 3px;
}

.pl-support-toggle-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.pl-support-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(378px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 108px));
  min-height: 420px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(9, 14, 26, 0.96);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(18px);
  display: none;
  overflow: hidden;
}

.pl-support-widget.is-expanded .pl-support-panel {
  display: flex;
  flex-direction: column;
}

.pl-support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.pl-support-kicker {
  margin: 0 0 2px;
  color: #bef264;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pl-support-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #f8fafc;
}

.pl-support-title-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pl-support-info-button {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.44);
  color: rgba(203, 213, 225, 0.78);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.pl-support-info-button:hover,
.pl-support-info-button:focus-visible,
.pl-support-widget.is-info-open .pl-support-info-button {
  color: #f8fafc;
  border-color: rgba(217, 249, 157, 0.36);
  background: rgba(30, 41, 59, 0.72);
}

.pl-support-info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 9px);
  width: min(292px, calc(100vw - 68px));
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #cbd5e1;
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(14px);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.pl-support-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pl-support-icon-button {
  height: 32px;
  min-width: 32px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.pl-support-messages {
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pl-support-message {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.pl-support-message-agent {
  align-self: flex-start;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.pl-support-message-user {
  align-self: flex-end;
  color: #0f172a;
  background: #d9f99d;
}

.pl-support-quick-replies {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 12px;
}

.pl-support-quick-replies button {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #e5e7eb;
  cursor: pointer;
  font-size: 12px;
  padding: 8px 10px;
}

.pl-support-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.pl-support-form input {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  font-size: 14px;
  padding: 11px 12px;
}

.pl-support-form input::placeholder {
  color: #94a3b8;
}

.pl-support-form button {
  border: 0;
  border-radius: 10px;
  background: #d9f99d;
  color: #0f172a;
  cursor: pointer;
  font-weight: 850;
  padding: 0 14px;
}

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

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

  .pl-support-toggle {
    min-width: 112px;
    height: 44px;
  }

  .pl-support-panel {
    right: -4px;
    bottom: 56px;
    width: calc(100vw - 24px);
    height: min(640px, calc(100vh - 84px));
    min-height: 360px;
    border-radius: 12px;
  }
}
