/* ===== Widget Chatbot Ajiw ===== */
:root {
  --ajiw-chat-primary: #2F54DD;
  --ajiw-chat-primary-dark: #23409e;
  --ajiw-chat-bg: #f5f7fb;
  --ajiw-chat-bubble-user: #2F54DD;
  --ajiw-chat-bubble-bot: #ffffff;
}

#ajiw-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ajiw-chat-primary);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(47, 84, 221, 0.35);
  cursor: pointer;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

#ajiw-chat-toggle:hover {
  transform: scale(1.06);
  background: var(--ajiw-chat-primary-dark);
}

#ajiw-chat-toggle svg {
  width: 28px;
  height: 28px;
}

#ajiw-chat-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: var(--ajiw-chat-bg);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  transition: right 0.32s ease;
  font-family: inherit;
}

#ajiw-chat-panel.ajiw-chat-open {
  right: 0;
}

.ajiw-chat-header {
  background: var(--ajiw-chat-primary);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ajiw-chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.ajiw-chat-header span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
}

#ajiw-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.ajiw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ajiw-chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ajiw-chat-msg.user {
  align-self: flex-end;
  background: var(--ajiw-chat-bubble-user);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ajiw-chat-msg.bot {
  align-self: flex-start;
  background: var(--ajiw-chat-bubble-bot);
  color: #222;
  border: 1px solid #e3e6ef;
  border-bottom-left-radius: 4px;
}

.ajiw-chat-msg.typing {
  align-self: flex-start;
  background: var(--ajiw-chat-bubble-bot);
  border: 1px solid #e3e6ef;
  color: #999;
  font-style: italic;
}

.ajiw-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e3e6ef;
  flex-shrink: 0;
}

.ajiw-chat-form input {
  flex: 1;
  border: 1px solid #dfe3ee;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
}

.ajiw-chat-form input:focus {
  border-color: var(--ajiw-chat-primary);
}

.ajiw-chat-form button {
  background: var(--ajiw-chat-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ajiw-chat-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  #ajiw-chat-panel {
    width: 100vw;
    max-width: 100vw;
    right: -100vw;
  }
}
/* ==========================================================
   TOOLTIP
========================================================== */

/* ==========================================================
   TOOLTIP
========================================================== */

#ajiw-chat-tooltip{
    position: fixed;
    bottom: 95px;
    right: 24px;

    width: 235px;
    min-height: 58px;

    padding: 12px 14px;

    background: #fff;
    border-radius: 18px;

    display: flex;
    align-items: flex-start;
    gap: 12px;

    box-shadow: 0 12px 35px rgba(0,0,0,.12);

    z-index: 1999;

    opacity: 1;
    visibility: visible;

    transition: all .25s ease;
}

#ajiw-chat-tooltip.show{
    opacity: 1;
    visibility: visible;
}

#ajiw-chat-tooltip::after{
    content:"";
    position:absolute;
    bottom:-8px;
    right:28px;

    width:16px;
    height:16px;

    background:#fff;

    transform:rotate(45deg);
}

/* ==========================================
   ICON
========================================== */

.ajiw-tooltip-icon{

    width:40px;
    height:40px;

    flex-shrink:0;

    border-radius:50%;

    background:#eef3ff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:18px;
}

/* ==========================================
   CONTENT
========================================== */

.ajiw-tooltip-content{

    flex:1;

    display:flex;
    align-items:center;

    min-height:40px;

    padding-right:18px;
}

.ajiw-tooltip-content h4{

    margin:0;

    font-size:15px;

    font-weight:700;

    line-height:1.25;

    color:#1f2937;
}

/* ==========================================
   CLOSE BUTTON
========================================== */

#ajiw-tooltip-close{

    position:absolute;

    top:8px;

    right:8px;

    width:20px;

    height:20px;

    border:none;

    border-radius:50%;

    background:#f5f5f5;

    color:#666;

    font-size:13px;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    opacity:0;
    visibility:hidden;

    transition:all .2s ease;
}

#ajiw-chat-tooltip:hover #ajiw-tooltip-close{

    opacity:1;
    visibility:visible;

}

#ajiw-tooltip-close:hover{

    background:#e8e8e8;

}