/* Koogko.dk chat widget — "Assistenten". Prefix: kgk-
   Design: minimal, warm paper tone, soft white pills/cards, no hard borders. */

#kgk-root {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: #2c3226;
  -webkit-font-smoothing: antialiased;
}
#kgk-root,
#kgk-root * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
#kgk-root button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
#kgk-root .kgk-ic {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

/* ---------- launcher ---------- */

#kgk-root .kgk-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--action, #5c6b47);
  color: #fff;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 16px rgba(35, 31, 24, 0.15);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
#kgk-root .kgk-launcher:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(35, 31, 24, 0.2);
}
#kgk-root .kgk-launcher:focus-visible {
  outline: 3px solid rgba(92, 107, 71, 0.45);
  outline-offset: 3px;
}
#kgk-root .kgk-launcher .kgk-ic {
  width: 28px;
  height: 28px;
}
/* green "online" dot on the launcher */
#kgk-root .kgk-launcher::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #53a653;
  border: 2.5px solid #fff;
}
#kgk-root.kgk-open .kgk-launcher::after {
  display: none; /* launcher shows a close icon while open */
}
#kgk-root .kgk-ic-close-l {
  display: none !important;
}
#kgk-root.kgk-open .kgk-ic-chat {
  display: none !important;
}
#kgk-root.kgk-open .kgk-ic-close-l {
  display: block !important;
}

/* ---------- teaser bubble ---------- */

#kgk-root .kgk-teaser {
  position: fixed;
  bottom: 30px;
  right: 92px;
  z-index: 2147483000;
  display: none;
  align-items: center;
  gap: 2px;
  max-width: 260px;
  background: #fff;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 18px rgba(55, 50, 35, 0.16);
  padding: 4px 6px 4px 4px;
}
#kgk-root .kgk-teaser.kgk-show {
  display: flex;
  animation: kgk-pop 0.22s ease-out;
}
#kgk-root .kgk-teaser-txt {
  font-size: 13.5px;
  font-weight: 600;
  color: #2c3226;
  text-align: left;
  padding: 8px 4px 8px 10px;
  border-radius: 10px;
}
#kgk-root .kgk-teaser-txt:hover {
  color: var(--action, #5c6b47);
}
#kgk-root .kgk-teaser-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8678;
}
#kgk-root .kgk-teaser-close:hover {
  background: #f1efe6;
  color: #2c3226;
}
#kgk-root .kgk-teaser-close .kgk-ic {
  width: 14px;
  height: 14px;
}
@keyframes kgk-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- panel: one warm paper surface ---------- */

#kgk-root .kgk-panel {
  position: fixed;
  bottom: 92px;
  right: 20px;
  width: 380px;
  height: min(640px, calc(100vh - 120px));
  z-index: 2147483000;
  display: none;
  flex-direction: column;
  background: #f4f2ea;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(40, 38, 28, 0.22);
  overflow: hidden;
}
#kgk-root.kgk-open .kgk-panel {
  display: flex;
  animation: kgk-panel-in 0.18s ease-out;
}
#kgk-root.kgk-noanim .kgk-panel {
  animation: none !important;
}
@keyframes kgk-panel-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* minimal top bar: floating controls, no colored band */

#kgk-root .kgk-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 6px 18px;
}
#kgk-root .kgk-mini-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #8a8678;
  letter-spacing: 0.01em;
}
#kgk-root .kgk-hbtn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c3226;
  background: #fff;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#kgk-root .kgk-hbtn:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(55, 50, 35, 0.2);
}
#kgk-root .kgk-hbtn:focus-visible {
  outline: 2px solid var(--action, #5c6b47);
  outline-offset: 2px;
}
#kgk-root .kgk-hbtn .kgk-ic {
  width: 16px;
  height: 16px;
}

/* message list: content anchored at the bottom, like the big chat apps */

#kgk-root .kgk-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 16px 6px;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}
#kgk-root .kgk-list-inner {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}
#kgk-root .kgk-msg {
  display: flex;
  margin-bottom: 10px;
}
#kgk-root .kgk-msg-a {
  justify-content: flex-start;
}
#kgk-root .kgk-msg-u {
  justify-content: flex-end;
}
#kgk-root .kgk-bubble {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: break-word;
}
#kgk-root .kgk-msg-a .kgk-bubble {
  background: #fff;
  color: #2c3226;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.1);
}
#kgk-root .kgk-msg-u .kgk-bubble {
  background: #3f4836;
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
}
#kgk-root .kgk-p {
  margin: 0 0 8px;
}
#kgk-root .kgk-bubble > :last-child {
  margin-bottom: 0;
}
#kgk-root .kgk-ul {
  margin: 0 0 8px;
  padding-left: 18px;
}
#kgk-root .kgk-ul li {
  margin: 3px 0;
}
#kgk-root .kgk-link {
  color: var(--action, #5c6b47);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#kgk-root .kgk-link:hover {
  color: #2c3226;
}

/* typing indicator */

#kgk-root .kgk-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}
#kgk-root .kgk-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4af9e;
  animation: kgk-bounce 1.1s infinite ease-in-out;
}
#kgk-root .kgk-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
#kgk-root .kgk-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes kgk-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* product cards: borderless, soft shadow */

#kgk-root .kgk-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}
#kgk-root .kgk-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 9px;
  text-decoration: none;
  color: inherit;
  /* clearly visible shadow so cards don't blend into the white bubble */
  box-shadow: 0 2px 8px rgba(55, 50, 35, 0.2), 0 1px 2px rgba(55, 50, 35, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#kgk-root .kgk-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(55, 50, 35, 0.26), 0 1px 3px rgba(55, 50, 35, 0.14);
}
#kgk-root .kgk-card:focus-visible {
  outline: 2px solid var(--action, #5c6b47);
  outline-offset: 2px;
}
#kgk-root .kgk-card-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #efede3;
  overflow: hidden;
}
#kgk-root .kgk-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#kgk-root .kgk-card-body {
  flex: 1;
  min-width: 0;
}
#kgk-root .kgk-card-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #2c3226;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#kgk-root .kgk-card-brand {
  font-size: 11px;
  color: #8a8678;
  margin-top: 1px;
}
#kgk-root .kgk-card-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
}
#kgk-root .kgk-card-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #2c3226;
}
#kgk-root .kgk-card-oldprice {
  font-size: 12px;
  color: #a5a08f;
}
#kgk-root .kgk-card-stock {
  font-size: 11px;
  font-weight: 600;
  color: #3e7a3e;
  margin-left: auto;
  white-space: nowrap;
}
#kgk-root .kgk-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53a653;
  margin-right: 4px;
}

#kgk-root .kgk-cards-more {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#kgk-root .kgk-cards-more[hidden] {
  display: none;
}
#kgk-root .kgk-more-wrap {
  margin-top: 8px;
}
#kgk-root .kgk-more-wrap[hidden] {
  display: none;
}
#kgk-root .kgk-more-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  color: #6f6a5a;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.1);
  transition: background 0.15s ease, color 0.15s ease;
}
#kgk-root .kgk-more-btn:hover {
  background: #fff;
  color: #2c3226;
}
#kgk-root .kgk-more-btn:focus-visible {
  outline: 2px solid var(--action, #5c6b47);
  outline-offset: 2px;
}

/* quick replies: soft white pills, stacked, left-aligned */

#kgk-root .kgk-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 2px 10px;
}
#kgk-root .kgk-chip {
  background: #fff;
  color: #2c3226;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#kgk-root .kgk-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(55, 50, 35, 0.16);
}
#kgk-root .kgk-chip:focus-visible {
  outline: 2px solid var(--action, #5c6b47);
  outline-offset: 2px;
}

/* input row: floating field on the paper surface */

#kgk-root .kgk-inputrow {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 14px 6px;
}
#kgk-root .kgk-ta {
  flex: 1;
  font-family: inherit;
  /* 16px at EVERY width: iOS zooms the page on focus if an input is under 16px,
     and landscape phones/tablets fall outside the mobile media query. */
  font-size: 16px;
  line-height: 1.45;
  color: #2c3226;
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 12px 14px;
  resize: none;
  max-height: 96px;
  overflow-y: auto;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.12);
  transition: box-shadow 0.15s ease;
}
#kgk-root .kgk-ta::placeholder {
  color: #a5a08f;
}
#kgk-root .kgk-ta:focus {
  outline: none;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.12), 0 0 0 3px rgba(92, 107, 71, 0.18);
}
#kgk-root .kgk-send {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--action, #5c6b47);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(55, 50, 35, 0.16);
  transition: background 0.15s ease, transform 0.15s ease;
}
#kgk-root .kgk-send:hover:not(:disabled) {
  background: #3f4836;
  transform: scale(1.05);
}
#kgk-root .kgk-send:disabled {
  opacity: 0.45;
  cursor: default;
}
#kgk-root .kgk-send:focus-visible {
  outline: 3px solid rgba(92, 107, 71, 0.45);
  outline-offset: 2px;
}
#kgk-root .kgk-send .kgk-ic {
  width: 19px;
  height: 19px;
  margin-left: 1px;
}

/* footer: tiny, centered, like the reference */

#kgk-root .kgk-footer {
  flex: 0 0 auto;
  font-size: 11px;
  color: #a5a08f;
  text-align: center;
  padding: 2px 14px 10px;
}
#kgk-root .kgk-footer-link {
  color: #8a8678;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#kgk-root .kgk-footer-link:hover {
  color: #2c3226;
}

/* ---------- mobile: full-screen sheet ---------- */

@media (max-width: 640px) {
  #kgk-root .kgk-launcher {
    width: 56px;
    height: 56px;
    /* closer to the bottom edge on phones, still clear of the home indicator */
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  #kgk-root.kgk-open .kgk-launcher {
    display: none; /* panel has its own close */
  }
  #kgk-root.kgk-open .kgk-teaser {
    display: none;
  }
  #kgk-root .kgk-panel {
    inset: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #kgk-root .kgk-topbar {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
  #kgk-root .kgk-teaser {
    right: 86px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  #kgk-root .kgk-chips {
    max-width: 100%;
  }
}
/* Track the dynamic viewport on browsers that support it (iOS URL bar) */
@supports (height: 100dvh) {
  @media (max-width: 640px) {
    #kgk-root .kgk-panel {
      height: 100dvh;
    }
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  #kgk-root *,
#kgk-root.kgk-open .kgk-panel,
#kgk-root .kgk-teaser.kgk-show,
#kgk-root .kgk-typing span {
    animation: none !important;
    transition: none !important;
  }
}
