/* SmartBill Assistant — brand: blue #1a365d, orange #ff6a00 */

#sb-asst-root {
  --sb-asst-blue: #1a365d;
  --sb-asst-blue-deep: #0f2440;
  --sb-asst-orange: #ff6a00;
  --sb-asst-orange-soft: #fff1e6;
  --sb-asst-bg: #ffffff;
  --sb-asst-panel-bg: #f7fafc;
  --sb-asst-text: #0f172a;
  --sb-asst-muted: #64748b;
  --sb-asst-border: #e2e8f0;
  --sb-asst-shadow: 0 18px 48px rgba(15, 36, 64, 0.22);
  --sb-asst-radius: 20px;
  font-family: "Heebo", system-ui, -apple-system, sans-serif;
  direction: rtl;
  z-index: 9100;
  position: fixed;
  left: 20px;
  right: auto;
  bottom: 20px;
  width: 0;
  height: 0;
  pointer-events: none;
}

#sb-asst-root * {
  box-sizing: border-box;
}

.sb-asst-launcher {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--sb-asst-blue) 0%, #163a63 55%, var(--sb-asst-blue-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(26, 54, 93, 0.42), 0 0 0 0 rgba(255, 106, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: visible;
}

.sb-asst-launcher-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(255, 106, 0, 0.45);
  opacity: 0;
  pointer-events: none;
}

.sb-asst-launcher-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.28) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.sb-asst-launcher-ai {
  position: absolute;
  top: -4px;
  left: auto;
  right: -6px;
  z-index: 2;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sb-asst-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 106, 0, 0.45);
}

.sb-asst-launcher-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-asst-launcher svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.sb-asst-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #ffd399;
  transform: rotate(45deg);
  opacity: 0;
}

.sb-asst-spark--1 {
  top: -2px;
  right: -4px;
}

.sb-asst-spark--2 {
  bottom: 0;
  left: -6px;
  width: 4px;
  height: 4px;
}

.sb-asst-spark--3 {
  top: 4px;
  left: 22px;
  width: 5px;
  height: 5px;
  background: #fff;
}

.sb-asst-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(26, 54, 93, 0.5);
}

.sb-asst-launcher:focus-visible {
  outline: 3px solid #fdba74;
  outline-offset: 2px;
}

.sb-asst-launcher.is-alive .sb-asst-launcher-ring {
  animation: sb-asst-ring 2.4s ease-out infinite;
}

.sb-asst-launcher.is-alive .sb-asst-launcher-pulse {
  animation: sb-asst-glow 2.4s ease-in-out infinite;
}

.sb-asst-launcher.is-alive .sb-asst-spark {
  animation: sb-asst-sparkle 1.8s ease-in-out infinite;
}

.sb-asst-launcher.is-alive .sb-asst-spark--2 {
  animation-delay: 0.35s;
}

.sb-asst-launcher.is-alive .sb-asst-spark--3 {
  animation-delay: 0.7s;
}

.sb-asst-launcher.is-bouncing {
  animation: sb-asst-bounce 0.85s ease-in-out 4;
}

.sb-asst-launcher.is-bouncing .sb-asst-launcher-pulse {
  animation: sb-asst-pulse 0.85s ease-out 4;
}

.sb-asst-launcher.is-open {
  background: linear-gradient(145deg, var(--sb-asst-orange), #e85f00);
}

.sb-asst-hint {
  pointer-events: none;
  position: absolute;
  left: 74px;
  right: auto;
  bottom: 14px;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-width: 210px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--sb-asst-border);
  box-shadow: var(--sb-asst-shadow);
  color: var(--sb-asst-text);
  font-size: 12.5px;
  line-height: 1.35;
}

.sb-asst-hint.is-visible {
  display: flex;
  animation: sb-asst-hint-in 0.28s ease-out;
}

.sb-asst-hint strong {
  color: var(--sb-asst-blue);
  font-size: 13px;
}

.sb-asst-hint span {
  color: var(--sb-asst-muted);
}

@keyframes sb-asst-ring {
  0% {
    opacity: 0.7;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes sb-asst-glow {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.08);
  }
}

@keyframes sb-asst-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(0.6);
  }
  40% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
  70% {
    opacity: 0.2;
    transform: rotate(45deg) scale(0.8);
  }
}

@keyframes sb-asst-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-14px) scale(1.06);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  70% {
    transform: translateY(-7px) scale(1.03);
  }
}

@keyframes sb-asst-pulse {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes sb-asst-hint-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sb-asst-proactive {
  pointer-events: auto;
  position: absolute;
  left: 72px;
  right: auto;
  bottom: 8px;
  max-width: 240px;
  background: #fff;
  color: var(--sb-asst-text);
  border: 1px solid var(--sb-asst-border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--sb-asst-shadow);
  font-size: 13px;
  line-height: 1.45;
  display: none;
}

.sb-asst-proactive.is-visible {
  display: block;
}

.sb-asst-proactive button {
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sb-asst-muted) !important;
  cursor: pointer;
  float: left;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}

#sb-asst-root .sb-asst-proactive button:hover,
#sb-asst-root .sb-asst-proactive button:focus,
#sb-asst-root .sb-asst-proactive button:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sb-asst-orange) !important;
  border-color: transparent !important;
}

.sb-asst-panel {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: auto;
  bottom: 74px;
  width: min(390px, calc(100vw - 24px));
  height: min(580px, calc(100vh - 120px));
  background: var(--sb-asst-bg);
  border: 1px solid var(--sb-asst-border);
  border-radius: var(--sb-asst-radius);
  box-shadow: var(--sb-asst-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sb-asst-panel.is-open {
  display: flex;
  animation: sb-asst-panel-in 0.22s ease-out;
}

@keyframes sb-asst-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sb-asst-header {
  padding: 14px 14px 14px 12px;
  background: linear-gradient(135deg, var(--sb-asst-blue) 0%, var(--sb-asst-blue-deep) 70%, #163a63 100%);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.sb-asst-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sb-asst-orange), #ff9a4d, var(--sb-asst-orange));
}

.sb-asst-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sb-asst-logo {
  width: auto;
  height: 36px;
  max-width: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 5px 8px;
  flex-shrink: 0;
}

.sb-asst-logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sb-asst-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.sb-asst-header-text h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.sb-asst-header-text p {
  margin: 3px 0 0;
  font-size: 12.5px;
  opacity: 0.92;
}

.sb-asst-close {
  border: 0 !important;
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

#sb-asst-root .sb-asst-close:hover,
#sb-asst-root .sb-asst-close:focus,
#sb-asst-root .sb-asst-close:focus-visible,
#sb-asst-root .sb-asst-close:active {
  background: rgba(255, 255, 255, 0.28) !important;
  background-color: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.sb-asst-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fa 100%);
}

.sb-asst-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/* Beat Hello Elementor button:hover (#CC3366 pink) */
#sb-asst-root .sb-asst-chip,
#sb-asst-root button.sb-asst-chip {
  border: 1.5px solid #c9d7ea !important;
  background: #fff !important;
  background-color: #fff !important;
  color: var(--sb-asst-blue) !important;
  border-radius: 999px !important;
  padding: 8px 14px;
  font-size: 12.5px;
  cursor: pointer;
  text-align: right;
  line-height: 1.35;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

#sb-asst-root .sb-asst-chip:hover,
#sb-asst-root .sb-asst-chip:focus,
#sb-asst-root .sb-asst-chip:focus-visible,
#sb-asst-root .sb-asst-chip:active,
#sb-asst-root button.sb-asst-chip:hover,
#sb-asst-root button.sb-asst-chip:focus,
#sb-asst-root button.sb-asst-chip:focus-visible,
#sb-asst-root button.sb-asst-chip:active {
  border-color: var(--sb-asst-orange) !important;
  color: var(--sb-asst-orange) !important;
  background: var(--sb-asst-orange-soft) !important;
  background-color: var(--sb-asst-orange-soft) !important;
}

.sb-asst-msg {
  max-width: 92%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.sb-asst-msg.bot {
  background: #fff;
  border: 1px solid var(--sb-asst-border);
  color: var(--sb-asst-text);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.sb-asst-msg.user {
  background: var(--sb-asst-blue);
  color: #fff;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.sb-asst-links,
.sb-asst-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 12px;
}

#sb-asst-root .sb-asst-link,
#sb-asst-root .sb-asst-cta,
#sb-asst-root a.sb-asst-link,
#sb-asst-root a.sb-asst-cta,
#sb-asst-root button.sb-asst-link,
#sb-asst-root button.sb-asst-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  padding: 8px 14px;
  font-size: 12.5px;
  text-decoration: none !important;
  border: 1.5px solid var(--sb-asst-blue) !important;
  background: #fff !important;
  color: var(--sb-asst-blue) !important;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

#sb-asst-root .sb-asst-link:hover,
#sb-asst-root .sb-asst-link:focus,
#sb-asst-root .sb-asst-link:focus-visible,
#sb-asst-root .sb-asst-cta:hover,
#sb-asst-root .sb-asst-cta:focus,
#sb-asst-root .sb-asst-cta:focus-visible,
#sb-asst-root a.sb-asst-link:visited,
#sb-asst-root a.sb-asst-cta:visited {
  border-color: var(--sb-asst-orange) !important;
  color: var(--sb-asst-orange) !important;
  background: var(--sb-asst-orange-soft) !important;
  background-color: var(--sb-asst-orange-soft) !important;
}

#sb-asst-root .sb-asst-cta.primary,
#sb-asst-root a.sb-asst-cta.primary,
#sb-asst-root button.sb-asst-cta.primary {
  background: var(--sb-asst-blue) !important;
  border-color: var(--sb-asst-blue) !important;
  color: #fff !important;
}

#sb-asst-root .sb-asst-cta.primary:hover,
#sb-asst-root .sb-asst-cta.primary:focus-visible {
  background: var(--sb-asst-blue-deep) !important;
  border-color: var(--sb-asst-blue-deep) !important;
  color: #fff !important;
}

.sb-asst-wa-bar {
  padding: 8px 10px 0;
  background: #fff;
  border-top: 1px solid var(--sb-asst-border);
}

.sb-asst-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 999px !important;
  padding: 11px 14px;
  background: #25d366;
  color: #fff !important;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
}

.sb-asst-wa-btn:hover {
  background: #1ebe57;
}

.sb-asst-wa-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sb-asst-footer {
  border-top: 0;
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #fff;
}

.sb-asst-footer input {
  flex: 1;
  border: 1.5px solid var(--sb-asst-border);
  border-radius: 999px !important;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}

.sb-asst-footer input:focus {
  outline: 2px solid rgba(255, 106, 0, 0.35);
  border-color: var(--sb-asst-orange);
}

.sb-asst-footer button,
#sb-asst-root .sb-asst-footer button {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--sb-asst-orange) !important;
  background-color: var(--sb-asst-orange) !important;
  color: #fff !important;
  padding: 0 18px;
  min-height: 42px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

#sb-asst-root .sb-asst-footer button:hover,
#sb-asst-root .sb-asst-footer button:focus,
#sb-asst-root .sb-asst-footer button:focus-visible,
#sb-asst-root .sb-asst-footer button:active {
  background: #e85f00 !important;
  background-color: #e85f00 !important;
  color: #fff !important;
}

.sb-asst-footer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sb-asst-typing {
  display: none;
  margin: 0 0 4px;
}

.sb-asst-typing.is-on {
  display: block;
}

.sb-asst-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 92%;
  margin-left: auto;
  padding: 10px 12px;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  background: #fff;
  border: 1px solid var(--sb-asst-border);
  color: var(--sb-asst-muted);
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 36, 64, 0.04);
}

.sb-asst-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sb-asst-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sb-asst-blue);
  opacity: 0.35;
  animation: sb-asst-dot 1.2s ease-in-out infinite;
}

.sb-asst-typing-dots i:nth-child(2) {
  animation-delay: 0.2s;
}

.sb-asst-typing-dots i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sb-asst-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.sb-asst-typing-text {
  color: var(--sb-asst-muted);
}

/* Lead gate overlay */
.sb-asst-lead-gate {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(15, 36, 64, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sb-asst-lead-gate.is-open {
  display: flex;
}

.sb-asst-lead-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: var(--sb-asst-shadow);
  position: relative;
}

.sb-asst-lead-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--sb-asst-blue);
}

.sb-asst-lead-card > p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--sb-asst-muted);
  line-height: 1.45;
}

.sb-asst-lead-card label {
  display: block;
  font-size: 12px;
  color: var(--sb-asst-blue);
  font-weight: 600;
  margin-bottom: 10px;
}

.sb-asst-lead-card input {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1.5px solid var(--sb-asst-border);
  border-radius: 999px !important;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}

.sb-asst-lead-error {
  color: #b91c1c;
  font-size: 12.5px;
  margin: 0 0 8px !important;
}

.sb-asst-lead-submit {
  width: 100%;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--sb-asst-orange) !important;
  background-color: var(--sb-asst-orange) !important;
  color: #fff !important;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

#sb-asst-root .sb-asst-lead-submit:hover,
#sb-asst-root .sb-asst-lead-submit:focus,
#sb-asst-root .sb-asst-lead-submit:focus-visible,
#sb-asst-root .sb-asst-lead-submit:active {
  background: #e85f00 !important;
  background-color: #e85f00 !important;
  color: #fff !important;
}

.sb-asst-lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sb-asst-lead-close {
  position: absolute;
  top: 8px;
  left: 8px;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sb-asst-muted) !important;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

#sb-asst-root .sb-asst-lead-close:hover,
#sb-asst-root .sb-asst-lead-close:focus,
#sb-asst-root .sb-asst-lead-close:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sb-asst-orange) !important;
  border-color: transparent !important;
}

@media (max-width: 640px) {
  #sb-asst-root {
    left: 12px;
    right: auto;
    bottom: 16px;
  }

  .sb-asst-panel {
    position: fixed;
    right: 8px;
    left: 8px;
    bottom: 78px;
    width: auto;
    height: min(78vh, calc(100vh - 100px));
    border-radius: 16px;
  }

  .sb-asst-proactive {
    left: 0;
    right: auto;
    bottom: 68px;
    max-width: min(260px, calc(100vw - 80px));
  }

  .sb-asst-launcher {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sb-asst-launcher.is-bouncing,
  .sb-asst-launcher.is-bouncing .sb-asst-launcher-pulse,
  .sb-asst-launcher.is-alive .sb-asst-launcher-ring,
  .sb-asst-launcher.is-alive .sb-asst-launcher-pulse,
  .sb-asst-launcher.is-alive .sb-asst-spark,
  .sb-asst-panel.is-open,
  .sb-asst-hint.is-visible {
    animation: none;
  }
}
