/* Apollo Chat Assistant — floats above WhatsApp button (right:25px bottom:40px) */
.apollo-chat {
  position: fixed;
  right: 25px;
  bottom: 110px;
  z-index: 1000;
  font-family: var(--secondary-font, "Inter", sans-serif);
}

.apollo-chat__launcher {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color, #123e7c);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 8px 25px rgba(18, 62, 124, 0.35);
  transition: var(--transition, all 0.3s ease-in-out);
  position: relative;
}

.apollo-chat__launcher:hover { transform: translateY(-4px); }

.apollo-chat__launcher-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.apollo-chat__launcher.has-logo { background: #fff; padding: 0; overflow: hidden; }
.apollo-chat__launcher.has-logo .apollo-chat__launcher-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
}

.apollo-chat__launcher-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid #fff;
}

.apollo-chat__panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 220px));
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(10, 37, 77, 0.25);
  border: 1px solid var(--line, #e5e7eb);
}

.apollo-chat__panel[hidden] { display: none; }

.apollo-chat__header {
  background: var(--primary-color, #123e7c);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.apollo-chat__brand { display: flex; align-items: center; gap: 10px; }
.apollo-chat__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.apollo-chat__avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 2px; }
.apollo-chat__brand strong { display: block; font-size: 15px; line-height: 1.2; font-family: var(--primary-font, "Poppins", sans-serif); }
.apollo-chat__brand small { display: block; font-size: 11px; opacity: 0.85; }

.apollo-chat__header-actions { display: flex; align-items: center; gap: 8px; }
.apollo-chat__lang { display: flex; background: rgba(255,255,255,0.18); border-radius: 20px; padding: 2px; }
.apollo-chat__lang button {
  border: 0; background: transparent; color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 16px; cursor: pointer;
}
.apollo-chat__lang button.is-active { background: var(--secondary-color, #f5b041); color: #0a254d; }

.apollo-chat__icon-btn {
  border: 0; background: transparent; color: #fff;
  font-size: 18px; cursor: pointer; padding: 4px 6px;
}

.apollo-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--gray-color, #f8f9fa);
}

.apollo-chat__msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.apollo-chat__msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-bottom-left-radius: 4px;
  color: #1f2937;
}
.apollo-chat__msg--user {
  align-self: flex-end;
  background: var(--primary-color, #123e7c);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.apollo-chat__msg--ok { background: #e8f8ef; border-color: #27ae60; color: #14532d; }
.apollo-chat__msg--wide { max-width: 94%; }
.apollo-chat__msg.is-loading { opacity: 0.7; font-style: italic; }
.apollo-chat__msg.apollo-chat__hint { font-size: 12px; opacity: 0.85; }
.apollo-chat__msg .apollo-chat__list { margin: 8px 0 2px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.apollo-chat__msg .apollo-chat__list li { font-size: 13px; line-height: 1.45; list-style: none; display: flex; align-items: flex-start; gap: 6px; }
.apollo-chat__msg ul.apollo-chat__list li::before { content: "👉"; flex-shrink: 0; font-size: 12px; line-height: 1.5; }
.apollo-chat__msg ol.apollo-chat__list { list-style: none; counter-reset: apollo-step; }
.apollo-chat__msg ol.apollo-chat__list li { counter-increment: apollo-step; }
.apollo-chat__msg ol.apollo-chat__list li::before {
  content: counter(apollo-step);
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-color, #123e7c);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

.apollo-chat__demand-title { display: block; font-size: 13px; margin-bottom: 8px; color: var(--primary-color, #123e7c); }
.apollo-chat__demand-list { display: flex; flex-direction: column; gap: 8px; }
.apollo-chat__demand-card {
  display: flex; gap: 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px; padding: 8px;
  background: var(--gray-color, #f8f9fa);
}
.apollo-chat__demand-img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.apollo-chat__demand-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.apollo-chat__demand-name { font-weight: 700; font-size: 13px; color: #1f2937; line-height: 1.35; }
.apollo-chat__demand-meta { font-size: 11.5px; color: var(--muted, #6b7280); }
.apollo-chat__demand-jobs.is-match { color: #14532d; font-weight: 700; }
.apollo-chat__demand-actions { display: flex; gap: 6px; margin-top: 2px; }
.apollo-chat__demand-actions a {
  font-size: 11.5px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--primary-color, #123e7c);
  color: var(--primary-color, #123e7c);
  padding: 5px 10px; border-radius: 16px; white-space: nowrap;
}
.apollo-chat__demand-actions a.is-primary { background: var(--primary-color, #123e7c); color: #fff; }
.apollo-chat__demand-actions a:hover { background: var(--secondary-color, #f5b041); border-color: var(--secondary-color, #f5b041); color: #0a254d; }
.apollo-chat__view-all {
  display: inline-block; margin-top: 10px;
  font-size: 12.5px; font-weight: 700;
  color: var(--primary-color, #123e7c);
}

.apollo-chat__quick {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 10px 12px 4px;
  background: #fff;
}
.apollo-chat__quick button {
  border: 1px solid var(--primary-color, #123e7c);
  background: #fff; color: var(--primary-color, #123e7c);
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; cursor: pointer;
}
.apollo-chat__quick button:hover { background: var(--primary-color, #123e7c); color: #fff; }

.apollo-chat__input {
  display: flex; gap: 8px; padding: 10px 12px;
  background: #fff; border-top: 1px solid var(--line, #e5e7eb);
}
.apollo-chat__input input {
  flex: 1; border: 1px solid var(--line, #e5e7eb);
  border-radius: 20px; padding: 9px 14px; font-size: 13px;
}
.apollo-chat__input input:focus { outline: 2px solid var(--secondary-color, #f5b041); border-color: transparent; }
.apollo-chat__input button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--secondary-color, #f5b041); color: #0a254d; font-size: 15px;
}

.apollo-chat__callback-toggle {
  border: 0; background: var(--light-white, #eaf0f9);
  color: var(--primary-color, #123e7c);
  font-size: 12.5px; font-weight: 600;
  padding: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.apollo-chat__callback-toggle:hover { background: #dbe7f7; }

.apollo-chat__lead { padding: 12px; background: #fff; border-top: 1px solid var(--line, #e5e7eb); }
.apollo-chat__lead[hidden] { display: none; }
.apollo-chat__lead-title { font-size: 13px; font-weight: 700; color: var(--primary-color, #123e7c); margin: 0 0 8px; }
.apollo-chat__lead-fields { display: flex; flex-direction: column; gap: 8px; }
.apollo-chat__lead-fields input,
.apollo-chat__lead-fields textarea {
  border: 1px solid var(--line, #e5e7eb); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; width: 100%;
  font-family: inherit;
}
.apollo-chat__send {
  border: 0; border-radius: 8px; cursor: pointer;
  background: var(--primary-color, #123e7c); color: #fff;
  font-weight: 700; font-size: 13px; padding: 10px;
}
.apollo-chat__lead-note { font-size: 12px; margin: 0; min-height: 16px; color: var(--muted, #6b7280); }
.apollo-chat__lead-note.is-error { color: var(--red-color, #e74c3c); }
.apollo-chat__lead-note.is-ok { color: var(--light-green, #27ae60); }

@media (max-width: 480px) {
  .apollo-chat { right: 16px; bottom: 104px; }
  .apollo-chat__panel { bottom: 60px; min-height: 380px; }
}
