.live-chat { position: fixed; right: 18px; bottom: 18px; z-index: 120; font-family: Outfit, Manrope, system-ui, sans-serif; }
.live-chat-toggle {
  display: flex; align-items: center; gap: .45rem;
  background: #082032; color: #e0b33a; border: 0; cursor: pointer;
  border-radius: 999px; padding: .75rem 1.1rem; font: 700 .95rem Outfit, sans-serif;
  box-shadow: 0 12px 30px rgba(8,32,50,.28);
}
.live-chat-toggle:hover { filter: brightness(1.08); }
.live-chat-ico { font-size: 1.1rem; }
.live-chat-panel {
  width: min(360px, calc(100vw - 24px)); height: min(480px, 70vh);
  background: #fffdf8; border: 1px solid #d9d0c0; border-radius: 18px;
  box-shadow: 0 18px 50px rgba(8,32,50,.2);
  display: flex; flex-direction: column; overflow: hidden;
}
.live-chat-panel[hidden] { display: none !important; }
.live-chat-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #082032; color: #f6f0e4; padding: .75rem 1rem;
}
.live-chat-head small { display: block; opacity: .7; font-weight: 500; font-size: .72rem; }
.live-chat-x { background: none; border: 0; color: #e0b33a; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.live-chat-msgs { flex: 1; overflow: auto; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; background: #f3eee4; }
.live-chat-bubble { max-width: 92%; border-radius: 12px; padding: .5rem .7rem; background: #fff; border: 1px solid #e8dfcf; }
.live-chat-bubble.user { align-self: flex-end; background: #082032; color: #f6f0e4; border-color: #082032; }
.live-chat-bubble.admin { background: #efe7d6; border-color: #e0b33a; }
.live-chat-bubble span { display: block; font-size: .68rem; font-weight: 700; opacity: .75; margin-bottom: .15rem; }
.live-chat-bubble p { margin: 0; font-size: .88rem; line-height: 1.4; white-space: pre-wrap; }
.live-chat-bubble i { display: block; font-size: .65rem; opacity: .55; margin-top: .2rem; font-style: normal; }
.live-chat-form { padding: .65rem; border-top: 1px solid #d9d0c0; background: #fffdf8; }
.live-chat-form input, .live-chat-form textarea {
  width: 100%; font: 500 .88rem Outfit, sans-serif; border: 1px solid #d9d0c0;
  border-radius: 10px; padding: .45rem .6rem; background: #fff; color: #0d1b28;
}
.live-chat-row { display: flex; gap: .4rem; margin-top: .4rem; }
.live-chat-row textarea { flex: 1; resize: none; }
.live-chat-row button {
  background: linear-gradient(180deg, #efc45a, #c4921c); color: #1a1304; border: 0;
  border-radius: 10px; padding: 0 .85rem; font: 700 .82rem Outfit, sans-serif; cursor: pointer; white-space: nowrap;
}
@media (max-width: 640px) {
  .live-chat { right: 12px; bottom: 72px; }
}

.chat-balloon {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  max-width: min(360px, calc(100vw - 28px));
  padding: .85rem 1rem;
  border: 0;
  border-radius: 16px;
  background: #082032;
  color: #f6f0e4;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(8,32,50,.35);
  font: 500 .88rem Outfit, Manrope, system-ui, sans-serif;
  animation: chatBalloonIn .28s ease;
}
.chat-balloon[hidden] { display: none !important; }
.chat-balloon-ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; background: #e0b33a; font-size: 1.15rem;
}
.chat-balloon-body { display: block; min-width: 0; }
.chat-balloon-body strong { display: block; color: #e0b33a; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.chat-balloon-body b { display: block; margin: .15rem 0 .2rem; font-size: .95rem; }
.chat-balloon-body p { margin: 0; opacity: .88; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-balloon-body em { display: block; margin-top: .25rem; font-style: normal; color: #e0b33a; font-size: .72rem; }
@keyframes chatBalloonIn {
  from { transform: translateY(-12px) scale(.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.chat-nav-badge {
  margin-left: auto;
  min-width: 1.15rem; height: 1.15rem; padding: 0 .28rem;
  border-radius: 999px; background: #e0b33a; color: #1a1304;
  font: 800 .65rem Outfit, sans-serif; display: inline-grid; place-items: center;
  font-style: normal;
}
.nav-link.has-chat { position: relative; }
.chat-bell {
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--line, #d9d0c0);
  background: #fffdf8; color: #082032;
  border-radius: 12px; cursor: pointer;
}
.chat-bell-dot {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #c4921c; color: #1a1304;
  font: 800 .62rem Outfit, sans-serif; display: grid; place-items: center;
}
.chat-bell-dot[hidden] { display: none !important; }
.msg-item.unread strong::after {
  content: "";
  display: inline-block; width: 8px; height: 8px; margin-left: .4rem;
  border-radius: 50%; background: #e0b33a; vertical-align: middle;
}
