/* Inline Productions qualifier chat widget. All selectors are namespaced with "ilchat-". */
.ilchat-root {
  --ilchat-accent: #c43c30;
  --ilchat-accent-hover: #d84a3d;
  --ilchat-bg: #0b0e14;
  --ilchat-panel: #121722;
  --ilchat-bubble: #1b2130;
  --ilchat-line: rgba(255, 255, 255, 0.1);
  --ilchat-text: #f6f7fb;
  --ilchat-muted: #9aa1b2;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  color: var(--ilchat-text);
}

.ilchat-root *,
.ilchat-root *::before,
.ilchat-root *::after {
  box-sizing: border-box;
}

body.menu-open .ilchat-root,
.video-lightbox-open .ilchat-root {
  display: none;
}

.ilchat-launcher {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ilchat-accent);
  color: #fff;
  box-shadow: 0 14px 34px rgba(5, 7, 11, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ilchat-launcher:hover {
  background: var(--ilchat-accent-hover);
  transform: translateY(-2px);
}

.ilchat-launcher:focus-visible,
.ilchat-close:focus-visible,
.ilchat-chip:focus-visible,
.ilchat-send:focus-visible,
.ilchat-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ilchat-launcher svg {
  width: 28px;
  height: 28px;
}

.ilchat-launcher .ilchat-icon-close {
  display: none;
}

.ilchat-root.ilchat-is-open .ilchat-launcher .ilchat-icon-chat {
  display: none;
}

.ilchat-root.ilchat-is-open .ilchat-launcher .ilchat-icon-close {
  display: block;
}

.ilchat-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 44px);
  height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid var(--ilchat-line);
  border-radius: 14px;
  background: var(--ilchat-bg);
  box-shadow: 0 30px 90px rgba(5, 7, 11, 0.55);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.ilchat-root.ilchat-is-open .ilchat-panel {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.ilchat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--ilchat-line);
  border-top: 3px solid var(--ilchat-accent);
  background: var(--ilchat-panel);
}

.ilchat-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ilchat-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ilchat-heading {
  flex: 1;
  min-width: 0;
}

.ilchat-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.ilchat-subtitle {
  margin: 2px 0 0;
  color: var(--ilchat-muted);
  font-size: 12px;
}

.ilchat-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ilchat-muted);
  cursor: pointer;
}

.ilchat-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ilchat-close svg {
  width: 18px;
  height: 18px;
}

.ilchat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(196, 60, 48, 0.1), transparent 60%),
    var(--ilchat-bg);
}

.ilchat-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  animation: ilchat-in 0.2s ease;
}

.ilchat-msg-bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--ilchat-bubble);
  color: var(--ilchat-text);
}

.ilchat-msg-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--ilchat-accent);
  color: #fff;
}

.ilchat-msg a {
  color: #ff8a7f;
  font-weight: 700;
}

.ilchat-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.ilchat-list li + li {
  margin-top: 2px;
}

.ilchat-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ilchat-accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.ilchat-link:hover {
  background: var(--ilchat-accent-hover);
}

.ilchat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 13px 14px;
}

.ilchat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ilchat-muted);
  animation: ilchat-dot 1s infinite ease-in-out;
}

.ilchat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ilchat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.ilchat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  background: var(--ilchat-bg);
}

.ilchat-chips:empty {
  display: none;
}

.ilchat-chip {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(196, 60, 48, 0.7);
  border-radius: 999px;
  background: rgba(196, 60, 48, 0.08);
  color: var(--ilchat-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ilchat-chip:hover {
  border-color: var(--ilchat-accent);
  background: var(--ilchat-accent);
  color: #fff;
}

.ilchat-form {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--ilchat-line);
  background: var(--ilchat-panel);
}

.ilchat-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ilchat-line);
  border-radius: 10px;
  background: var(--ilchat-bg);
  color: var(--ilchat-text);
  font: inherit;
  font-size: 16px;
}

.ilchat-input::placeholder {
  color: var(--ilchat-muted);
}

.ilchat-input:focus {
  border-color: var(--ilchat-accent);
  outline: none;
}

.ilchat-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--ilchat-accent);
  color: #fff;
  cursor: pointer;
}

.ilchat-send:hover {
  background: var(--ilchat-accent-hover);
}

.ilchat-send svg {
  width: 18px;
  height: 18px;
}

.ilchat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes ilchat-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes ilchat-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 520px) {
  .ilchat-root {
    right: 16px;
    bottom: 16px;
  }

  .ilchat-launcher {
    width: 56px;
    height: 56px;
  }

  .ilchat-root.ilchat-is-open .ilchat-launcher {
    display: none;
  }

  .ilchat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    border: 0;
    border-radius: 0;
    transform: translateY(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ilchat-launcher,
  .ilchat-panel,
  .ilchat-msg,
  .ilchat-typing span {
    animation: none;
    transition: none;
  }
}
