/* ================= Floating Chat Widget ================= */

.chat-widget-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--gold);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

.chat-widget-button:hover {
  transform: scale(1.1);
  background-color: #e09b1a; /* slightly darker gold */
}

.chat-widget-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Chat Window */
.chat-widget-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 320px;
  height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'Inter', sans-serif;
}

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

.chat-widget-header {
  background: var(--navy-deep);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-widget-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-widget-avatar {
  width: 32px;
  height: 32px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.chat-widget-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.chat-widget-status {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-widget-status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background-color: #10b981; /* green dot */
  border-radius: 50%;
}

.chat-widget-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.chat-widget-close:hover {
  color: #fff;
}
.chat-widget-close svg {
  width: 20px;
  height: 20px;
}

.chat-widget-body {
  flex: 1;
  background: #f8fafc;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-bubble.bot {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px 12px 12px 2px;
  color: #334155;
  align-self: flex-start;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-bubble.user {
  background: var(--gold);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
  align-self: flex-end;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-widget-input-area {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
}

.chat-widget-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.chat-widget-input:focus {
  border-color: var(--gold);
}

.chat-widget-send {
  background: var(--gold);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.chat-widget-send:hover {
  background: #e09b1a;
}
.chat-widget-send svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-left: -2px; /* optical alignment */
}

/* responsive */
@media (max-width: 480px) {
  .chat-widget-window {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 90px;
  }
}
