.jv-chat {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.jv-chat-launcher {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 95;
  width: 228px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--jv-g1) 40%, transparent));
}

.jv-chat-launcher-art {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.jv-chat-chevron {
  display: none;
  color: #fff;
}

.jv-chat.is-open .jv-chat-launcher {
  width: 48px;
  height: 48px;
  right: 16px;
  bottom: 16px;
  border-radius: 999px;
  background: var(--jv-grad);
  display: grid;
  place-items: center;
  overflow: visible;
  filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--jv-g1) 40%, transparent));
}

.jv-chat.is-open .jv-chat-launcher-art {
  display: none;
}

.jv-chat.is-open .jv-chat-chevron {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.jv-chat.is-open .jv-chat-chevron svg {
  display: block;
}

.jv-chat-panel {
  position: fixed;
  right: 16px;
  bottom: 76px;
  z-index: 96;
  width: min(400px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 108px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: color-mix(in srgb, var(--jv-surface) 92%, #070a12);
  border: 1px solid color-mix(in srgb, #fff 12%, transparent);
  box-shadow: 0 24px 70px color-mix(in srgb, #000 55%, transparent);
}

.jv-chat-panel[hidden] {
  display: none;
}

.jv-chat-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent);
  background: color-mix(in srgb, #070a12 45%, transparent);
}

.jv-chat-back {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.32rem 0.55rem 0.32rem 0.4rem;
  background: color-mix(in srgb, #fff 8%, transparent);
  color: var(--jv-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.jv-chat-back[hidden] {
  display: none;
}

.jv-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: #070a12;
  border: 1px solid color-mix(in srgb, var(--jv-g1) 45%, transparent);
}

.jv-chat-head-copy {
  min-width: 0;
  flex: 1;
}

.jv-chat-brand {
  margin: 0;
  font-weight: 800;
}

.jv-chat-status {
  margin: 0;
  font-size: 0.72rem;
  color: var(--jv-text-muted);
}

.jv-chat-x {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--jv-text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

.jv-chat-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.jv-chat-log {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jv-chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.jv-chat-bubble--bot,
.jv-chat-bubble--agent {
  align-self: flex-start;
  background: color-mix(in srgb, #070a12 55%, var(--jv-surface));
  border: 1px solid color-mix(in srgb, #4ade80 35%, transparent);
}

.jv-chat-bubble--user {
  align-self: flex-end;
  background: var(--jv-grad);
  color: #fff;
}

.jv-chat-bubble b.jv-chat-hi {
  color: #4ade80;
}

.jv-chat-stage {
  padding: 0 0.9rem 1.1rem;
  flex-shrink: 0;
}

.jv-chat-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.jv-chat-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 72px;
  padding: 0.7rem 0.65rem;
  border-radius: 14px;
  background: color-mix(in srgb, #070a12 50%, transparent);
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.jv-chat-opt strong {
  font-size: 0.82rem;
}

.jv-chat-opt--web {
  border: 1px solid #fb923c;
}

.jv-chat-opt--app {
  border: 1px solid #4ade80;
}

.jv-chat-opt--seo {
  border: 1px solid #60a5fa;
}

.jv-chat-opt--shop {
  border: 1px solid #e879f9;
}

.jv-chat-field {
  display: grid;
  gap: 0.45rem;
}

.jv-chat-field input,
.jv-chat-field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--jv-border);
  background: #070a12;
  color: var(--jv-text);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.jv-chat-field textarea {
  min-height: 96px;
  resize: vertical;
}

.jv-chat-field label {
  font-size: 0.78rem;
  color: var(--jv-text-muted);
}

.jv-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.jv-chat-btn {
  flex: 1;
  min-width: 120px;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.jv-chat-btn--go {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.jv-chat-btn--ghost {
  background: transparent;
  color: var(--jv-text);
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
}

.jv-chat-live {
  display: flex;
  gap: 0.45rem;
}

.jv-chat-live input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--jv-border);
  background: #070a12;
  color: var(--jv-text);
  padding: 0.65rem 0.9rem;
  font: inherit;
}

.jv-chat-live button {
  width: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--jv-grad);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.jv-chat-service {
  margin: 0.35rem 0 0.6rem;
  font-size: 0.8rem;
  color: #4ade80;
}

@media (max-width: 640px) {
  .jv-chat-launcher {
    width: 188px;
    right: 6px;
    bottom: 6px;
  }

  .jv-chat-panel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 72px;
    height: min(70vh, calc(100vh - 96px));
  }

  .jv-chat-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jv-chat-launcher {
    filter: none;
  }
}
