.ai-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #101317;
  box-shadow: 0 18px 48px rgba(16, 19, 23, .24);
  cursor: pointer;
  font-size: 15px;
  font-weight: 820;
}

.lang-toggle {
  min-width: 48px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  padding: 0 12px;
  color: inherit;
  background: rgba(255, 255, 255, .09);
  cursor: pointer;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0;
}

.site-header.is-scrolled .lang-toggle {
  color: #101317;
  border-color: rgba(16, 19, 23, .14);
  background: rgba(255, 255, 255, .72);
}

.lang-en .nav-links {
  gap: 20px;
}

.lang-en .nav-action,
.lang-en .button {
  white-space: nowrap;
}

.ai-chat-launcher span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #6048a8);
}

.ai-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 90px;
  z-index: 90;
  width: min(420px, calc(100vw - 28px));
  height: min(680px, calc(100vh - 118px));
  display: none;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(16, 19, 23, .12);
  border-radius: 8px;
  background: #f8f9f7;
  color: #101317;
  box-shadow: 0 26px 90px rgba(16, 19, 23, .28);
}

.ai-chat-panel.is-open {
  display: grid;
}

.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(16, 19, 23, .96), rgba(16, 19, 23, .72)),
    url("hero-crossborder-ai.png");
  background-size: cover;
  background-position: center;
}

.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ai-chat-title span {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #6048a8);
}

.ai-chat-title strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.ai-chat-title small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
}

.ai-chat-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}

.ai-chat-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #dfe5e2;
  background: #fff;
}

.ai-chat-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34404a;
  font-size: 13px;
  font-weight: 760;
}

.ai-chat-tools input {
  width: 16px;
  height: 16px;
  accent-color: #0f766e;
}

.ai-chat-tools button {
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  background: #fff;
  color: #34404a;
  cursor: pointer;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
}

.ai-chat-messages {
  overflow-y: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.ai-msg {
  max-width: 88%;
  border-radius: 8px;
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.ai-msg.bot {
  justify-self: start;
  background: #fff;
  border: 1px solid #dfe5e2;
}

.ai-msg.user {
  justify-self: end;
  color: #fff;
  background: #101317;
}

.ai-msg.error {
  border-color: #f0c6c1;
  background: #fff6f5;
  color: #9f2a1d;
}

.ai-sources {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dfe5e2;
  color: #5e6874;
  font-size: 12px;
}

.ai-sources a {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-chat-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  background: #f8f9f7;
}

.ai-chat-quick button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  background: #fff;
  color: #1d242b;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.ai-chat-input {
  border-top: 1px solid #dfe5e2;
  background: #fff;
  padding: 12px;
}

.ai-chat-input form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.ai-chat-input textarea {
  width: 100%;
  min-height: 48px;
  max-height: 130px;
  resize: vertical;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  color: #101317;
  background: #fff;
  font-size: 14px;
}

.ai-chat-input button {
  min-width: 74px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 820;
}

.ai-chat-input button:disabled {
  opacity: .56;
  cursor: wait;
}

@media (max-width: 560px) {
  .ai-chat-launcher {
    right: 14px;
    bottom: 14px;
  }

  .ai-chat-panel {
    right: 14px;
    bottom: 78px;
    height: min(680px, calc(100vh - 92px));
  }
}
