/* ═══════════════════════════════════
   GAMBONE LAW — chatbot.css
   Premium Chat Widget — No API Needed
═══════════════════════════════════ */

/* ── BUBBLE BUTTON ── */
.glg-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.glg-btn {
  width: 50px; height: 50px; border-radius: 50%;
  background: #599942;
  border: none; cursor: none;
  box-shadow: 0 8px 32px rgba(61, 139, 55, 0.5), 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
  position: relative;
  overflow: visible;
}

.glg-btn::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgb(89 153 66);
  animation: glgPulse 2.5s ease-out infinite;
}

@keyframes glgPulse {
  0% {
    transform: scale(1);
    opacity: .8;
  }

  70% {
    transform: scale(1.45);
    opacity: 0;
  }

  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.glg-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 16px 48px rgba(61, 139, 55, 0.6);
}

.glg-btn svg  { width: 22px; height: 22px; fill: #fff; transition: transform .3s; }

.glg-btn.open svg {
  transform: rotate(90deg);
}

/* Notification badge */
.glg-notif {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #acb410;
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: glgBounce 1s ease-in-out infinite alternate;
}

@keyframes glgBounce {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.2);
  }
}

/* Tooltip */
.glg-tip {
  background: #1a1a1a;
  color: #fff;
  padding: 9px 16px;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: none;
  pointer-events: none;
  animation: glgTipIn .3s ease;
}

@keyframes glgTipIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── CHAT WINDOW ── */
.glg-win {
  position: fixed;
  bottom: 84px; right: 28px;
  /* width: 300px; height: 380px; */
  max-height: calc(100vh - 110px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9989;
  transform: scale(0.85) translateY(24px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .3s;
}
.glg-av .fa-balance-scale:before, .fa-scale-balanced:before{
  color:#599942;
}
.glg-mav {
  color:#599942;

}
.glg-win.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── HEADER ── */
.glg-head {
  /* background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #4caf50 70%, #81c784 100%); */
  background-color: #599942;
  padding: 12px 14px; flex-shrink: 0; position: relative; overflow: hidden;
}

.glg-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

.glg-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.glg-head-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.glg-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.glg-av-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid #1a3d1a;
  animation: glgOnline 2s ease-in-out infinite;
}

@keyframes glgOnline {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.glg-head-info { display: flex; flex-direction: column; gap: 1px; }
.glg-head-name { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; color: #fff; }
.glg-head-status {
  font-family: 'DM Sans', sans-serif; font-size: 10px; color:#fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.glg-status-dot {
  width: 5px;
  height: 5px;
  background: #4ade80;
  border-radius: 50%;
}

.glg-head-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: none;
  cursor: none;
  color: rgba(255, 255, 255, .8);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  position: relative;
  z-index: 1;
}

.glg-head-close:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.glg-head-sub {
  margin-top: 6px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 6px 10px;
  font-family: 'DM Sans', sans-serif; font-size: 10px; 
  color: #fff;
  line-height: 1.4; position: relative; z-index: 1;
}

.glg-head-sub strong {
  color: #fff;
}

/* ── QUICK ACTIONS ── */
.glg-quick {
  padding: 8px 10px 6px; display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
  background: #fafafa;
}
.glg-qbtn {
  background: #f0f7f0; border: 1px solid #c8e0c8; color: #1a5a1a;
  padding: 4px 9px; border-radius: 20px;
  font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 600;
  cursor: none; transition: all .2s; white-space: nowrap;
}

.glg-qbtn:hover {
  background: #3d8b37;
  color: #fff;
  border-color: #3d8b37;
  transform: translateY(-1px);
}

/* ── MESSAGES ── */
.glg-msgs {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  scroll-behavior: smooth;
}

.glg-msgs::-webkit-scrollbar {
  width: 3px;
}

.glg-msgs::-webkit-scrollbar-thumb {
  background: #d0e0d0;
  border-radius: 3px;
}

/* Message rows */
.glg-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: glgMsgIn .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes glgMsgIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.95);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.glg-msg.user {
  flex-direction: row-reverse;
}

.glg-mav {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #ffffff;
    display: flex;
    border: 1px solid #333333ba;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.glg-msg.user .glg-mav {
  /* background: linear-gradient(135deg, #2c3e50, #4a6278); */
}

.glg-mcont {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.glg-msg.user .glg-mcont {
  align-items: flex-end;
}

.glg-mbub {
  padding: 8px 12px; border-radius: 14px;
  font-family: 'DM Sans', sans-serif; font-size: 12px; line-height: 1.5;
  word-break: break-word;
}

.glg-msg.bot .glg-mbub {
  background: #f2f2f2;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}

.glg-msg.user .glg-mbub {
  background: linear-gradient(135deg, #1a3d1a, #3d8b37);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(61, 139, 55, .3);
}

.glg-mtime {
  font-size: 10px;
  color: #333333;
  padding: 0 3px;
  font-weight: 600;
}

.glg-msg.user .glg-mtime {
  text-align: right;
}

/* Typing dots */
.glg-typing .glg-mbub {
  padding: 13px 16px;
}

.glg-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.glg-dots span {
  width: 7px;
  height: 7px;
  background: #999;
  border-radius: 50%;
  animation: glgDot 1.4s ease-in-out infinite;
}

.glg-dots span:nth-child(2) {
  animation-delay: .2s;
}

.glg-dots span:nth-child(3) {
  animation-delay: .4s;
}

@keyframes glgDot {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Chips inside messages */
.glg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.glg-chip {
  background: #fff; border: 1.5px solid #c8e0c8; color: #1a5a1a;
  padding: 4px 9px; border-radius: 20px;
  font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 600;
  cursor: none;
  transition: all .2s;
}

.glg-chip:hover {
  background: #3d8b37;
  color: #fff;
  border-color: #3d8b37;
  transform: translateY(-1px);
}

/* ── INPUT ── */
.glg-input-wrap {
  padding: 6px 10px 8px; border-top: 1px solid #f0f0f0;
  background: #fafafa; flex-shrink: 0;
}
.glg-input-row { display: flex; gap: 8px; align-items: flex-end; }
.glg-input {
  flex: 1; background: #fff; border: 1.5px solid #e0dbd4; border-radius: 12px;
  padding: 8px 10px; font-family: 'DM Sans', sans-serif; font-size: 12px; color: #1a1a1a;
  outline: none; resize: none; max-height: 70px; min-height: 36px; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}

.glg-input:focus {
  border-color: #3d8b37;
  box-shadow: 0 0 0 3px rgba(61, 139, 55, .1);
}

.glg-input::placeholder {
  color: #aaa;
}

.glg-send {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background:#599942;
  border: none;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(61, 139, 55, .4);
  transition: transform .2s, box-shadow .2s;
}

.glg-send:hover {
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 8px 20px rgba(61, 139, 55, .5);
}

.glg-send:disabled {
  opacity: .5;
  transform: none;
  cursor: none;
}

.glg-send svg {
  width: 17px;
  height: 17px;
  fill: #fff;
}

.glg-footnote {
      font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    color: #333333;
    text-align: center;
    margin-top: 4px;
    font-weight: 600;
 }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .glg-win {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 88px;
    height: 72vh;
    border-radius: 18px;
  }

  .glg-bubble {
    right: 14px;
    bottom: 18px;
  }
}