#cfab,
#cfab * {
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

#cfab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}

#cfab-card {
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  width: 300px;
  box-shadow: 0 16px 50px rgba(0, 20, 80, .18);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.3, .5, 1);
  pointer-events: none;
}

#cfab-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0032ff;
  padding: 16px 18px;
}

#cfab-logo {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cfab-logo i {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

#cfab-logo i.dot-a { left: 9px; background: #0032ff; }
#cfab-logo i.dot-b { left: 16px; background: #00e6a0; opacity: .85; }

#cfab-htx {
  flex: 1;
  line-height: 1.3;
  color: #fff;
}

#cfab-htx #cfab-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

#cfab-htx #cfab-sub {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, .85);
}

#cfab-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .15s ease;
  flex-shrink: 0;
}

#cfab-close:hover { background: rgba(255, 255, 255, .15); }
#cfab-close svg { width: 22px; height: 22px; }

#cfab-body { padding: 12px 14px 14px; }

#cfab .crow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 8px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .15s ease;
}

#cfab .crow:hover { background: #f5f7fb; }

#cfab .crow-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#cfab .crow-ic svg { width: 22px; height: 22px; }

#cfab .crow-ic.ic-blue { background: #eef1ff; color: #0032ff; }
#cfab .crow-ic.ic-green { background: #e3fbf3; color: #009e6f; }

#cfab .crow-tx {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

#cfab .crow-tx b {
  font-size: 14.5px;
  font-weight: 600;
  color: #0a1633;
}

#cfab .crow-tx small {
  font-size: 12px;
  color: #8a90a2;
  font-weight: 400;
}

#cfab #cfab-btn {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #0032ff;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s cubic-bezier(.34, 1.4, .5, 1), background .25s ease;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  overflow: hidden;
}

#cfab #cfab-btn:hover { transform: scale(1.06); }
#cfab #cfab-btn svg { width: 27px; height: 27px; }

#cfab.open #cfab-btn {
  background: #0026cc;
  transform: rotate(90deg);
}

#cfab.open #cfab-btn:hover { transform: rotate(90deg) scale(1.06); }

#cfab-btn-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  pointer-events: auto;
}

#cfab-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #0032ff;
  opacity: .45;
  filter: blur(10px);
  z-index: 0;
  animation: cfab-pulse 2.6s ease-in-out infinite;
}

@keyframes cfab-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.08); }
}

#cfab.open #cfab-glow { animation: none; opacity: .4; }

#cfab.open #cfab-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Skjul ikonerne der ikke er aktive, styres via .open */
#cfab-icon-chat { display: block; }
#cfab-icon-close { display: none; }
#cfab.open #cfab-icon-chat { display: none; }
#cfab.open #cfab-icon-close { display: block; }

@media (max-width: 768px) {
  #cfab { bottom: 16px; right: 16px; }
  #cfab-card { width: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  #cfab-glow { animation: none; }
  #cfab-card,
  #cfab #cfab-btn { transition: none; }
}
