.cw-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9ab, #f0b93e 55%, #c9861f 100%);
  border: 2px solid #ffdf8e;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 22px 4px rgba(240, 185, 62, 0.55);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cw-pulse 2.6s ease-in-out infinite;
}

@keyframes cw-pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 22px 4px rgba(240, 185, 62, 0.55); }
  50% { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 30px 8px rgba(240, 185, 62, 0.85); }
}

.cw-bubble svg {
  width: 26px;
  height: 26px;
  color: #2a1f06;
}

.cw-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ff5c4d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cw-window {
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: min(340px, calc(100vw - 36px));
  height: min(460px, calc(100vh - 140px));
  background: #26282e;
  border: 1px solid rgba(214, 175, 90, 0.35);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cw-window.open {
  display: flex;
}

.cw-header {
  padding: 14px 16px;
  background: linear-gradient(160deg, #333539, #26282e);
  border-bottom: 1px solid rgba(214, 175, 90, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cw-header-title {
  color: #f7e0a1;
  font-weight: 700;
  font-size: 0.95rem;
}

.cw-header-sub {
  color: #aeb0b5;
  font-size: 0.75rem;
  margin-top: 2px;
}

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

.cw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cw-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.87rem;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.cw-msg.visitor {
  align-self: flex-end;
  background: #34363c;
  color: #f0f0f2;
  border-bottom-right-radius: 2px;
}

.cw-msg.manager {
  align-self: flex-start;
  background: linear-gradient(180deg, #f7e0a1, #e0b25a);
  color: #2a1f06;
  border-bottom-left-radius: 2px;
}

.cw-empty {
  color: #8a8c91;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 20px;
}

.cw-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(214, 175, 90, 0.25);
}

.cw-input {
  flex: 1;
  min-width: 0;
  background: #1e2024;
  border: 1px solid rgba(214, 175, 90, 0.3);
  border-radius: 10px;
  padding: 9px 12px;
  color: #f0f0f2;
  font-size: 0.87rem;
  resize: none;
}

.cw-input:focus {
  outline: 2px solid #e0b25a;
}

.cw-send {
  background: linear-gradient(180deg, #f7e0a1, #e0b25a);
  border: none;
  border-radius: 10px;
  width: 40px;
  flex: 0 0 auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cw-send svg {
  width: 18px;
  height: 18px;
  color: #2a1f06;
}
