/* =========================================================================
   Global Talent Recruitment — chatbot widget styles
   Every selector is prefixed "gt-chat-". The widget uses position:fixed and
   lives outside the site's document flow, so it cannot affect the site's
   layout, fonts, or spacing.
   ========================================================================= */

.gt-chat-launcher {
  position: fixed; right: 18px; bottom: 18px;
  width: 58px; height: 58px; border: none; border-radius: 50%; cursor: pointer;
  background: #1f3a93; color: #fff;
  box-shadow: 0 8px 24px rgba(20,40,90,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 2147483000; padding: 0; margin: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.gt-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,40,90,.42); }
.gt-chat-launcher svg { width: 26px; height: 26px; display: block; }
.gt-chat-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: #e63946; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-sizing: border-box; display: none;
}
.gt-chat-badge.gt-chat-visible { display: block; }

/* Panel */
.gt-chat-panel {
  position: fixed; right: 18px; bottom: 88px;
  width: 380px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(15,30,70,.35); border: 1px solid #e6e9f2; z-index: 2147483000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a2333; transform-origin: bottom right; transition: transform .18s ease, opacity .18s ease;
}
.gt-chat-panel.gt-chat-hidden { transform: translateY(12px) scale(.98); opacity: 0; pointer-events: none; }

/* Header */
.gt-chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #1f3a93; color: #fff; flex: 0 0 auto; }
.gt-chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #1f3a93; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.gt-chat-header-text { flex: 1 1 auto; min-width: 0; }
.gt-chat-title { font-size: 15px; font-weight: 700; line-height: 1.2; margin: 0; }
.gt-chat-subtitle { font-size: 12px; font-weight: 500; opacity: .85; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.gt-chat-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #46e0a5; display: inline-block; }
.gt-chat-header-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.gt-chat-iconbtn { width: 32px; height: 32px; border: none; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.gt-chat-iconbtn:hover { background: rgba(255,255,255,.28); }
.gt-chat-iconbtn svg { width: 16px; height: 16px; display: block; }

/* Scrollable body */
.gt-chat-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; background: #f6f8fc; display: flex; flex-direction: column; gap: 10px; }
.gt-chat-body::-webkit-scrollbar { width: 6px; }
.gt-chat-body::-webkit-scrollbar-thumb { background: #cdd5e6; border-radius: 3px; }

/* Messages */
.gt-chat-msg { display: flex; gap: 8px; max-width: 86%; }
.gt-chat-msg.gt-chat-bot { align-self: flex-start; }
.gt-chat-msg.gt-chat-user { align-self: flex-end; flex-direction: row-reverse; }
.gt-chat-bubble { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.gt-chat-msg.gt-chat-bot .gt-chat-bubble { background: #fff; border: 1px solid #e6e9f2; border-top-left-radius: 4px; color: #1a2333; }
.gt-chat-msg.gt-chat-user .gt-chat-bubble { background: #1f3a93; color: #fff; border-top-right-radius: 4px; }
.gt-chat-avatar-sm { width: 26px; height: 26px; border-radius: 50%; background: #1f3a93; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-top: 2px; }
.gt-chat-bubble a { color: #1f3a93; }

/* Typing */
.gt-chat-typing .gt-chat-bubble { display: flex; gap: 4px; align-items: center; padding: 14px 13px; }
.gt-chat-typing .gt-chat-bubble span { width: 7px; height: 7px; border-radius: 50%; background: #9aa7c4; animation: gt-chat-blink 1.2s infinite ease-in-out; }
.gt-chat-typing .gt-chat-bubble span:nth-child(2) { animation-delay: .2s; }
.gt-chat-typing .gt-chat-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes gt-chat-blink { 0%,80%,100% { opacity:.25; transform:scale(.9); } 40% { opacity:1; transform:scale(1); } }

/* Quick replies / option buttons */
.gt-chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; background: #f6f8fc; flex: 0 0 auto; }
.gt-chat-chip, .gt-chat-option {
  border: 1px solid #d3dbee; background: #fff; color: #1f3a93; font-size: 12.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; cursor: pointer; font-family: inherit; text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.gt-chat-chip:hover, .gt-chat-option:hover { background: #eef2ff; border-color: #b9c6ea; }
.gt-chat-option { display: block; width: 100%; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.gt-chat-option-title { font-weight: 700; }
.gt-chat-option-sub { font-weight: 500; color: #5b6a8a; font-size: 12px; margin-top: 2px; }

/* Footer / input */
.gt-chat-footer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #e6e9f2; background: #fff; flex: 0 0 auto; align-items: flex-end; }
.gt-chat-input { flex: 1 1 auto; border: 1px solid #d3dbee; border-radius: 22px; padding: 10px 14px; font-size: 14px; font-family: inherit; color: #1a2333; background: #f6f8fc; resize: none; outline: none; line-height: 1.35; max-height: 120px; }
.gt-chat-input:focus { border-color: #1f3a93; background: #fff; }
.gt-chat-send { width: 42px; height: 42px; border: none; border-radius: 50%; background: #1f3a93; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0; }
.gt-chat-send:hover { background: #16307d; }
.gt-chat-send:disabled { background: #b6c2dd; cursor: default; }
.gt-chat-send svg { width: 18px; height: 18px; display: block; }
.gt-chat-powered { text-align: center; font-size: 10px; color: #9aa7c4; padding: 6px 0; background: #fff; flex: 0 0 auto; }

/* ---- Form / application views ---- */
.gt-chat-form { padding: 4px 2px; display: flex; flex-direction: column; gap: 12px; }
.gt-chat-back { border: none; background: none; color: #1f3a93; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; align-self: flex-start; font-family: inherit; }
.gt-chat-back:hover { text-decoration: underline; }
.gt-chat-field { display: flex; flex-direction: column; gap: 5px; }
.gt-chat-label { font-size: 12.5px; font-weight: 700; color: #3b4a6b; }
.gt-chat-label .gt-chat-opt { font-weight: 500; color: #8a97b5; }
.gt-chat-textinput, .gt-chat-select, .gt-chat-textarea {
  border: 1px solid #d3dbee; border-radius: 10px; padding: 10px 12px; font-size: 14px;
  font-family: inherit; color: #1a2333; background: #fff; outline: none; width: 100%; box-sizing: border-box;
}
.gt-chat-textinput:focus, .gt-chat-select:focus, .gt-chat-textarea:focus { border-color: #1f3a93; }
.gt-chat-textarea { resize: vertical; min-height: 56px; }
.gt-chat-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.gt-chat-check input { margin-top: 3px; }
.gt-chat-file { border: 1px dashed #b9c6ea; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #3b4a6b; cursor: pointer; background: #fbfcff; }
.gt-chat-file:hover { background: #eef2ff; }
.gt-chat-file input { display: none; }
.gt-chat-file-info { font-size: 12px; color: #1f3a93; font-weight: 600; margin-top: 6px; word-break: break-all; }
.gt-chat-hint { font-size: 12px; color: #8a97b5; }
.gt-chat-error { font-size: 12px; color: #d02b3a; font-weight: 600; }
.gt-chat-buttons { display: flex; gap: 8px; }
.gt-chat-btn { flex: 1 1 auto; border: none; border-radius: 10px; padding: 11px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.gt-chat-btn-primary { background: #1f3a93; color: #fff; }
.gt-chat-btn-primary:hover { background: #16307d; }
.gt-chat-btn-primary:disabled { background: #b6c2dd; cursor: default; }
.gt-chat-btn-secondary { background: #eef2ff; color: #1f3a93; }
.gt-chat-btn-secondary:hover { background: #e0e8ff; }
.gt-chat-summary { border: 1px solid #e6e9f2; border-radius: 12px; background: #fff; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.gt-chat-summary-row { font-size: 13px; }
.gt-chat-summary-row b { color: #3b4a6b; }
.gt-chat-appnum { text-align: center; font-size: 15px; font-weight: 800; color: #1f3a93; background: #eef2ff; border-radius: 10px; padding: 12px; margin: 8px 0; }

/* Progress indicator (step-by-step application) */
.gt-chat-step { font-size: 11.5px; font-weight: 600; color: #8a97b5; }
.gt-chat-progress { height: 6px; border-radius: 3px; background: #e6e9f2; overflow: hidden; }
.gt-chat-progress-fill { height: 100%; border-radius: 3px; transition: width .2s ease; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .gt-chat-launcher { right: 14px; bottom: 16px; width: 54px; height: 54px; }
  .gt-chat-panel { right: 12px; left: 12px; bottom: 80px; width: auto; max-width: none; height: calc(100vh - 116px); max-height: none; border-radius: 14px; }
  .gt-chat-msg { max-width: 92%; }
}
