/* ============================================
   PULZ Fitness — AI Coach Chatbot
   Electric lime / coral / obsidian
   ============================================ */

#gcw-chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(145deg, #0E1014, #1A1F12);
  color: #F2F4F8;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(200,255,61,0.35), 0 0 24px rgba(200,255,61,0.15);
  z-index: 10000;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.5s ease, border-radius 0.5s ease, padding 0.5s ease, background 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(200,255,61,0.45);
}

#gcw-chat-bubble .gcw-bubble-icon {
  font-size: 26px;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  color: #C8FF3D;
}

#gcw-chat-bubble .gcw-bubble-text {
  max-width: 0;
  overflow: hidden;
  margin-left: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #F2F4F8 !important;
  transition: max-width 0.6s ease 0.1s, margin-left 0.5s ease 0.1s;
}

#gcw-chat-bubble:hover,
#gcw-chat-bubble.show-text {
  width: 250px;
  border-radius: 32px;
  padding: 0 18px;
  justify-content: flex-start;
  background: linear-gradient(145deg, #12151C, #1F2A10);
  box-shadow: 0 12px 36px rgba(200,255,61,0.25), 0 0 28px rgba(200,255,61,0.12);
}

#gcw-chat-bubble:hover .gcw-bubble-text,
#gcw-chat-bubble.show-text .gcw-bubble-text {
  max-width: 200px;
  margin-left: 12px;
}

#gcw-chat-container {
  position: fixed;
  bottom: 92px;
  right: 20px;
  width: 380px;
  height: 620px;
  background: linear-gradient(165deg, #12151C 0%, #0E1014 55%, #0A0C10 100%);
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(0,0,0,0.55), 0 0 0 1px rgba(200,255,61,0.2);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(200,255,61,0.28);
  font-family: 'Manrope', system-ui, sans-serif;
  color: #F2F4F8;
}

@media (max-height: 700px) {
  #gcw-chat-container { height: 90vh; }
}

.gcw-hidden { display: none !important; }

#gcw-chat-header {
  background: linear-gradient(135deg, #07080A, #141810);
  color: #F2F4F8;
  padding: 18px 20px;
  text-align: center;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  position: relative;
  border-bottom: 1px solid rgba(200,255,61,0.22);
}

#gcw-chat-header::after {
  content: 'AI fitness coach · demo';
  display: block;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,255,61,0.85);
  margin-top: 4px;
}

#gcw-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(200,255,61,0.12);
  color: #C8FF3D;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  border: 1px solid rgba(200,255,61,0.3);
  line-height: 1;
}

#gcw-close:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(200,255,61,0.25);
}

#gcw-chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.gcw-message {
  margin: 10px 6px;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 84%;
  width: fit-content;
  word-wrap: break-word;
  font-size: 13.5px;
  line-height: 1.55;
  animation: gcwFadeIn 0.45s forwards;
}

.gcw-message.user {
  background: linear-gradient(135deg, #C8FF3D, #A8E020);
  color: #0A0C08;
  margin-left: auto;
  border-bottom-right-radius: 6px;
  font-weight: 600;
}

.gcw-message.bot {
  background: #1A1F28;
  color: #F2F4F8;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  border-bottom-left-radius: 6px;
}

.gcw-message img {
  max-width: 200px;
  border-radius: 12px;
  margin: 8px 0;
  display: block;
}

#gcw-suggestions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 4px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
#gcw-suggestions::-webkit-scrollbar { display: none; }

.gcw-suggestion {
  background: rgba(200,255,61,0.1);
  color: #C8FF3D;
  border: 1px solid rgba(200,255,61,0.3);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s;
}

.gcw-suggestion:hover {
  transform: scale(1.04);
  background: rgba(200,255,61,0.2);
}

.gcw-suggestion:active { transform: scale(0.96); }

.gcw-calendly-btn,
.gcw-consult-btn {
  background: #C8FF3D;
  color: #0A0C08;
  border: none;
  padding: 11px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 5px 15px;
  align-self: flex-start;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(200,255,61,0.25);
}

.gcw-calendly-btn:hover,
.gcw-consult-btn:hover {
  transform: scale(1.04);
  background: #E0FF6A;
}

.gcw-learn-more-btn {
  background: transparent;
  color: #C8FF3D;
  border: 1px solid rgba(200,255,61,0.4);
  padding: 10px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  margin: 5px 15px;
  align-self: flex-start;
  transition: all 0.2s;
}

.gcw-learn-more-btn:hover {
  transform: scale(1.04);
  background: rgba(200,255,61,0.1);
}

#gcw-chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.gcw-input-wrapper {
  position: relative;
  flex: 1;
  background: #1A1F28;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 30px;
  height: 40px;
  display: flex;
  align-items: center;
}

#gcw-user-input {
  width: 100%;
  height: 100%;
  padding: 0 80px 0 16px;
  background: transparent;
  color: #F2F4F8;
  border: none;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  line-height: 40px;
  box-sizing: border-box;
  cursor: text;
}

#gcw-user-input::placeholder {
  color: rgba(242,244,248,0.35);
  font-size: 13px;
}

#gcw-attach-btn,
#gcw-voice-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(242,244,248,0.45);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

#gcw-attach-btn svg,
#gcw-voice-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#gcw-attach-btn { right: 46px; }
#gcw-voice-btn { right: 14px; }

#gcw-attach-btn:hover,
#gcw-voice-btn:hover { color: #C8FF3D; }

#gcw-voice-btn.recording { color: #FF2D6A; }
#gcw-voice-btn.recording svg { animation: gcwPulse 1.5s infinite; }

#gcw-send-btn {
  background: #C8FF3D;
  color: #0A0C08;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(200,255,61,0.3);
}

#gcw-send-btn:hover {
  transform: scale(1.08);
  background: #E0FF6A;
}

#gcw-send-btn:active { transform: scale(0.92); }

#gcw-pending-preview {
  display: none;
  padding: 0 15px 8px;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
#gcw-pending-preview.visible { display: flex; }

.gcw-preview-item { position: relative; }
.gcw-preview-item img {
  max-width: 70px;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
}
.gcw-preview-item button {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #FF2D6A;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

@keyframes gcwFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gcwPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  #gcw-chat-container {
    width: calc(100vw - 40px) !important;
    height: 78vh !important;
    max-height: 78vh !important;
    bottom: 90px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 22px !important;
  }
  #gcw-close { width: 44px; height: 44px; font-size: 26px; }
  body.gcw-chat-mobile-open { overflow: hidden; }
  .gcw-input-wrapper { height: 44px; }
  #gcw-user-input {
    font-size: 16px !important;
    line-height: 44px !important;
    padding: 0 80px 0 16px !important;
  }
  #gcw-user-input::placeholder { font-size: 16px !important; opacity: 0.75; }
}

#gcw-chat-bubble,
#gcw-chat-container,
#gcw-chat-container button,
#gcw-chat-container input { cursor: pointer; }
#gcw-user-input { cursor: text; }
