.fb-chat-widget {
  bottom: 18px;
  position: fixed;
  right: 18px;
  z-index: 80;
}

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

.fb-chat-launcher,
.fb-chat-panel button {
  font: inherit;
}

.fb-chat-launcher {
  align-items: center;
  background: #18181b;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
}

.fb-chat-launcher-icon {
  border: 2px solid currentColor;
  border-radius: 12px;
  display: inline-block;
  height: 18px;
  position: relative;
  width: 22px;
}

.fb-chat-launcher-icon::after {
  border-left: 5px solid currentColor;
  border-top: 5px solid transparent;
  bottom: -6px;
  content: "";
  height: 0;
  left: 5px;
  position: absolute;
  width: 0;
}

.fb-chat-panel {
  background: #fff;
  border: 1px solid rgba(24, 24, 27, .12);
  border-radius: 8px;
  bottom: 62px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
  color: #18181b;
  display: flex;
  flex-direction: column;
  max-height: min(680px, calc(100vh - 96px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(380px, calc(100vw - 28px));
}

.fb-chat-header {
  align-items: center;
  background: #18181b;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.fb-chat-header p,
.fb-chat-header h2,
.fb-chat-status {
  margin: 0;
}

.fb-chat-panel .fb-chat-header p {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fb-chat-panel .fb-chat-header h2 {
  color: #fff !important;
  font-size: 18px;
  letter-spacing: 0;
}

.fb-chat-header button {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.fb-chat-notice {
  align-items: center;
  background: #f6f4f1;
  color: #57534e;
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 14px;
}

.fb-chat-notice a {
  color: #9f1239;
  font-weight: 800;
}

.fb-chat-start,
.fb-chat-send {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.fb-chat-start label {
  color: #3f3f46;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.fb-chat-start input,
.fb-chat-send textarea {
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  box-sizing: border-box;
  color: #18181b;
  font: inherit;
  padding: 10px;
  width: 100%;
}

.fb-chat-start button,
.fb-chat-send button,
.fb-chat-access {
  background: #9f1239;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
}

.fb-chat-conversation {
  display: grid;
  min-height: 0;
}

.fb-chat-conversation-tools {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 0;
}

.fb-chat-messages {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding: 14px;
}

.fb-chat-message {
  border-radius: 8px;
  max-width: 86%;
  padding: 10px 12px;
}

.fb-chat-message.is-customer {
  background: #9f1239;
  color: #fff;
  justify-self: end;
}

.fb-chat-message.is-staff,
.fb-chat-message.is-ai,
.fb-chat-message.is-system {
  background: #f4f4f5;
  color: #18181b;
}

.fb-chat-message strong {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.fb-chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

.fb-chat-panel .fb-chat-access {
  align-self: flex-end;
  font-size: 12px !important;
  line-height: 1.2;
  margin: 0;
  min-height: 30px;
  padding: 6px 12px;
  width: auto;
  max-width: 70%;
}

.fb-chat-status {
  color: #71717a;
  font-size: 12px;
  min-height: 18px;
  padding: 0 14px 14px;
}

@media (max-width: 520px) {
  .fb-chat-widget {
    bottom: 12px;
    right: 12px;
  }

  .fb-chat-panel {
    bottom: 58px;
    max-height: calc(100vh - 80px);
    width: calc(100vw - 24px);
  }
}
