/* BantengBot — panel premium (ukuran tetap, tidak bergantung Tailwind purge) */
:root {
  --chat-gold: #c9a962;
  --chat-gold-soft: rgb(201 169 98 / 28%);
  --chat-crimson: #9f2b2b;
  --chat-onyx: #121214;
  --chat-onyx-soft: #1c1c1f;
}

.banteng-chat-root {
  position: fixed;
  right: 1.25rem;
  bottom: 5.75rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .banteng-chat-root {
    right: 1.75rem;
    bottom: 6.25rem;
  }
}

.banteng-chat-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: min(380px, 62vh);
  width: min(300px, calc(100vw - 1.75rem));
  border-radius: 0.875rem;
  background:
    linear-gradient(165deg, rgb(28 28 31 / 98%), rgb(14 14 16 / 99%));
  border: 1px solid rgb(201 169 98 / 22%);
  box-shadow:
    0 24px 48px rgb(0 0 0 / 45%),
    0 0 0 1px rgb(201 169 98 / 8%) inset,
    0 1px 0 rgb(255 255 255 / 4%) inset;
  backdrop-filter: blur(18px);
}

.banteng-chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgb(201 169 98 / 6%) 0%, transparent 42%, transparent 100%);
  border-radius: inherit;
}

.banteng-chat-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid rgb(201 169 98 / 14%);
  background: linear-gradient(90deg, rgb(75 20 28 / 55%), rgb(18 18 20 / 90%) 55%, rgb(18 18 20 / 95%));
}

.banteng-chat-header::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--chat-gold-soft), transparent);
}

.banteng-chat-header-logo-wrap {
  position: relative;
  flex-shrink: 0;
}

.banteng-chat-header-logo {
  width: 2.125rem;
  height: 2.125rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgb(0 0 0 / 35%));
}

.banteng-chat-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: #3ecf8e;
  border: 2px solid var(--chat-onyx);
  box-shadow: 0 0 6px rgb(62 207 142 / 55%);
}

.banteng-chat-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #f4efe6;
}

.banteng-chat-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chat-gold);
}

.banteng-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.banteng-chat-reset {
  border: 1px solid rgb(201 169 98 / 18%);
  background: transparent;
  color: rgb(201 169 98 / 72%);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.banteng-chat-reset:hover {
  border-color: rgb(201 169 98 / 42%);
  color: var(--chat-gold);
  background: rgb(201 169 98 / 8%);
}

.banteng-chat-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: none;
  border-radius: 9999px;
  background: rgb(255 255 255 / 4%);
  color: rgb(244 239 230 / 72%);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.banteng-chat-close:hover {
  background: rgb(159 43 43 / 28%);
  color: #fff;
}

.banteng-chat-close svg {
  width: 0.9rem;
  height: 0.9rem;
}

.banteng-chat-messages {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.875rem;
  scrollbar-width: thin;
  scrollbar-color: rgb(201 169 98 / 28%) transparent;
}

.banteng-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.banteng-chat-messages::-webkit-scrollbar-thumb {
  background: rgb(201 169 98 / 28%);
  border-radius: 9999px;
}

.banteng-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.banteng-chat-row.is-user {
  flex-direction: row-reverse;
}

.banteng-chat-avatar {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / 30%));
}

.banteng-chat-bubble {
  max-width: 85%;
  padding: 0.55rem 0.7rem;
  font-size: 0.74rem;
  line-height: 1.5;
  border-radius: 0.75rem;
}

.banteng-chat-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 85%;
}

.banteng-chat-stack .banteng-chat-bubble {
  max-width: 100%;
}

.banteng-chat-bubble.is-bot {
  color: #ebe6de;
  background: linear-gradient(145deg, rgb(34 34 38 / 95%), rgb(24 24 27 / 98%));
  border: 1px solid rgb(201 169 98 / 14%);
  border-bottom-left-radius: 0.2rem;
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
}

.banteng-chat-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgb(37 211 102 / 28%);
  background: rgb(37 211 102 / 10%);
  color: #9fe8b8;
  font-size: 0.56rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.banteng-chat-wa svg {
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
}

.banteng-chat-wa:hover {
  background: rgb(37 211 102 / 18%);
  border-color: rgb(37 211 102 / 45%);
  color: #d7ffe4;
  transform: translateY(-1px);
}

.banteng-chat-bubble.is-bot strong {
  color: var(--chat-gold);
  font-weight: 600;
}

.banteng-chat-bubble.is-user {
  color: #fff;
  background: linear-gradient(135deg, #a83232, #6d1f1f 68%, #4a1414);
  border: 1px solid rgb(201 169 98 / 22%);
  border-bottom-right-radius: 0.2rem;
  box-shadow: 0 6px 16px rgb(109 31 31 / 28%);
}

.banteng-chat-time {
  margin: 0.3rem 0 0;
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.banteng-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem 0.55rem;
  border-top: 1px solid rgb(201 169 98 / 10%);
  background: rgb(0 0 0 / 12%);
}

.banteng-chat-chip {
  border: 1px solid rgb(201 169 98 / 22%);
  background: rgb(201 169 98 / 6%);
  color: rgb(235 225 205 / 88%);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.banteng-chat-chip:hover {
  border-color: rgb(201 169 98 / 45%);
  background: rgb(201 169 98 / 14%);
  color: #f8f2e6;
  transform: translateY(-1px);
}

.banteng-chat-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem 0.7rem;
  border-top: 1px solid rgb(201 169 98 / 12%);
  background: linear-gradient(180deg, rgb(18 18 20 / 70%), rgb(12 12 14 / 95%));
}

.banteng-chat-input {
  flex: 1;
  font-size: 0.74rem;
  padding: 0.52rem 0.7rem;
  border-radius: 0.55rem;
  border: 1px solid rgb(201 169 98 / 16%);
  background: rgb(255 255 255 / 4%);
  color: #f4efe6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.banteng-chat-input::placeholder {
  color: rgb(244 239 230 / 38%);
}

.banteng-chat-input:focus {
  border-color: rgb(201 169 98 / 38%);
  box-shadow: 0 0 0 2px rgb(201 169 98 / 10%);
}

.banteng-chat-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: none;
  border-radius: 0.55rem;
  cursor: pointer;
  color: #1a1410;
  background: linear-gradient(135deg, #d4b76a, #a8863f);
  box-shadow: 0 4px 12px rgb(168 134 63 / 28%);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.banteng-chat-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgb(168 134 63 / 36%);
}

.banteng-chat-send:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.banteng-chat-send svg {
  width: 0.95rem;
  height: 0.95rem;
}

.banteng-chat-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border: 1px solid rgb(201 169 98 / 28%);
  cursor: pointer;
  border-radius: 9999px;
  color: #fff;
  background: linear-gradient(145deg, #b53434, #6f1d1d 70%, #4a1212);
  box-shadow:
    0 12px 28px rgb(79 18 18 / 42%),
    0 0 0 1px rgb(201 169 98 / 12%) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banteng-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow:
    0 14px 32px rgb(79 18 18 / 48%),
    0 0 0 1px rgb(201 169 98 / 22%) inset;
}

.banteng-chat-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  flex-shrink: 0;
}

.banteng-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e0c27a, #b89447);
  color: #1a1410;
  font-size: 0.48rem;
  font-weight: 700;
  border: 2px solid #121214;
  line-height: 1;
}

.banteng-chat-typing {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.banteng-chat-typing-box {
  border-radius: 0.75rem;
  border-bottom-left-radius: 0.2rem;
  border: 1px solid rgb(201 169 98 / 14%);
  background: rgb(34 34 38 / 90%);
  padding: 0.55rem 0.7rem;
}

.banteng-chat-typing-dot {
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.2rem;
  border-radius: 9999px;
  background: var(--chat-gold);
  opacity: 0.45;
  animation: banteng-chat-bounce 1.2s infinite ease-in-out;
}

.banteng-chat-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.banteng-chat-typing-dot:nth-child(3) { animation-delay: 0.3s; margin-right: 0; }

@keyframes banteng-chat-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 1; }
}