.sos-chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sos-chat-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(204, 255, 0, 0.4);
  background: var(--accent, #ccff00);
  color: #050505;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 26px rgba(204, 255, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sos-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 0 34px rgba(204, 255, 0, 0.28);
}

.sos-chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, #141414);
  color: var(--text, #fff);
  border: 1px solid var(--border, #1e1e1e);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.sos-chat-panel.open {
  display: flex;
}

.sos-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #1e1e1e);
  background: rgba(255, 255, 255, 0.02);
}

.sos-chat-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.sos-chat-subtitle {
  color: var(--muted, var(--text-secondary, #999));
  font-size: 11px;
  margin-top: 2px;
}

.sos-chat-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border, #1e1e1e);
  background: transparent;
  color: var(--text, #fff);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sos-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.sos-chat-message.bot {
  align-self: flex-start;
  background: #1d1d1d;
  border: 1px solid var(--border, #1e1e1e);
}

.sos-chat-message.user {
  align-self: flex-end;
  background: var(--accent, #ccff00);
  color: #050505;
}

.sos-chat-meta {
  max-width: 88%;
  align-self: flex-start;
  color: var(--muted, var(--text-secondary, #999));
  font-size: 11px;
  line-height: 1.35;
  padding: 0 4px;
}

.sos-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border, #1e1e1e);
  background: rgba(255, 255, 255, 0.02);
}

.sos-chat-input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--border, #1e1e1e);
  background: #0f0f0f;
  color: var(--text, #fff);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
}

.sos-chat-input:focus {
  outline: none;
  border-color: var(--accent, #ccff00);
  box-shadow: 0 0 0 2px rgba(204, 255, 0, 0.14);
}

.sos-chat-send {
  border: 0;
  border-radius: 8px;
  background: var(--accent, #ccff00);
  color: #050505;
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
  min-width: 54px;
}

.sos-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .sos-chat-widget {
    right: 14px;
    bottom: 14px;
  }

  .sos-chat-panel {
    right: -6px;
    bottom: 68px;
    width: calc(100vw - 28px);
    height: min(560px, calc(100vh - 100px));
  }
}
