/* UNAJ Solar live chat widget */
.unaj-wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.unaj-wa-fab__btn,
.unaj-wa-fab__hint {
  pointer-events: auto;
}

.unaj-wa-fab__btn {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, #0b1f33 0%, #0a2a1c 55%, #1f9a3a 140%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(11, 31, 51, 0.35);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
  animation: unaj-wa-btn-pulse 2.8s ease-in-out infinite;
}

.unaj-wa-fab__btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 36px rgba(11, 31, 51, 0.42);
  animation: none;
}

.unaj-wa-fab__btn svg {
  display: block;
}

.unaj-wa-fab__hint {
  position: relative;
  background: #fff;
  color: #0b1f33;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(11, 31, 51, 0.08);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.14);
  white-space: nowrap;
  margin-right: 2px;
  animation: unaj-wa-hint-bob 2.4s ease-in-out infinite;
}

.unaj-wa-fab__hint::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
  border-right: 1px solid rgba(11, 31, 51, 0.06);
  border-bottom: 1px solid rgba(11, 31, 51, 0.06);
}

@keyframes unaj-wa-hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes unaj-wa-btn-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(11, 31, 51, 0.35); }
  50% { box-shadow: 0 12px 30px rgba(11, 31, 51, 0.35), 0 0 0 10px rgba(45, 184, 75, 0.14); }
}

.unaj-wa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 21, 37, 0.4);
  z-index: 99991;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.unaj-wa-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.unaj-wa-chat {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 99992;
  width: min(380px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 120px));
  background: #f3f7f4;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(11, 31, 51, 0.28);
  border: 1px solid rgba(11, 31, 51, 0.08);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s, visibility 0.3s;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

.unaj-wa-chat.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.unaj-wa-chat__head {
  background: linear-gradient(135deg, #0b1f33 0%, #0a2a1c 100%);
  color: #fff;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.unaj-wa-chat__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2db84b, #1f9a3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.unaj-wa-chat__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unaj-wa-chat__meta {
  flex: 1;
  min-width: 0;
}

.unaj-wa-chat__meta strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  font-family: "Lexend Deca", "Manrope", sans-serif;
}

.unaj-wa-chat__meta span {
  font-size: 12px;
  opacity: 0.8;
}

.unaj-wa-chat__meta span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2db84b;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(45, 184, 75, 0.25);
  vertical-align: middle;
}

.unaj-wa-chat__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unaj-wa-chat__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.unaj-wa-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 12px;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(45, 184, 75, 0.08), transparent 55%),
    linear-gradient(180deg, #eef4f0 0%, #f7faf8 100%);
}

.unaj-wa-msg {
  display: flex;
  margin-bottom: 10px;
  animation: unaj-wa-in 0.28s ease;
}

@keyframes unaj-wa-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.unaj-wa-msg--bot { justify-content: flex-start; }
.unaj-wa-msg--user { justify-content: flex-end; }

.unaj-wa-bubble {
  max-width: 88%;
  padding: 10px 12px 8px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  box-shadow: 0 4px 14px rgba(11, 31, 51, 0.06);
  word-wrap: break-word;
}

.unaj-wa-msg--bot .unaj-wa-bubble {
  background: #fff;
  color: #132a40;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(11, 31, 51, 0.06);
}

.unaj-wa-msg--user .unaj-wa-bubble {
  background: linear-gradient(135deg, #0b1f33, #0a2a1c);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.unaj-wa-bubble__time {
  display: block;
  text-align: right;
  font-size: 10px;
  color: #7a8b99;
  margin-top: 4px;
}

.unaj-wa-msg--user .unaj-wa-bubble__time {
  color: rgba(255, 255, 255, 0.65);
}

.unaj-wa-bubble strong { font-weight: 700; }
.unaj-wa-bubble .wa-line { margin: 4px 0; }
.unaj-wa-bubble .wa-ok { color: #059669; font-weight: 600; }
.unaj-wa-bubble .wa-warn { color: #dc2626; font-weight: 600; }
.unaj-wa-bubble .wa-sun { color: #b45309; font-weight: 600; }

.unaj-wa-chat__footer {
  background: #fff;
  padding: 12px;
  flex-shrink: 0;
  border-top: 1px solid rgba(11, 31, 51, 0.08);
}

.unaj-wa-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

.unaj-wa-opt {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(45, 184, 75, 0.35);
  background: #fff;
  color: #0b1f33;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.unaj-wa-opt:hover {
  background: #2db84b;
  border-color: #2db84b;
  color: #fff;
}

.unaj-wa-opt small {
  display: block;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
  font-size: 11px;
}

.unaj-wa-bill {
  display: flex;
  gap: 8px;
  align-items: center;
}

.unaj-wa-bill input {
  flex: 1;
  border: 1px solid rgba(11, 31, 51, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: #f7faf8;
}

.unaj-wa-bill input:focus {
  border-color: #2db84b;
  box-shadow: 0 0 0 3px rgba(45, 184, 75, 0.15);
}

.unaj-wa-bill button {
  border: none;
  background: linear-gradient(135deg, #2db84b, #1f9a3a);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

.unaj-wa-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unaj-wa-cta {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.unaj-wa-cta--green {
  background: linear-gradient(135deg, #2db84b, #1f9a3a);
  color: #fff;
}

.unaj-wa-cta--green:hover { filter: brightness(1.05); }

.unaj-wa-cta--ghost {
  background: #fff;
  color: #0b1f33;
  border: 1px solid rgba(11, 31, 51, 0.12);
}

.unaj-wa-typing {
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(11, 31, 51, 0.06);
}

.unaj-wa-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #999;
  animation: unaj-wa-dot 1.2s infinite;
}

.unaj-wa-typing span:nth-child(2) { animation-delay: 0.15s; }
.unaj-wa-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes unaj-wa-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 480px) {
  .unaj-wa-chat {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 88px;
    height: min(70vh, 580px);
  }
  .unaj-wa-fab { right: 14px; bottom: 18px; }
  .unaj-wa-fab__hint { display: none; }
}
