/* ============================================================
   LOGWAN LOGISTICS – Live Chat Widget Styles
   ============================================================ */

/* ── Floating toggle button ── */
.chat-toggle-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #0a2342;
  color: #fff;
  font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(10,35,66,.4);
  z-index: 9000;
  cursor: pointer;
  border: none;
  transition: transform .2s, background .2s;
}
.chat-toggle-btn:hover { background: #1a3a5c; transform: scale(1.08); }

.chat-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: .65rem; font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  align-items: center; justify-content: center;
  color: #fff;
}

/* ── Chat window ── */
.chat-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 360px;
  max-height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(10,35,66,.22);
  z-index: 9001;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ── */
.chat-header {
  background: #0a2342;
  color: #fff;
  padding: 1rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: .75rem; }
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(201,162,39,.25);
  color: #c9a227;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.chat-header-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .9rem; }
.chat-header-status { font-size: .73rem; color: #a3c4e0; margin-top: .1rem; }
.chat-close-btn {
  background: none; border: none; color: rgba(255,255,255,.65);
  font-size: 1rem; cursor: pointer; padding: .2rem;
  transition: color .2s;
}
.chat-close-btn:hover { color: #fff; }

/* ── Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .55rem;
  background: #f8fafc;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; }
.chat-msg--bot, .chat-msg--admin { justify-content: flex-start; }
.chat-msg--user { justify-content: flex-end; }

.chat-bubble {
  max-width: 80%;
  padding: .6rem .9rem;
  border-radius: 14px;
  font-size: .85rem;
  line-height: 1.5;
}
.chat-msg--bot .chat-bubble {
  background: #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}
.chat-msg--user .chat-bubble {
  background: #0a2342;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg--admin .chat-bubble {
  background: #fef9c3;
  color: #1e293b;
  border-bottom-left-radius: 4px;
  border-left: 3px solid #c9a227;
}

/* ── Quick replies ── */
.chat-quick-replies {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .5rem .75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.chat-quick-btn {
  padding: .35rem .8rem;
  border: 1.5px solid #c9a227;
  border-radius: 100px;
  background: #fff;
  color: #92400e;
  font-size: .78rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.chat-quick-btn:hover { background: #c9a227; color: #0a2342; }

/* ── Input row ── */
.chat-input-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem .75rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 100px;
  padding: .5rem .85rem;
  font-size: .85rem;
  outline: none;
  transition: border-color .2s;
  font-family: 'Open Sans', sans-serif;
}
.chat-input:focus { border-color: #c9a227; }
.chat-send-btn {
  width: 36px; height: 36px;
  background: #0a2342; color: #c9a227;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: #1a3a5c; }

/* ── Mobile ── */
@media (max-width: 480px) {
  .chat-window { width: calc(100vw - 2rem); right: 1rem; bottom: 5.5rem; }
  .chat-toggle-btn { right: 1rem; bottom: 1.5rem; }
}
