/* =========================================================
   EvalLoop Jobs — Chatbot UI
   Light editorial mode + pitch-black dark mode.
   Preserves all existing IDs and classes for chatbot.js.
   ========================================================= */
/* =========================================================
   Theme variables
   ========================================================= */
#evalbot-toggle,
#evalbot-label,
#evalbot {
  --ev-bg: var(--bg, #f8f8f6);
  --ev-ink: var(--ink, #191918);
  --ev-muted: var(--muted, #747370);
  --ev-lime: var(--blue, #1685fd);
  --ev-paper: var(--white, #ffffff);
  --ev-border: var(--border, #e7e6e2);
  --ev-cyan: var(--cyan, #8ec5ff);
  --ev-blue-soft: var(--blue-soft, #eef6ff);
  --ev-shadow: rgba(25, 25, 24, 0.09);
  --ev-shadow-strong: rgba(25, 25, 24, 0.13);
  --ev-scrollbar: #d6d5d0;
  --ev-placeholder: #96948f;
  --ev-hover-blue: #0875eb;
  font-family: inherit;
}
/* Dark theme: pitch-black backgrounds. */
html[data-theme="dark"] #evalbot-toggle,
html[data-theme="dark"] #evalbot-label,
html[data-theme="dark"] #evalbot,
body[data-theme="dark"] #evalbot-toggle,
body[data-theme="dark"] #evalbot-label,
body[data-theme="dark"] #evalbot,
html.dark #evalbot-toggle,
html.dark #evalbot-label,
html.dark #evalbot,
body.dark #evalbot-toggle,
body.dark #evalbot-label,
body.dark #evalbot,
html[data-color-scheme="dark"] #evalbot-toggle,
html[data-color-scheme="dark"] #evalbot-label,
html[data-color-scheme="dark"] #evalbot,
body[data-color-scheme="dark"] #evalbot-toggle,
body[data-color-scheme="dark"] #evalbot-label,
body[data-color-scheme="dark"] #evalbot {
  --ev-bg: #000000;
  --ev-ink: #f5f7fa;
  --ev-muted: #a1a1aa;
  --ev-lime: #3b9aff;
  --ev-paper: #000000;
  --ev-border: #292929;
  --ev-cyan: #75bdff;
  --ev-blue-soft: #071625;
  --ev-shadow: rgba(0, 0, 0, 0.65);
  --ev-shadow-strong: rgba(0, 0, 0, 0.8);
  --ev-scrollbar: #383838;
  --ev-placeholder: #777780;
  --ev-hover-blue: #66b1ff;
}
/*
  Follow the operating system's dark preference only when the
  website has not explicitly selected a light or dark theme.
*/
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot-toggle,
  html:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot-label,
  html:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot,
  body:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot-toggle,
  body:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot-label,
  body:not([data-theme="light"]):not([data-color-scheme="light"]):not(.light)
  #evalbot {
    --ev-bg: #000000;
    --ev-ink: #f5f7fa;
    --ev-muted: #a1a1aa;
    --ev-lime: #3b9aff;
    --ev-paper: #000000;
    --ev-border: #292929;
    --ev-cyan: #75bdff;
    --ev-blue-soft: #071625;
    --ev-shadow: rgba(0, 0, 0, 0.65);
    --ev-shadow-strong: rgba(0, 0, 0, 0.8);
    --ev-scrollbar: #383838;
    --ev-placeholder: #777780;
    --ev-hover-blue: #66b1ff;
  }
}
/* Inherit website typography and preserve predictable sizing. */
#evalbot *,
#evalbot *::before,
#evalbot *::after {
  box-sizing: border-box;
  font-family: inherit;
}
/* Restore normal cursor inside the chatbot. */
#evalbot-toggle,
#evalbot,
#evalbot *,
#evalbot-label {
  cursor: auto;
}
#evalbot-toggle,
#evalbot-close,
#evalbot-send,
.evalbot-suggestion,
.evalbot-job-actions a,
.evalbot-resume-pin,
.evalbot-resume-cta a {
  cursor: pointer;
}
#evalbot-input {
  cursor: text;
}
/* =========================================================
   Floating chatbot label
   ========================================================= */
#evalbot-label {
  position: fixed;
  right: 90px;
  bottom: 40px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--ev-border);
  border-radius: 999px;
  background: var(--ev-paper);
  color: var(--ev-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 5px 22px var(--ev-shadow);
  opacity: 0;
  transform: translateY(6px) scale(.96);
  pointer-events: none;
  transition:
    opacity .3s ease,
    transform .3s ease;
}
#evalbot-label.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#evalbot-label .evalbot-ai-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ev-lime);
  box-shadow: 0 0 9px rgba(22, 133, 253, .35);
  animation: evalbotDotPulse 1.8s ease-in-out infinite;
}
@keyframes evalbotDotPulse {
  0%, 100% {
    opacity: .55;
    transform: scale(.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}
/* =========================================================
   Circular chatbot toggle
   ========================================================= */
#evalbot-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ev-lime);
  border-radius: 50%;
  background: var(--ev-lime);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(22, 133, 253, .23);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}
#evalbot-toggle:hover {
  background: var(--ev-hover-blue);
  border-color: var(--ev-hover-blue);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(22, 133, 253, .3);
}
#evalbot-toggle:focus-visible {
  outline: 3px solid rgba(22, 133, 253, .45);
  outline-offset: 4px;
}
#evalbot-toggle .evalbot-toggle-icon,
#evalbot-toggle .evalbot-toggle-close {
  position: absolute;
  font-size: 22px;
  line-height: 1;
  transition:
    opacity .15s ease,
    transform .15s ease;
}
#evalbot-toggle .evalbot-toggle-close {
  font-size: 28px;
  font-weight: 300;
  opacity: 0;
  transform: rotate(-45deg);
}
#evalbot-toggle.open .evalbot-toggle-icon {
  opacity: 0;
  transform: rotate(45deg);
}
#evalbot-toggle.open .evalbot-toggle-close {
  opacity: 1;
  transform: rotate(0);
}
/* =========================================================
   Main chatbot window
   ========================================================= */
#evalbot {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 9998;
  display: none;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100dvh - 130px);
  overflow: hidden;
  border: 1px solid var(--ev-border);
  border-radius: 18px;
  background: var(--ev-paper);
  color: var(--ev-ink);
  box-shadow:
    0 24px 65px var(--ev-shadow-strong),
    0 3px 12px var(--ev-shadow);
}
#evalbot.open {
  display: flex;
  animation: evalbotIn .22s ease;
}
@keyframes evalbotIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* =========================================================
   Chatbot header
   ========================================================= */
.evalbot-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: var(--ev-paper);
  border-bottom: 1px solid var(--ev-border);
}
.evalbot-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.evalbot-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 133, 253, .22);
  border-radius: 12px;
  background: var(--ev-blue-soft);
  color: var(--ev-lime);
  font-size: 16px;
}
.evalbot-title strong {
  display: block;
  color: var(--ev-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.evalbot-title small {
  display: block;
  margin-top: 3px;
  color: var(--ev-muted);
  font-size: 11px;
  line-height: 1.4;
}
#evalbot-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ev-muted);
  font-size: 21px;
  line-height: 1;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}
#evalbot-close:hover {
  background: var(--ev-bg);
  border-color: var(--ev-border);
  color: var(--ev-ink);
}
/* =========================================================
   Message area
   ========================================================= */
#evalbot-messages {
  flex: 1;
  min-height: 0;
  padding: 18px 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: var(--ev-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--ev-scrollbar) transparent;
}
#evalbot-messages::-webkit-scrollbar {
  width: 5px;
}
#evalbot-messages::-webkit-scrollbar-thumb {
  background: var(--ev-scrollbar);
  border-radius: 999px;
}
#evalbot-messages::-webkit-scrollbar-track {
  background: transparent;
}
.evalbot-message {
  max-width: 89%;
  margin-bottom: 11px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: normal;
}
.evalbot-bot {
  align-self: flex-start;
  border: 1px solid var(--ev-border);
  border-bottom-left-radius: 5px;
  background: var(--ev-paper);
  color: var(--ev-ink);
}
.evalbot-user {
  align-self: flex-end;
  border: 1px solid var(--ev-lime);
  border-bottom-right-radius: 5px;
  background: var(--ev-lime);
  color: #ffffff;
}
.evalbot-message a {
  color: var(--ev-lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.evalbot-user a {
  color: #ffffff;
}
/* =========================================================
   Typing indicator
   ========================================================= */
.evalbot-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
}
.evalbot-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ev-muted);
  animation: evalbotTyping 1.1s ease-in-out infinite;
}
.evalbot-typing span:nth-child(2) {
  animation-delay: .15s;
}
.evalbot-typing span:nth-child(3) {
  animation-delay: .3s;
}
@keyframes evalbotTyping {
  0%, 60%, 100% {
    opacity: .35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
/* =========================================================
   Recommended job cards
   ========================================================= */
.evalbot-job {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--ev-border);
  border-radius: 12px;
  background: var(--ev-paper);
  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}
.evalbot-job:hover {
  border-color: var(--ev-lime);
  box-shadow: 0 4px 15px var(--ev-shadow);
}
.evalbot-job strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ev-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.evalbot-job small {
  display: block;
  margin-bottom: 5px;
  color: var(--ev-muted);
  font-size: 11px;
  line-height: 1.5;
}
.evalbot-job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.evalbot-job-tags span {
  padding: 5px 8px;
  border: 1px solid var(--ev-border);
  border-radius: 999px;
  background: var(--ev-bg);
  color: var(--ev-muted);
  font-size: 10px;
  line-height: 1.3;
}
.evalbot-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.evalbot-job-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--ev-lime);
  border-radius: 8px;
  background: var(--ev-lime);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background .15s ease,
    transform .15s ease;
}
.evalbot-job-actions a:hover {
  background: var(--ev-hover-blue);
  transform: translateY(-1px);
}
/* =========================================================
   Quick actions and resume links
   ========================================================= */
.evalbot-quick-actions {
  padding: 0 14px 12px;
  flex-shrink: 0;
  background: var(--ev-paper);
  border-top: 1px solid var(--ev-border);
}
.evalbot-resume-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid var(--ev-border);
  border-radius: 9px;
  background: var(--ev-paper);
  color: var(--ev-ink);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease;
}
.evalbot-resume-pin:hover {
  border-color: var(--ev-lime);
  background: var(--ev-blue-soft);
  color: var(--ev-lime);
}
.evalbot-resume-cta {
  margin-top: 10px;
}
.evalbot-resume-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--ev-lime);
  border-radius: 8px;
  background: var(--ev-blue-soft);
  color: var(--ev-lime);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background .15s ease,
    color .15s ease;
}
.evalbot-resume-cta a:hover {
  background: var(--ev-lime);
  color: #ffffff;
}
/* =========================================================
   Input area
   ========================================================= */
.evalbot-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  flex-shrink: 0;
  background: var(--ev-paper);
  border-top: 1px solid var(--ev-border);
}
#evalbot-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--ev-border);
  border-radius: 10px;
  outline: none;
  background: var(--ev-bg);
  color: var(--ev-ink);
  font-size: 12.5px;
  line-height: 1.4;
  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}
#evalbot-input::placeholder {
  color: var(--ev-placeholder);
  opacity: 1;
}
#evalbot-input:focus {
  border-color: var(--ev-lime);
  box-shadow: 0 0 0 3px rgba(22, 133, 253, .16);
}
#evalbot-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ev-lime);
  border-radius: 10px;
  background: var(--ev-lime);
  color: #ffffff;
  font-size: 16px;
  transition:
    background .15s ease,
    transform .15s ease;
}
#evalbot-send:hover {
  background: var(--ev-hover-blue);
  transform: translateY(-1px);
}
#evalbot-send:focus-visible,
#evalbot-close:focus-visible,
.evalbot-suggestion:focus-visible {
  outline: 2px solid var(--ev-lime);
  outline-offset: 3px;
}
/* =========================================================
   Suggested questions
   ========================================================= */
.evalbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.evalbot-suggestion {
  padding: 7px 10px;
  border: 1px solid var(--ev-border);
  border-radius: 999px;
  background: var(--ev-paper);
  color: var(--ev-muted);
  font-size: 10.5px;
  line-height: 1.35;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease;
}
.evalbot-suggestion:hover {
  border-color: var(--ev-lime);
  background: var(--ev-blue-soft);
  color: var(--ev-lime);
}
/* =========================================================
   Mobile layout
   ========================================================= */
@media (max-width: 500px) {
  #evalbot {
    right: 12px;
    bottom: 82px;
    width: calc(100vw - 24px);
    height: min(68dvh, 600px);
    max-height: calc(100dvh - 108px);
    border-radius: 16px;
  }
  #evalbot-toggle {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
  #evalbot-label {
    right: 78px;
    bottom: 30px;
    max-width: calc(100vw - 112px);
    padding: 8px 11px;
    font-size: 11px;
  }
  .evalbot-header {
    padding: 13px 14px;
  }
  #evalbot-messages {
    padding: 14px 12px;
  }
  .evalbot-message {
    max-width: 94%;
  }
  .evalbot-input-area {
    padding: 10px;
  }
  .evalbot-quick-actions {
    padding: 0 10px 10px;
  }
}
/* =========================================================
   Reduced motion accessibility
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  #evalbot,
  #evalbot.open,
  #evalbot-toggle,
  #evalbot-label,
  #evalbot-label .evalbot-ai-dot,
  .evalbot-typing span,
  .evalbot-job,
  .evalbot-job-actions a,
  .evalbot-suggestion {
    animation: none !important;
    transition: none !important;
  }
}
