/* GreenBridge Floating Chatbot No Red
   This file intentionally avoids using a BUTTON for the launcher.
   #gbnr-launcher is a plain fixed DIV, so theme button styling cannot create a red square.
*/

:root {
  --gbnr-green: #078437;
  --gbnr-green2: #18c85a;
  --gbnr-dark: #064f27;
  --gbnr-soft: #eafff0;
  --gbnr-border: #10a64a;
}

.gbnr-page-chatbot,
#gbnr-floating-root {
  font-family: Arial, Helvetica, sans-serif !important;
}

/* FLOATING ROOT */
#gbnr-floating-root {
  position: fixed !important;
  right: 18px !important;
  bottom: 16px !important;
  width: 280px !important;
  height: 205px !important;
  z-index: 2147483000 !important;
  pointer-events: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* PLAIN DIV LAUNCHER - NOT A BUTTON */
#gbnr-launcher {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 260px !important;
  height: 190px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  overflow: visible !important;
  display: block !important;
}

/* Kill any injected theme decoration */
#gbnr-launcher::before,
#gbnr-launcher::after,
#gbnr-floating-root::before,
#gbnr-floating-root::after {
  content: none !important;
  display: none !important;
}

/* Speech bubble */
#gbnr-launcher-bubble {
  position: absolute !important;
  right: 92px !important;
  top: 4px !important;
  z-index: 3 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  background: #ffffff !important;
  color: var(--gbnr-dark) !important;
  border: 3px solid var(--gbnr-border) !important;
  border-radius: 22px !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.18) !important;
  animation: gbnrBubble 2.4s infinite ease-in-out !important;
  pointer-events: none !important;
}

#gbnr-launcher-bubble::after {
  content: "" !important;
  position: absolute !important;
  right: 18px !important;
  bottom: -10px !important;
  width: 16px !important;
  height: 16px !important;
  background: #ffffff !important;
  border-right: 3px solid var(--gbnr-border) !important;
  border-bottom: 3px solid var(--gbnr-border) !important;
  transform: rotate(45deg) !important;
}

/* Human assistant */
#gbnr-launcher-img {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2 !important;
  width: 132px !important;
  height: 132px !important;
  object-fit: cover !important;
  object-position: 50% 24% !important;
  border-radius: 50% !important;
  border: 4px solid #ffffff !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.28), 0 0 0 4px rgba(16,166,74,.75) !important;
  background: #ffffff !important;
  transition: transform .18s ease !important;
  pointer-events: none !important;
  max-width: none !important;
  max-height: none !important;
}

#gbnr-launcher:hover #gbnr-launcher-img,
#gbnr-launcher:focus #gbnr-launcher-img {
  transform: translateY(-4px) scale(1.03) !important;
}

/* PANEL */
#gbnr-panel {
  position: fixed !important;
  right: 18px !important;
  bottom: 222px !important;
  width: min(440px, calc(100vw - 32px)) !important;
  z-index: 2147483001 !important;
  display: none !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#gbnr-panel.gbnr-open {
  display: block !important;
}

/* CHAT UI */
.gbnr-shell {
  width: 100% !important;
  max-width: 940px !important;
  margin: 24px auto !important;
  border: 3px solid var(--gbnr-border) !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.16) !important;
}

#gbnr-panel .gbnr-shell {
  margin: 0 !important;
  max-width: none !important;
}

.gbnr-header {
  background: linear-gradient(135deg, #056d2e, #18c85a) !important;
  color: #fff !important;
  padding: 16px 18px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

.gbnr-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.gbnr-small-avatar {
  width: 58px !important;
  height: 58px !important;
  object-fit: cover !important;
  object-position: 50% 24% !important;
  border-radius: 50% !important;
  border: 3px solid rgba(255,255,255,.65) !important;
  background: #fff !important;
}

.gbnr-title {
  font-size: 21px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
}

.gbnr-subtitle {
  font-size: 12px !important;
  opacity: .96 !important;
  margin-top: 4px !important;
  font-weight: 700 !important;
}

.gbnr-close {
  all: unset !important;
  cursor: pointer !important;
  background: rgba(255,255,255,.22) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.4) !important;
  border-radius: 999px !important;
  padding: 7px 11px !important;
  font-weight: 900 !important;
}

.gbnr-body {
  padding: 14px !important;
  background: linear-gradient(180deg, #fff, #f7fff9) !important;
}

.gbnr-log {
  height: 355px !important;
  overflow-y: auto !important;
  padding: 10px !important;
  border: 1px solid rgba(16,166,74,.20) !important;
  border-radius: 18px !important;
  background: #fff !important;
}

.gbnr-page-chatbot .gbnr-log {
  height: 435px !important;
}

.gbnr-msg {
  display: flex !important;
  margin: 10px 0 !important;
}

.gbnr-user {
  justify-content: flex-end !important;
}

.gbnr-bot {
  justify-content: flex-start !important;
}

.gbnr-bubble {
  max-width: 84% !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.gbnr-user .gbnr-bubble {
  background: var(--gbnr-green) !important;
  color: #fff !important;
  border-bottom-right-radius: 5px !important;
}

.gbnr-bot .gbnr-bubble {
  background: var(--gbnr-soft) !important;
  color: #123d24 !important;
  border: 1px solid rgba(16,166,74,.35) !important;
  border-bottom-left-radius: 5px !important;
}

.gbnr-card {
  background: #ffffff !important;
  border: 1px solid rgba(16,166,74,.35) !important;
  border-radius: 16px !important;
  padding: 12px !important;
  margin-top: 10px !important;
}

.gbnr-chips,
.gbnr-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 12px 0 0 !important;
}

.gbnr-chip,
.gbnr-action,
.gbnr-send {
  all: unset !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(16,166,74,.45) !important;
  background: #fff !important;
  color: var(--gbnr-dark) !important;
  border-radius: 999px !important;
  padding: 9px 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.gbnr-action.gbnr-primary,
.gbnr-send {
  border: none !important;
  background: linear-gradient(135deg,var(--gbnr-green),var(--gbnr-green2)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(7,132,55,.24) !important;
}

.gbnr-input-row {
  display: flex !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

.gbnr-input {
  flex: 1 !important;
  border: 2px solid rgba(16,166,74,.45) !important;
  border-radius: 999px !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  outline: none !important;
}

.gbnr-note {
  margin-top: 9px !important;
  font-size: 12px !important;
  color: #3a6848 !important;
  font-weight: 700 !important;
}

@keyframes gbnrBubble {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@media(max-width:640px) {
  #gbnr-floating-root {
    right: 6px !important;
    bottom: 8px !important;
    width: 238px !important;
    height: 176px !important;
  }

  #gbnr-launcher {
    width: 230px !important;
    height: 170px !important;
  }

  #gbnr-launcher-img {
    width: 112px !important;
    height: 112px !important;
  }

  #gbnr-launcher-bubble {
    right: 78px !important;
    top: 10px !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  #gbnr-panel {
    left: 10px !important;
    right: 10px !important;
    bottom: 192px !important;
    width: auto !important;
  }

  .gbnr-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .gbnr-input-row {
    flex-direction: column !important;
  }

  .gbnr-send {
    width: 100% !important;
  }

  .gbnr-bubble {
    max-width: 94% !important;
  }
}
