/* "Why should you hire her?" role-match chat. Uses the colour variables from styles.css. */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.hirebot {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: 'Archivo', system-ui, sans-serif;
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .5s ease .4s, transform .6s var(--ease-out) .4s;
}
body.is-loaded .hirebot { opacity: 1; transform: none; pointer-events: auto; }

.hirebot-launch {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 16px;
  border: 1px solid rgba(243, 241, 236, .28);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(20, 19, 18, .25);
  transition: background .2s, color .2s, transform .25s;
}
.hirebot-launch:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.hirebot-launch:hover .dot { background: var(--ink); }
.hirebot-launch .dot { animation: hb-pulse 2.4s ease-in-out infinite; }
.hirebot.is-open .hirebot-launch .dot { animation: none; }
@keyframes hb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 72, 28, .55); }
  50% { box-shadow: 0 0 0 7px rgba(226, 72, 28, 0); }
}

.hirebot-panel {
  width: min(400px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid rgba(20, 19, 18, .12);
  box-shadow: 0 24px 60px rgba(20, 19, 18, .28);
  transform-origin: bottom right;
  animation: hb-in .35s var(--ease-out);
}
.hirebot-panel[hidden] { display: none; }
@keyframes hb-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.hirebot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--ink);
  color: var(--paper);
}
.hirebot-id { display: flex; align-items: center; gap: 12px; }
.hirebot-id > div { display: flex; flex-direction: column; gap: 2px; }
.hirebot-avatar {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--tan) url('assets/bhavisha-headshot.jpg') 50% 30% / cover no-repeat;
  border: 1.5px solid var(--accent);
}
.hirebot-name { font-size: 15px; font-weight: 700; }
.hirebot-sub { color: var(--muted-dark); font-size: 10px; }
.hirebot-x {
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: rgba(243, 241, 236, .12);
  color: var(--paper);
  cursor: pointer;
}
.hirebot-x:hover { background: var(--accent); color: var(--ink); }

.hirebot-log {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.hb-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  animation: hb-msg .3s var(--ease-out);
}
@keyframes hb-msg { from { opacity: 0; transform: translateY(6px); } }
.hb-bot { align-self: flex-start; background: #E9E6DF; border-bottom-left-radius: 4px; }
.hb-user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.hb-doc { font-family: var(--mono); font-size: 12px; }
.hb-error { background: #F4DDD4; }
.hb-answer { white-space: pre-line; }

.hb-typing { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.hb-dots { display: inline-flex; gap: 4px; }
.hb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: hb-dot 1.2s infinite ease-in-out; }
.hb-dots i:nth-child(2) { animation-delay: .15s; }
.hb-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hb-dot {
  0%, 80%, 100% { opacity: .3; transform: none; }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Result card */
.hb-result {
  align-self: stretch;
  max-width: none;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hb-role { color: var(--muted); }
.hb-score { display: flex; align-items: baseline; gap: 8px; }
.hb-score-num { font-size: 48px; line-height: .9; font-weight: 800; font-stretch: 72%; letter-spacing: -.02em; }
.hb-score-num small { font-size: .55em; color: var(--accent); }
.hb-score-label { font-weight: 600; }
.hb-bar { height: 6px; border-radius: 999px; background: #EEEBE5; overflow: hidden; }
.hb-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 1s var(--ease-out); }
.hb-verdict { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
.hb-section { display: flex; flex-direction: column; gap: 8px; }
.hb-section > .mono { color: var(--muted); }
.hb-section ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hb-section li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.hb-section li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .55em; background: var(--accent); }
.hb-section li strong { color: var(--ink); }
.hb-pitch { margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.hb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-actions a, .hb-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.hb-cta { background: var(--accent); color: var(--ink); border: 0; }
.hb-cta:hover { color: var(--ink); filter: brightness(1.05); }
.hb-again { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.hb-again:hover { background: var(--ink); color: var(--paper); }

/* Tailored resume message */
.hb-resume { display: flex; flex-direction: column; gap: 10px; }
.hb-resume p { margin: 0; }
.hb-resume .mono { color: var(--muted); }

/* Composer */
.hirebot-form { padding: 10px 12px 12px; border-top: 1px solid var(--rule); background: var(--paper); }
.hirebot-form[hidden] { display: none; }
.hb-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 10px;
  background: #E9E6DF;
  font-family: var(--mono);
  font-size: 12px;
}
.hb-file[hidden] { display: none; }
.hb-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-file-x { border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--ink); }
.hb-compose {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
}
.hb-compose:focus-within { border-color: var(--accent); }
.hb-attach {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--ink-2);
  cursor: pointer;
}
.hb-attach:hover { background: #EEEBE5; }
.hb-attach input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.hb-attach:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.hb-compose textarea {
  flex: 1;
  min-height: 36px;
  max-height: 140px;
  padding: 8px 4px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}
.hb-send {
  flex: none;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.hb-send:hover:not(:disabled) { background: var(--accent); color: var(--ink); }
.hb-send:disabled { opacity: .35; cursor: default; }
.hb-hint { margin: 8px 2px 0; color: var(--muted); font-size: 10px; }

@media (max-width: 520px) {
  .hirebot { right: 12px; bottom: 12px; left: 12px; }
  .hirebot-panel { width: 100%; height: min(640px, calc(100dvh - 90px)); }
  .hirebot-launch { height: 46px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hirebot-launch .dot { animation: none; }
}
