/* ============================================
   GIGI FUTURE – Chat Widget CSS
   ============================================ */

.gigi-chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* Chat Button */
.gigi-chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--global-color-blue-500), var(--global-color-fuchsia-500));
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.4);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.gigi-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(6, 182, 212, 0.6);
}

.gigi-chat-btn svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* Chat Window */
.gigi-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--alias-bg-surface-1);
  border: 1px solid var(--alias-border-subtle);
  border-radius: 16px;
  box-shadow: var(--elevation-3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gigi-chat-window.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.gigi-chat-header {
  padding: 16px;
  background: var(--alias-bg-surface-2);
  border-bottom: 1px solid var(--alias-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gigi-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gigi-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--global-color-blue-500), var(--global-color-fuchsia-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.gigi-chat-name {
  font-weight: 600;
  color: var(--alias-text-primary);
  font-size: 1rem;
}

.gigi-chat-status {
  font-size: 0.75rem;
  color: var(--global-color-success);
  display: flex;
  align-items: center;
  gap: 4px;
}
.gigi-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--global-color-success);
  display: block;
}

.gigi-chat-close {
  background: none;
  border: none;
  color: var(--alias-text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.gigi-chat-close:hover {
  background: var(--alias-bg-surface-3);
  color: var(--alias-text-primary);
}
.gigi-chat-close svg {
  width: 20px;
  height: 20px;
}

/* Chat Body */
.gigi-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--alias-bg-surface-1);
}

.gigi-chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  animation: slideIn 0.3s ease;
}

.gigi-chat-msg.bot {
  background: var(--alias-bg-surface-2);
  color: var(--alias-text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.gigi-chat-msg.user {
  background: linear-gradient(135deg, var(--global-color-blue-600), var(--global-color-fuchsia-600));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Chat Input */
.gigi-chat-footer {
  padding: 16px;
  border-top: 1px solid var(--alias-border-subtle);
  background: var(--alias-bg-surface-2);
  display: flex;
  gap: 8px;
}

.gigi-chat-input {
  flex: 1;
  background: var(--alias-bg-surface-1);
  border: 1px solid var(--alias-border-subtle);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--alias-text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gigi-chat-input:focus {
  outline: none;
  border-color: var(--global-color-blue-400);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.gigi-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--global-color-blue-500);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.gigi-chat-send:hover {
  background: var(--global-color-blue-400);
  transform: translateY(-2px);
}
.gigi-chat-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  margin-left: 2px;
}

/* Typing Indicator */
.gigi-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--alias-bg-surface-2);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: fit-content;
}

.gigi-dot {
  width: 6px;
  height: 6px;
  background: var(--alias-text-secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.gigi-dot:nth-child(1) { animation-delay: -0.32s; }
.gigi-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .gigi-chat-window {
    width: calc(100vw - 40px);
    right: -10px;
  }
}
