/* Customer help chat widget – shared across all pages */
.customer-chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.customer-chat-toggle {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #0d9488;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.customer-chat-toggle:hover {
  background: #0f766e;
}

.customer-chat-panel {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  width: 320px;
  max-width: calc(100vw - 2rem);
  max-height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-chat-panel[hidden] {
  display: none !important;
}

.customer-chat-panel-header {
  padding: 0.75rem 1rem;
  background: #e7e5e4;
  border-bottom: 1px solid #d6d3d1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1c1917;
}

.customer-chat-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #57534e;
  padding: 0 0.25rem;
}

.customer-chat-close:hover {
  color: #1c1917;
}

.customer-chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: 240px;
  padding: 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  color: #292524;
}

.customer-chat-msg {
  margin-bottom: 0.5rem;
}

.customer-chat-msg.user {
  text-align: right;
}

.customer-chat-msg .bubble {
  display: inline-block;
  max-width: 85%;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  text-align: left;
}

.customer-chat-msg.user .bubble {
  background: #0d9488;
  color: #fff;
}

.customer-chat-msg.assistant .bubble {
  background: #fff;
  color: #292524;
  border: 1px solid #d6d3d1;
}

.customer-chat-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #e7e5e4;
  background: #fafaf9;
}

.customer-chat-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 2px solid #d6d3d1;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1c1917;
  background: #fff;
}

.customer-chat-form input::placeholder {
  color: #78716c;
}

.customer-chat-form input:focus {
  outline: none;
  border-color: #0d9488;
}

.customer-chat-form button {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #0d9488;
  color: #fff;
}

.customer-chat-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.customer-chat-error {
  font-size: 0.75rem;
  color: #b91c1c;
  padding: 0 0.75rem 0.5rem;
  margin: 0;
}
