/* LiMaS floating chatbot */
.limas-chatbot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1080;
  overflow: visible;
  font-family: var(--limas-font, "IBM Plex Sans", "Segoe UI", sans-serif);
}

.limas-chatbot-fab-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-left: auto;
  overflow: visible;
}

.limas-chatbot-fab {
  position: relative;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #005498;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 84, 152, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

/* Attention rings while chat is closed */
.limas-chatbot-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  display: none;
}

.limas-chatbot:not(.is-open) .limas-chatbot-ping {
  display: block;
}

.limas-chatbot:not(.is-open) .limas-chatbot-ping--a {
  border: 3px solid #9e1b1f;
  animation: limasChatPing 1.8s ease-out infinite;
}

.limas-chatbot:not(.is-open) .limas-chatbot-ping--b {
  border: 3px solid #7c3aed;
  animation: limasChatPing 1.8s ease-out infinite 0.55s;
}

.limas-chatbot:not(.is-open) .limas-chatbot-fab {
  animation: limasChatFabGlow 1.8s ease-out infinite;
}

@keyframes limasChatPing {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }
  80% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes limasChatFabGlow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(158, 27, 31, 0.55),
      0 0 0 0 rgba(124, 58, 237, 0.4),
      0 8px 24px rgba(0, 84, 152, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(158, 27, 31, 0.18),
      0 0 0 16px rgba(124, 58, 237, 0.12),
      0 8px 24px rgba(0, 84, 152, 0.35);
  }
}

.limas-chatbot-fab:hover,
.limas-chatbot-fab:focus {
  background: #00437a;
  outline: none;
  transform: translateY(-1px);
}

.limas-chatbot-fab i {
  font-size: 22px;
  position: relative;
  z-index: 1;
}

.limas-chatbot.is-open .limas-chatbot-fab {
  background: #1a1d21;
  animation: none;
}

.limas-chatbot.is-open .limas-chatbot-ping {
  display: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .limas-chatbot-ping,
  .limas-chatbot:not(.is-open) .limas-chatbot-fab {
    animation: none !important;
  }

  .limas-chatbot-ping {
    display: none !important;
  }
}

.limas-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(26, 29, 33, 0.18);
  overflow: hidden;
}

.limas-chatbot-panel[hidden] {
  display: none !important;
}

.limas-chatbot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  background: #005498;
  color: #fff;
}

.limas-chatbot-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.limas-chatbot-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.9;
}

.limas-chatbot-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.limas-chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f6f7f9;
}

.limas-chatbot-msg {
  max-width: 92%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1a1d21;
}

.limas-chatbot-msg p {
  margin: 0 0 8px;
}

.limas-chatbot-msg p:last-child {
  margin-bottom: 0;
}

.limas-chatbot-msg.is-bot {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.limas-chatbot-msg.is-user {
  margin-left: auto;
  background: #005498;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.limas-chatbot-menu,
.limas-chatbot-faq {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
}

.limas-chatbot-menu button,
.limas-chatbot-faq button {
  text-align: left;
  border: 1px solid #c9d7ef;
  background: #fff;
  color: #005498;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.limas-chatbot-menu button:hover,
.limas-chatbot-faq button:hover,
.limas-chatbot-menu button:focus,
.limas-chatbot-faq button:focus {
  background: #eef5fc;
  border-color: #005498;
  outline: none;
}

.limas-chatbot-menu button.is-muted {
  color: #6b7280;
  border-color: #e5e7eb;
}

.limas-chatbot-list {
  margin: 8px 0;
  padding-left: 18px;
}

.limas-chatbot-list a {
  color: #005498;
  text-decoration: none;
  font-weight: 600;
}

.limas-chatbot-list a:hover {
  text-decoration: underline;
}

.limas-chatbot-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #005498;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13px;
}

.limas-chatbot-cta:hover {
  background: #00437a;
}

.limas-chatbot-info {
  font-size: 13px;
  line-height: 1.5;
}

.limas-chatbot-info a {
  color: #005498;
}

.limas-chatbot-hint {
  margin-top: 8px !important;
  color: #6b7280;
  font-size: 12.5px !important;
}

.limas-chatbot-loading {
  color: #6b7280;
  font-style: italic;
}

.limas-chatbot-foot {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px;
}

.limas-chatbot-form {
  display: flex;
  gap: 8px;
}

.limas-chatbot-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  outline: none;
}

.limas-chatbot-input:focus {
  border-color: #005498;
  box-shadow: 0 0 0 3px rgba(0, 84, 152, 0.15);
}

.limas-chatbot-send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #005498;
  color: #fff;
  cursor: pointer;
}

.limas-chatbot-send:hover {
  background: #00437a;
}

@media (max-width: 480px) {
  .limas-chatbot {
    right: 12px;
    bottom: 12px;
  }

  .limas-chatbot-panel {
    width: calc(100vw - 24px);
    height: min(70vh, 520px);
  }
}
