#bnk-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#bnk-chat-bubble {
  background: rgba(30, 30, 50, 0.97);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: #a5b4fc;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  animation: bnk-fadein 0.5s ease;
}

#bnk-chat-toggle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
  transition: transform 0.2s;
}

#bnk-chat-toggle:hover { transform: scale(1.08); }

#bnk-chat-window {
  position: fixed;
  top: 20px;
  bottom: 90px;
  right: 24px;
  width: 340px;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  animation: bnk-slidein 0.25s ease;
  overflow: hidden;
}

#bnk-chat-window.hidden { display: none; }

#bnk-chat-header {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#bnk-chat-header .bnk-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

#bnk-chat-header .bnk-online {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
}

#bnk-chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#bnk-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8f8fc;
}

#bnk-chat-messages::-webkit-scrollbar { width: 4px; }
#bnk-chat-messages::-webkit-scrollbar-track { background: transparent; }
#bnk-chat-messages::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.25); border-radius: 2px; }

.bnk-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 85%;
}

.bnk-msg.visitor {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bnk-msg-avatar {
  width: 28px;
  height: 28px;
  background: #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.bnk-msg-body {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0 10px 10px 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1a1a2e;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bnk-msg.visitor .bnk-msg-body {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 10px 0 10px 10px;
  color: white;
  box-shadow: none;
}

.bnk-msg-img {
  max-width: 200px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
}

.bnk-msg-time {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.35);
  margin-top: 3px;
  text-align: right;
}

.bnk-msg.admin .bnk-msg-time { text-align: left; }

#bnk-chat-input-area {
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  padding: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  background: #ffffff;
}

#bnk-file-btn {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

#bnk-file-input { display: none; }

#bnk-chat-input {
  flex: 1;
  background: #f3f4f8;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: #1a1a2e;
  font-size: 13px;
  outline: none;
  resize: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

#bnk-chat-input:focus { border-color: rgba(99, 102, 241, 0.5); }
#bnk-chat-input::placeholder { color: rgba(0, 0, 0, 0.35); }

#bnk-send-btn {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

#bnk-send-btn:hover { opacity: 0.85; }

@keyframes bnk-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bnk-slidein {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  #bnk-chat-window {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    border-radius: 0;
  }
  #bnk-chat-btn {
    bottom: 16px;
    right: 16px;
  }
}

#bnk-chat-footer {
  text-align: center;
  padding: 5px 8px;
  flex-shrink: 0;
  background: #ffffff;
}

#bnk-chat-footer a {
  font-size: 10px;
  color: rgba(99, 102, 241, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}

#bnk-chat-footer a:hover {
  color: rgba(99, 102, 241, 0.85);
}
