/* PetCraft Live Chat — 聊天窗样式 */
#pclc-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: transform 0.15s ease;
  padding: 0;
}
#pclc-launcher:hover { transform: scale(1.04); }
#pclc-launcher .pclc-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
#pclc-launcher .pclc-avatar svg { width: 60px; height: 60px; display: block; }
#pclc-launcher .pclc-avatar::after {
  content: '';
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #fff;
}
#pclc-launcher .pclc-label {
  background: #fff;
  color: #4A3A33;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid #e8e0d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  white-space: nowrap;
}

#pclc-window {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 99999;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#pclc-window.pclc-open { display: flex; }

#pclc-header {
  background: #4A3A33;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#pclc-header .pclc-title { font-weight: 600; font-size: 15px; }
#pclc-header .pclc-status { font-size: 12px; opacity: 0.85; margin-top: 2px; }
#pclc-header .pclc-status .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; margin-right: 5px;
}
#pclc-header .pclc-status .dot.off { background: #f87171; }
#pclc-close {
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; line-height: 1; padding: 2px 6px; opacity: 0.8;
}
#pclc-close:hover { opacity: 1; }

#pclc-body { flex: 1; overflow-y: auto; padding: 14px; background: #faf7f4; }
.pclc-msg { margin-bottom: 10px; display: flex; }
.pclc-msg .bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}
.pclc-msg.agent .bubble {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-top-left-radius: 3px;
  color: #333;
}
.pclc-msg.client { justify-content: flex-end; }
.pclc-msg.client .bubble {
  background: #4A3A33;
  color: #fff;
  border-top-right-radius: 3px;
}
.pclc-msg .meta { font-size: 11px; color: #999; margin-top: 3px; }
.pclc-msg.client .meta { text-align: right; }

#pclc-form {
  border-top: 1px solid #eee;
  padding: 10px 12px;
  background: #fff;
}
#pclc-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  resize: none;
  min-height: 42px;
  max-height: 100px;
  font-family: inherit;
}
#pclc-form textarea:focus { outline: none; border-color: #4A3A33; }
#pclc-form .row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
#pclc-form input[type="text"],
#pclc-form input[type="email"] {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
#pclc-form input:focus { outline: none; border-color: #4A3A33; }
#pclc-send {
  background: #4A3A33;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
#pclc-send:hover { background: #5c4a41; }
#pclc-send:disabled { opacity: 0.55; cursor: not-allowed; }

#pclc-form .fields { display: none; }
#pclc-form.pclc-need-info .fields { display: flex; gap: 8px; margin-top: 8px; }
.pclc-error { color: #dc2626; font-size: 12px; margin-top: 6px; display: none; }
.pclc-typing { color: #999; font-size: 12px; padding: 4px 2px; display: none; }
