.ipsik-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  font-family: inherit;
}
.ipsik-chat__fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: #102442;
  color: #fff;
  box-shadow: 0 10px 26px rgba(16, 36, 66, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.ipsik-chat__fab:hover {
  background: #17335c;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(16, 36, 66, 0.34);
}
.ipsik-chat__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}
.ipsik-chat__dot--fab {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
}
.ipsik-chat__dot.is-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.ipsik-chat__dot.is-offline { background: #f59e0b; }

.ipsik-chat__panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(360px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #d7e0ee;
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(16, 36, 66, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ipsik-chat__panel[hidden] { display: none; }

.ipsik-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: #102442;
  color: #fff;
}
.ipsik-chat__title { font-weight: 700; font-size: 14.5px; }
.ipsik-chat__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 3px;
}
.ipsik-chat__close {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.ipsik-chat__body { padding: 16px; }
.ipsik-chat__intro { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: #33455e; }
.ipsik-chat__form { display: flex; flex-direction: column; gap: 9px; }
.ipsik-chat__form input,
.ipsik-chat__form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cdd7e6;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  color: #102442;
  background: #f9fbfe;
}
.ipsik-chat__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 10px;
  border: 0;
  background: #102442;
  color: #fff;
  font: 600 13.5px/1.1 inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.ipsik-chat__btn--wa { background: #15803d; }
.ipsik-chat__btn--ghost { background: #eef3fa; color: #102442; }
.ipsik-chat__offline-actions { display: flex; flex-direction: column; gap: 8px; }
.ipsik-chat__alt { margin-top: 12px; font-size: 12px; color: #5b6d87; text-align: center; }
.ipsik-chat__alt a { color: #102442; font-weight: 600; }
.ipsik-chat__err { font-size: 12.5px; color: #b91c1c; background: #fef2f2; padding: 8px 10px; border-radius: 8px; }

.ipsik-chat__thread-view { display: flex; flex-direction: column; height: 360px; }
.ipsik-chat__thread-view[hidden] { display: none; }
.ipsik-chat__msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f6f8fc;
}
.ipsik-chat__msg {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}
.ipsik-chat__msg--visitor {
  align-self: flex-end;
  background: #102442;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ipsik-chat__msg--staff {
  align-self: flex-start;
  background: #fff;
  color: #102442;
  border: 1px solid #d7e0ee;
  border-bottom-left-radius: 4px;
}
.ipsik-chat__msg-meta { font-size: 10.5px; opacity: 0.72; margin-top: 3px; }
.ipsik-chat__reply {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #e1e8f2;
  background: #fff;
}
.ipsik-chat__reply input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #cdd7e6;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
}
.ipsik-chat__reply button {
  padding: 9px 14px;
  border-radius: 999px;
  border: 0;
  background: #102442;
  color: #fff;
  font: 600 13px/1 inherit;
  cursor: pointer;
}
