.ask-kara-widget-root, .ask-kara-widget-root * {
  box-sizing: border-box;
}
.ask-kara-widget-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating bubble button */
.ak-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  background: #F5C800;
  color: #141414;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ak-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.ak-bubble__ping {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #F5C800;
  opacity: 0.35;
  animation: ak-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ak-ping {
  0% { transform: scale(1); opacity: 0.35; }
  75%, 100% { transform: scale(1.6); opacity: 0; }
}
.ak-tooltip {
  max-width: 180px;
  background: #141414;
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.ak-tooltip.ak-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Panel */
.ak-panel {
  display: none;
  flex-direction: column;
  overflow: hidden;
  width: 380px;
  height: 560px;
  max-height: 85vh;
  background: #faf7f4;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  position: fixed;
  bottom: 24px;
  right: 24px;
}
.ak-panel.ak-open { display: flex; }

@media (max-width: 640px) {
  .ak-panel {
    width: 100%;
    height: 90vh;
    max-height: none;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px 20px 0 0;
  }
}

.ak-panel__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ak-panel__brand { display: flex; align-items: center; gap: 10px; }
.ak-panel__logo-wrap { position: relative; width: 24px; height: 24px; }
.ak-panel__logo-wrap svg { width: 24px; height: 24px; }
.ak-panel__dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #faf7f4;
}
.ak-panel__name { font-size: 14px; font-weight: 600; margin: 0; line-height: 1; color: #141414; }
.ak-panel__status { font-size: 10px; color: #6b6b6b; margin: 3px 0 0; }
.ak-panel__close {
  border: none; background: none; cursor: pointer; padding: 4px; color: #6b6b6b;
}
.ak-panel__close:hover { color: #141414; }

.ak-panel__messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ak-msg-row { display: flex; }
.ak-msg-row.ak-user { justify-content: flex-end; }
.ak-msg-row.ak-kara { justify-content: flex-start; }
.ak-bubble-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ak-user .ak-bubble-msg {
  background: #F5C800;
  color: #141414;
  font-weight: 500;
  border-top-right-radius: 4px;
}
.ak-kara .ak-bubble-msg {
  background: #eeeae4;
  color: #141414;
  border-top-left-radius: 4px;
}
.ak-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.ak-chip {
  border: 1px solid rgba(0,0,0,0.15);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #141414;
}
.ak-chip:hover { border-color: #F5C800; background: #F5C800; color: #141414; }
.ak-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: #25D366;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
}
.ak-wa-link:hover { background: #20bd5c; }
.ak-typing { font-size: 13px; color: #6b6b6b; }
.ak-error { font-size: 12px; color: #c0392b; }

.ak-panel__inputbar {
  flex-shrink: 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 12px 16px;
  display: none;
}
.ak-panel__inputbar.ak-show { display: block; }
.ak-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eeeae4;
  border-radius: 12px;
  padding: 6px 8px 6px 12px;
}
.ak-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #141414;
  min-width: 0;
}
.ak-send-btn {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: none;
  background: #F5C800;
  color: #141414;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ak-send-btn:disabled { opacity: 0.3; cursor: default; }
.ak-powered { text-align: center; font-size: 10px; color: #9a9a9a; margin: 8px 0 0; }

/* Mobile overlay */
.ak-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999998;
}
.ak-overlay.ak-open { display: block; }
@media (min-width: 641px) {
  .ak-overlay { display: none !important; }
}
