/* Guest help chat — login page (launcher bottom-left, panel bottom-right) */

.gchat-launcher {
  position: fixed;
  right: 22px;
  left: auto;
  bottom: 22px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 14px;
  border: 1px solid rgba(0, 194, 168, 0.35);
  border-radius: 999px;
  background: linear-gradient(145deg, #00C2A8, #0A7F6F);
  color: #fff;
  font-family: Manrope, 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 194, 168, 0.28);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, opacity 0.25s ease;
}

.gchat-launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 34px rgba(0, 194, 168, 0.38);
}

.gchat-launcher.open {
  opacity: 0.55;
  transform: scale(0.96);
}

.gchat-launcher-ico {
  display: flex;
  width: 22px;
  height: 22px;
}

.gchat-launcher.nudge {
  animation: gchatNudge 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes gchatNudge {
  0% { transform: scale(1); box-shadow: 0 10px 28px rgba(0, 194, 168, 0.28); }
  35% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(0, 194, 168, 0.18), 0 16px 40px rgba(0, 194, 168, 0.45); }
  70% { transform: scale(1.03); box-shadow: 0 0 0 0 rgba(0, 194, 168, 0), 0 12px 30px rgba(0, 194, 168, 0.32); }
  100% { transform: scale(1); box-shadow: 0 10px 28px rgba(0, 194, 168, 0.28); }
}

.gchat-window {
  position: fixed;
  right: 22px;
  left: auto;
  bottom: 88px;
  z-index: 10060;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(19, 35, 55, 0.10);
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.22);
  backdrop-filter: blur(16px) saturate(1.15);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(28px, 36px, 0) scale(0.92);
  transform-origin: bottom right;
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.gchat-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.gchat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, #00C2A8, #0A7F6F);
  color: #fff;
}

.gchat-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gchat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gchat-title {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.gchat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.gchat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8ffe8;
  box-shadow: 0 0 0 3px rgba(184, 255, 232, 0.25);
}

.gchat-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.gchat-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.gchat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f7f9fb;
}

.gchat-gate {
  padding: 18px 16px 16px;
  overflow: auto;
}

.gchat-intro {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
}

.gchat-gate form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gchat-gate label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.gchat-gate input {
  border: 1px solid rgba(19, 35, 55, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0b1220;
  background: #fff;
  outline: none;
}

.gchat-gate input:focus {
  border-color: rgba(0, 194, 168, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.15);
}

.gchat-primary {
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(145deg, #00C2A8, #0A7F6F);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.gchat-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gchat-thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gchat-msgs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gchat-sys {
  align-self: center;
  max-width: 92%;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.4;
  color: #64748b;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.gchat-bubble {
  max-width: 88%;
  padding: 10px 12px 8px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
}

.gchat-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #00C2A8, #0A7F6F);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.gchat-bubble.them {
  align-self: flex-start;
  background: #fff;
  color: #0b1220;
  border: 1px solid rgba(19, 35, 55, 0.08);
  border-bottom-left-radius: 5px;
}

.gchat-time {
  margin-top: 4px;
  font-size: 10.5px;
  opacity: 0.7;
}

.gchat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(19, 35, 55, 0.08);
  background: #fff;
}

.gchat-compose textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 110px;
  border: 1px solid rgba(19, 35, 55, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.gchat-compose textarea:focus {
  border-color: rgba(0, 194, 168, 0.55);
}

.gchat-send {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #00C2A8;
  color: #0b1220;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .gchat-launcher {
    right: 14px;
    left: auto;
    bottom: 14px;
    padding: 11px 14px 11px 12px;
  }
  .gchat-launcher-label {
    display: none;
  }
  .gchat-window {
    right: 10px;
    left: 10px;
    bottom: 72px;
    width: auto;
    height: min(72vh, 560px);
    transform-origin: bottom right;
  }
  .gchat-window:not(.open) {
    transform: translate3d(16px, 28px, 0) scale(0.94);
  }
}

.gchat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 10px 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.gchat-typing[hidden] { display: none; }
.gchat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00C2A8;
  opacity: 0.45;
  animation: gchatTyping 1.1s infinite ease-in-out;
}
.gchat-typing span:nth-child(2) { animation-delay: 0.15s; }
.gchat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes gchatTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 1; }
}
