.uvr-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99998;
  background: #bb131f;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.uvr-chat-launcher .uvr-chat-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
}

.uvr-chat-launcher.uvr-chat-has-unread .uvr-chat-badge {
  display: inline-block;
}

.uvr-chat-panel {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 99999;
  width: 320px;
  max-width: calc(100vw - 40px);
  height: 420px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  flex-direction: column;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

.uvr-chat-header {
  background: #bb131f;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.uvr-chat-header strong {
  font-size: 15px;
}

.uvr-chat-header small {
  display: block;
  font-weight: 400;
  opacity: 0.85;
  font-size: 12px;
}

.uvr-chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.uvr-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f6f5f4;
}

.uvr-chat-msg {
  max-width: 85%;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.uvr-chat-msg.uvr-chat-in {
  background: #bb131f;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.uvr-chat-msg.uvr-chat-out {
  background: #e8e8e8;
  color: #28231f;
  margin-right: auto;
  border-bottom-left-radius: 2px;
}

.uvr-chat-msg.uvr-chat-system {
  background: none;
  color: #777;
  font-size: 12px;
  text-align: center;
  margin: 8px auto;
  max-width: 100%;
}

.uvr-chat-input-row {
  border-top: 1px solid #e2e2e2;
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.uvr-chat-name-row {
  padding: 10px 10px 0;
  flex-shrink: 0;
}

.uvr-chat-name-row input,
.uvr-chat-input-row textarea {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
}

.uvr-chat-input-row textarea {
  flex: 1;
  height: 38px;
}

.uvr-chat-send {
  background: #bb131f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
}

.uvr-chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 400px) {
  .uvr-chat-panel {
    right: 10px;
    left: 10px;
    width: auto;
  }
  .uvr-chat-launcher {
    right: 10px;
  }
}
