/* ============================================================
   Customer Support Chat Widget CSS
   ============================================================ */

.chat-widget {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 320px;
  height: 450px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--font, system-ui, sans-serif);
}

.chat-widget.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.chat-widget__header {
  background: var(--navy, #0D1117);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-widget__title {
  font-weight: 600;
  font-size: 15px;
}

.chat-widget__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chat-widget__close:hover {
  opacity: 1;
}

.chat-widget__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #f8f9fa;
  overflow: hidden;
}

.chat-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-msg--agent {
  align-self: flex-start;
  background: #e9ecef;
  color: #171a20;
  border-bottom-left-radius: 4px;
}

.chat-msg--customer {
  align-self: flex-end;
  background: var(--teal, #22D3C8);
  color: #0D1117;
  border-bottom-right-radius: 4px;
}

.chat-widget__input-area {
  display: flex;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e8e9eb;
  gap: 8px;
}

#chat-widget-input {
  flex: 1;
  border: 1px solid #e8e9eb;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#chat-widget-input:focus {
  border-color: var(--teal, #22D3C8);
}

#chat-widget-send {
  background: var(--navy, #0D1117);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#chat-widget-send:hover {
  background: #1a212c;
}
