/* Aboi AI floating widget — Izztech Digital brand tokens */

:root {
  --aboi-teal: #10C5A0;
  --aboi-blue: #0079C2;
  --aboi-navy: #05101E;
  --aboi-navy-2: #08192E;
  --aboi-text: #122033;
  --aboi-muted: #5a6b80;
  --aboi-panel: #f7fafc;
  --aboi-white: #ffffff;
  --aboi-line: rgba(5, 16, 30, 0.12);
  --aboi-shadow: 0 18px 40px rgba(5, 16, 30, 0.28);
}

.aboiLauncher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aboi-navy-2), var(--aboi-navy));
  color: #fff;
  box-shadow: var(--aboi-shadow);
  font: 600 13px/1.2 ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aboiLauncher:hover,
.aboiLauncher:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(16, 197, 160, 0.28);
  outline: none;
}

.aboiLauncherIcon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--aboi-teal), var(--aboi-blue));
  flex-shrink: 0;
}

.aboiLauncherIcon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aboiPanel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 81;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--aboi-panel);
  color: var(--aboi-text);
  border-radius: 18px;
  border: 1px solid var(--aboi-line);
  box-shadow: var(--aboi-shadow);
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.aboiPanel[hidden],
.aboiLauncher[hidden] {
  display: none !important;
}

.aboiPanel.is-min {
  height: 64px;
}

.aboiHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  background: linear-gradient(135deg, var(--aboi-navy), var(--aboi-navy-2));
  color: #fff;
}

.aboiHeaderMark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--aboi-teal), var(--aboi-blue));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.aboiHeaderMark svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aboiHeaderText { flex: 1; min-width: 0; }
.aboiHeaderTitle { font: 700 14px/1.2 ui-sans-serif, system-ui, sans-serif; }
.aboiHeaderSub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font: 500 11px/1.2 ui-sans-serif, system-ui, sans-serif;
  color: rgba(255,255,255,.72);
}

.aboiDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7a8899;
}
.aboiDot.is-on { background: var(--aboi-teal); }

.aboiHeaderBtns { display: flex; gap: 4px; }
.aboiIconBtn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.aboiIconBtn:hover,
.aboiIconBtn:focus-visible { background: rgba(255,255,255,.12); outline: none; }

.aboiBody {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aboiPanel.is-min .aboiBody,
.aboiPanel.is-min .aboiComposer,
.aboiPanel.is-min .aboiToolbar { display: none; }

.aboiMsg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font: 400 13.5px/1.45 ui-sans-serif, system-ui, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.aboiMsg a { color: var(--aboi-blue); text-decoration: underline; }
.aboiMsg.is-bot {
  align-self: flex-start;
  background: var(--aboi-white);
  border: 1px solid var(--aboi-line);
  color: var(--aboi-text);
  border-bottom-left-radius: 6px;
}
.aboiMsg.is-user {
  align-self: flex-end;
  background: var(--aboi-blue);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.aboiMsg.is-error {
  align-self: flex-start;
  background: #fff6f4;
  border: 1px solid #f0c8c0;
}
.aboiMsgTime {
  display: block;
  margin-top: 6px;
  font: 500 11px/1 ui-sans-serif, system-ui, sans-serif;
  color: var(--aboi-muted);
}
.aboiMsg.is-user .aboiMsgTime {
  text-align: right;
  color: rgba(255, 255, 255, 0.8);
}
.aboiWaitBar {
  align-self: stretch;
  text-align: center;
  font: 600 12px/1.3 ui-sans-serif, system-ui, sans-serif;
  color: var(--aboi-navy);
  padding: 8px 10px;
  border: 1px dashed var(--aboi-line);
  border-radius: 10px;
  background: var(--aboi-white);
}

.aboiChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
}
.aboiChip {
  border: 1px solid var(--aboi-line);
  background: var(--aboi-white);
  color: var(--aboi-navy);
  border-radius: 999px;
  padding: 6px 10px;
  font: 600 12px/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.aboiChip:hover,
.aboiChip:focus-visible {
  border-color: var(--aboi-teal);
  color: var(--aboi-navy);
  outline: none;
}
.aboiMsgText .aboiInlineChip {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 4px;
}

.aboiTyping {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  background: var(--aboi-white);
  border: 1px solid var(--aboi-line);
  border-radius: 14px;
}
.aboiTyping span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aboi-muted);
  animation: aboiPulse 1s ease-in-out infinite;
}
.aboiTyping span:nth-child(2) { animation-delay: 0.15s; }
.aboiTyping span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aboiPulse {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.aboiToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 0 14px 8px;
}
.aboiToolbar button {
  border: 0;
  background: transparent;
  color: var(--aboi-muted);
  font: 600 12px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  padding: 4px 0;
}
.aboiToolbar button:hover { color: var(--aboi-blue); }
.aboiToolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--aboi-muted);
}
.aboiToolbar button:disabled:hover { color: var(--aboi-muted); }
.aboiToolbar .aboiEndLive {
  color: #c62828;
}
.aboiToolbar .aboiEndLive:hover,
.aboiToolbar .aboiEndLive:focus-visible {
  color: #8e0000;
  outline: none;
}

.aboiComposer {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--aboi-line);
  background: var(--aboi-white);
}
.aboiComposer textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 96px;
  border: 1px solid var(--aboi-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: 400 13.5px/1.4 ui-sans-serif, system-ui, sans-serif;
  color: var(--aboi-text);
  background: var(--aboi-panel);
}
.aboiComposer textarea:focus { outline: 2px solid rgba(0, 121, 194, 0.25); border-color: var(--aboi-blue); }
.aboiSend {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--aboi-blue);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.aboiSend:disabled { opacity: 0.45; cursor: not-allowed; }
.aboiSend svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .aboiLauncher { right: 12px; bottom: 12px; }
  .aboiPanel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 72px;
    height: min(70vh, calc(100vh - 96px));
  }
}
