/* ================= FAB WRAP ================= */
.abb-fab-wrap {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 2147483646;
}

/* ================= Tooltip (ca in poza) ================= */
.abb-tooltip {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(320px, calc(100vw - 40px));
  background: #ee7f28;
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(2,6,23,.22);
  border: 1px solid rgba(255,255,255,.10);
  padding: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.abb-tooltip.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.abb-tip-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 14px 14px 14px;
}
.abb-tip-text {
  font-size: 14px;
  line-height: 1.35;
  flex: 1;
}
.abb-tip-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}
.abb-tip-arrow {
  position: absolute;
  right: 20px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: #ee7f28;
  transform: rotate(45deg);
  border-right: 1px solid rgba(255,255,255,.10);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0px rgba(214, 107, 24, 0.2);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(214, 107, 24, 0);
  }
}

/* ================= FAB ================= */
.abb-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(214, 107, 24,0);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  z-index: 2147483647;
}
.abb-fab:hover {
  transform: translateY(-2px);
}
.abb-fab:active {
  transform: translateY(0);
}

/* avatar circle ring (ca in poza) */
.abb-fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid #d66b18;
  pointer-events: none;
  animation: pulse-animation 2s infinite;
}
.abb-fab-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
}

/* X cand e deschis */
.abb-fab-x {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  opacity: 0;
  transform: scale(.92);
  transition: opacity .18s ease, transform .18s ease;
}
.abb-fab.open .abb-fab-avatar {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .18s ease, transform .18s ease;
}
.abb-fab.open .abb-fab-x {
  opacity: 1;
  transform: scale(1);
}

/* optional: cand e open, un pic mai "serios" */
.abb-fab.open {
  background: linear-gradient(135deg,#d66b18 ,#c76010);
  box-shadow: 0 14px 30px rgba(11,42,90,.38);
}
.abb-fab.open::after {
  border-color: rgba(255,122,0,.28);
}

/* ================= Chat Container ================= */
.abb-chat {
  position: fixed;
  right: 18px;
  bottom: 92px;
  width: min(420px, calc(100vw - 36px));
  height: min(640px, calc(100dvh - 140px));
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(2,6,23,.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(2,6,23,.08);
  z-index: 2147483640;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(12px) scale(.98);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}
.abb-chat.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ================= Header ================= */
.abb-header {
  background: linear-gradient(135deg,#d66b18 ,#c76010);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.abb-h-left {
  display: flex;
  flex-direction: column;
}
.abb-header .title {
  font-weight: 900;
  letter-spacing: .2px;
  text-align: left !important;
}
.abb-header .sub {
  font-size: 12px;
  opacity: .88;
}
.abb-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* ================= Body ================= */
.abb-body {
  flex: 1;
  padding: 16px 14px;
  overflow: auto;
  background:
    radial-gradient(120% 70% at 50% 0%, #f8fbff 0%, #ffffff 55%, #f5f7fb 100%);
}

/* ================= Messages ================= */
.abb-row {
  display: flex;
  margin: 10px 0;
}
.abb-row.user {
  justify-content: flex-end;
}
.abb-row.bot {
  justify-content: flex-start;
}

.abb-bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  border: 1px solid rgba(2,6,23,.06);
  white-space: normal;
}
.abb-row.bot .abb-bubble {
  background: #eef4ff;
  color: #1F1F25;
  border-top-left-radius: 10px;
  text-align: left !important;
}
.abb-row.user .abb-bubble {
  background: linear-gradient(135deg,#ff7a00 ,#d66b18);
  color: #fff;
  border-top-right-radius: 10px;
}
.abb-bubble a {
  color: #ee7f28 !important;
}

/* ================= Buttons ================= */
.abb-btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.abb-btn {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(11,42,90,.20);
  background: #fff;
  color: #ee7f28;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.abb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(2,6,23,.08);
}
.abb-btn.primary {
  background: #ee7f28;
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.abb-btn.orange {
  background: linear-gradient(135deg,#ff7a00 ,#d66b18);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}

/* ================= Footer Input ================= */
.abb-footer {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(2,6,23,.08);
  background: #fff;
}

.abb-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(2,6,23,.14);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
}

.abb-input:focus {
  border-color: rgba(11,42,90,.45);
  box-shadow: 0 0 0 4px rgba(11,42,90,.12);
}

.abb-send {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg,#ff7a00,#d66b18);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.abb-send-ico {
  font-size: 16px;
  transform: translateX(1px);
}

/* ================= Typing ================= */
.abb-typing {
  display: inline-flex;
  gap: 6px;
  color: #64748b;
  align-items: center;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  animation: bounce 1.1s infinite;
}
.dot:nth-child(2) {
  animation-delay: .15s;
}
.dot:nth-child(3) {
  animation-delay: .3s;
}
@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .5;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ================= GDPR ================= */
.abb-gdpr {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
}
.abb-small {
  font-size: 12px;
  color: #64748b;
}

/* ================= Branding (ca in poza) ================= */
.abb-brand {
  padding: 8px 12px 12px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  background: #fff;
  border-top: 1px solid rgba(2,6,23,.06);
}
.abb-brand-accent {
  color: #ff7a00;
  font-weight: 800;
}

/* ================= MOBILE: FULL SCREEN ================= */
@media (min-width: 1024px) {
  .abb-close {
    display: none;
  }
}
@media (min-width: 1200px) {
  .abb-fab-wrap {
    right: 25px !important;
    bottom: 25px !important;
  }
}
@media (max-width: 1199px) {
  .abb-fab-wrap {
    right: 25px !important;
    bottom: 140px !important;
  }
}
@media (max-width: 680px) {
  .abb-tooltip {
    right: 0;
    bottom: 78px;
    width: min(320px, calc(100vw - 28px));
  }

  .abb-chat {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    border-radius: 0 !important;
  }

  .abb-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
  .abb-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/*#sp-bottom1 {
  z-index: 99999999 !important;
}
*/
/* Pointer-events fix for nested icons */
.abb-fab-avatar *,
.abb-fab-x {
  pointer-events: none;
}
/* Fix Joomla z-index conflicts */
#abbFabWrap,
#abbFab {
  z-index: 2147483647 !important;
  pointer-events: auto !important;
}