@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #b8860b;
  --primary-dark: #8b6508;
  --primary-light: #fdf6e3;
  --text: #1c1a17;
  --muted: #7a756c;
  --border: #e6e0d5;
  --surface: #faf8f4;
  --bg: #ffffff;
  --shadow: 0 12px 48px rgba(0, 0, 0, 0.14);
}

/* body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #ede8df;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  } */

/* ── Widget ── */
#gk-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'Plus Jakarta Sans', sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  width: auto !important;
  font-size: 14px !important;
}

#gk-widget,
#gk-widget * {
     font-size: inherit !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}




#gk-widget {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#gk-widget.gk-visible {
  opacity: 1;
  pointer-events: all;
}

/* FAB */
#gk-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.45);
  margin-left: auto;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

#gk-fab:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(184, 134, 11, 0.55);
}

#gk-fab .ico {
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

#gk-fab .ico-open {
  opacity: 1;
  transform: scale(1);
}

#gk-fab .ico-close {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
}

#gk-fab.open .ico-open {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}

#gk-fab.open .ico-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

#gk-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: #e53935;
  border-radius: 50%;
  border: 2px solid #ede8df;
  font-size: 10px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Window */
#gk-window {
  width: 360px;
  background: var(--bg);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
  display: none;
  flex-direction: column;
  max-height: 540px;
  border: 1px solid var(--border);
  animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#gk-window.open {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.gk-header {
  background: var(--primary);
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gk-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.gk-avatar img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.gk-header-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.gk-header-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8e6a3;
}

/* Messages */
#gk-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  background: var(--surface);
}

#gk-msgs::-webkit-scrollbar {
  width: 3px;
}

#gk-msgs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.gk-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  animation: fadeIn 0.2s ease;
  word-break: break-word;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gk-msg.bot {
  background: #f0ece2;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.gk-msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

/* Quick replies */
#gk-qrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--surface);
}

.gk-qr {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 0.76rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: left;
}

.gk-qr:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Input row */
.gk-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

#gk-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}

#gk-input::placeholder {
  color: var(--muted);
}

#gk-input:focus {
  border-color: var(--primary);
}

#gk-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}

#gk-send:hover {
  opacity: 0.85;
}

#gk-send:active {
  transform: scale(0.93);
}

.gk-footer {
  text-align: center;
  font-size: 0.67rem;
  color: var(--muted);
  padding: 0 0 9px;
  letter-spacing: 0.02em;
}