#wisio-chatbot {
  --wisio-chat-navy: #071b35;
  --wisio-chat-blue: #0c4e86;
  --wisio-chat-cyan: #73ebff;
  --wisio-chat-ink: #10253d;
  --wisio-chat-muted: #64748b;
  --wisio-chat-border: #dce8f1;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10000;
  color: var(--wisio-chat-ink);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

#wisio-chatbot,
#wisio-chatbot * {
  box-sizing: border-box;
}

#wisio-chatbot button,
#wisio-chatbot textarea {
  font: inherit;
}

#wisio-chatbot button {
  border: 0;
  cursor: pointer;
}

#wisio-chatbot button:focus-visible,
#wisio-chatbot textarea:focus-visible {
  outline: 3px solid var(--wisio-chat-cyan);
  outline-offset: 3px;
}

#wisio-chatbot [hidden] {
  display: none !important;
}

#wisio-chatbot .wisio-chat__launcher {
  display: grid;
  width: 64px;
  height: 64px;
  margin-left: auto;
  place-items: center;
  border: 2px solid rgba(115, 235, 255, 0.8);
  border-radius: 50%;
  background: linear-gradient(145deg, #1179b9, var(--wisio-chat-navy));
  box-shadow: 0 10px 28px rgba(2, 24, 48, 0.3), 0 0 22px rgba(115, 235, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

#wisio-chatbot .wisio-chat__launcher::before {
  content: "✦";
  position: absolute;
  margin-top: -28px;
  margin-left: 34px;
  color: var(--wisio-chat-cyan);
  font-size: 17px;
}

#wisio-chatbot .wisio-chat__launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2, 24, 48, 0.35), 0 0 28px rgba(115, 235, 255, 0.38);
}

#wisio-chatbot .wisio-chat__panel {
  display: flex;
  width: min(380px, calc(100vw - 32px));
  height: min(590px, calc(100dvh - 104px));
  min-height: 360px;
  padding: 0;
  margin-bottom: 14px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(115, 235, 255, 0.55);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 65px rgba(3, 22, 43, 0.3);
}

#wisio-chatbot .wisio-chat__header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  background: linear-gradient(120deg, #07345d, #0b5b91);
  color: #fff;
}

#wisio-chatbot .wisio-chat__header p,
#wisio-chatbot .wisio-chat__header h2 {
  margin: 0;
}

#wisio-chatbot .wisio-chat__eyebrow {
  color: var(--wisio-chat-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

#wisio-chatbot .wisio-chat__title {
  margin-top: 3px !important;
  font-size: 19px;
  font-weight: 800;
}

#wisio-chatbot .wisio-chat__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

#wisio-chatbot .wisio-chat__icon-button {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

#wisio-chatbot .wisio-chat__icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#wisio-chatbot .wisio-chat__messages {
  display: flex;
  min-height: 0;
  padding: 17px 14px 12px;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse at top right, rgba(115, 235, 255, 0.1), transparent 55%),
    #f7fbff;
}

#wisio-chatbot .wisio-chat__welcome {
  max-width: 88%;
  margin: auto auto 0 0;
  padding: 12px 14px;
  border: 1px solid var(--wisio-chat-border);
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  color: var(--wisio-chat-ink);
}

#wisio-chatbot .wisio-chat__message {
  display: flex;
  max-width: 88%;
  flex-direction: column;
  gap: 3px;
}

#wisio-chatbot .wisio-chat__message--user {
  align-self: flex-end;
  align-items: flex-end;
}

#wisio-chatbot .wisio-chat__message--assistant {
  align-self: flex-start;
  align-items: flex-start;
}

#wisio-chatbot .wisio-chat__message-label {
  padding: 0 5px;
  color: var(--wisio-chat-muted);
  font-size: 10px;
  font-weight: 700;
}

#wisio-chatbot .wisio-chat__message-content {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#wisio-chatbot .wisio-chat__message--user .wisio-chat__message-content {
  border-bottom-right-radius: 4px;
  background: #0b5b91;
  color: #fff;
}

#wisio-chatbot .wisio-chat__message--assistant .wisio-chat__message-content {
  border: 1px solid var(--wisio-chat-border);
  border-bottom-left-radius: 4px;
  background: #fff;
  color: var(--wisio-chat-ink);
}

#wisio-chatbot .wisio-chat__status {
  min-height: 18px;
  margin: 0;
  padding: 0 15px;
  color: #a33b26;
  font-size: 12px;
}

#wisio-chatbot .wisio-chat__disclosure {
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid #edf2f6;
  color: var(--wisio-chat-muted);
  font-size: 10px;
  line-height: 1.4;
}

#wisio-chatbot .wisio-chat__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 13px;
  border-top: 1px solid var(--wisio-chat-border);
  background: #fff;
}

#wisio-chatbot .wisio-chat__input {
  width: 100%;
  min-height: 42px;
  max-height: 100px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #cbd9e6;
  border-radius: 11px;
  background: #fff;
  color: var(--wisio-chat-ink);
  font-size: 13px;
}

#wisio-chatbot .wisio-chat__input::placeholder {
  color: #8293a5;
}

#wisio-chatbot .wisio-chat__send {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1179b9, #0a4c7e);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#wisio-chatbot .wisio-chat__send:disabled,
#wisio-chatbot .wisio-chat__input:disabled {
  cursor: wait;
  opacity: 0.65;
}

#wisio-chatbot .wisio-chat__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 480px) {
  #wisio-chatbot {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  #wisio-chatbot .wisio-chat__panel {
    width: min(380px, calc(100vw - max(24px, env(safe-area-inset-right)) - 12px));
    height: min(590px, calc(100dvh - 92px));
    min-height: min(360px, calc(100dvh - 92px));
  }

  #wisio-chatbot .wisio-chat__launcher {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #wisio-chatbot .wisio-chat__launcher {
    transition: none;
  }
}
