/* Vchat 0.37.1 — Human Handoff Manager
   Persistent AI → human ownership, operational summary and responsive controls. */

.vchat-handoff-strip[hidden]{display:none!important}
.vchat-handoff-strip{
  margin:12px 18px 0;
  padding:16px 18px;
  border:1px solid #ded8f4;
  border-radius:18px;
  background:linear-gradient(135deg,#fbfaff 0%,#f5f2ff 100%);
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:14px;
  align-items:start;
  box-shadow:0 10px 28px rgba(48,37,88,.06);
  color:#29233f;
}
.vchat-handoff-strip[data-state="waiting"]{border-color:#eadbb2;background:linear-gradient(135deg,#fffdf7,#fff8e7)}
.vchat-handoff-strip[data-state="assigned"]{border-color:#d8cff7;background:linear-gradient(135deg,#fbfaff,#f3efff)}
.vchat-handoff-strip[data-state="active"]{border-color:#cce8dc;background:linear-gradient(135deg,#f8fdfa,#edf9f3)}
.vchat-handoff-mark{
  width:42px;height:42px;border-radius:13px;background:#6554b8;color:#fff;
  display:grid;place-items:center;position:relative;box-shadow:0 8px 18px rgba(101,84,184,.2)
}
.vchat-handoff-strip[data-state="waiting"] .vchat-handoff-mark{background:#b8872f;box-shadow:0 8px 18px rgba(184,135,47,.18)}
.vchat-handoff-strip[data-state="active"] .vchat-handoff-mark{background:#2f8c68;box-shadow:0 8px 18px rgba(47,140,104,.18)}
.vchat-handoff-mark span{font-size:20px;line-height:1;font-weight:800}
.vchat-handoff-mark i{position:absolute;right:-2px;bottom:-2px;width:11px;height:11px;border-radius:50%;background:#fff;border:3px solid currentColor}
.vchat-handoff-copy{min-width:0;display:flex;flex-direction:column;gap:4px;padding-top:1px}
.vchat-handoff-kicker{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:1px}
.vchat-handoff-kicker span{font-size:11px;line-height:1.2;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#5d4aa9}
.vchat-handoff-strip[data-state="waiting"] .vchat-handoff-kicker span{color:#936918}
.vchat-handoff-strip[data-state="active"] .vchat-handoff-kicker span{color:#267456}
.vchat-handoff-kicker em{font-style:normal;font-size:11px;line-height:1.2;color:#8a849b;background:rgba(255,255,255,.72);border:1px solid rgba(64,52,105,.09);padding:4px 7px;border-radius:999px}
.vchat-handoff-copy>strong{font-size:15px;line-height:1.35;color:#25203b}
.vchat-handoff-copy>small{font-size:12px;line-height:1.45;color:#716b82}
.vchat-handoff-copy>p{margin:5px 0 0;font-size:13px;line-height:1.5;color:#49435d;max-width:760px}
.vchat-handoff-summary{margin-top:7px;padding:10px 12px;border:1px solid rgba(88,73,157,.11);border-radius:12px;background:rgba(255,255,255,.7);white-space:pre-line;font-size:12px;line-height:1.5;color:#5c566c;max-width:820px}
.vchat-handoff-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;padding-top:2px}
.vchat-handoff-actions button{
  appearance:none!important;-webkit-appearance:none!important;
  min-height:36px;padding:8px 12px;border-radius:10px!important;border:1px solid #d9d3ef!important;
  background:#fff!important;color:#55439e!important;font-size:12px!important;font-weight:750!important;line-height:1!important;
  box-shadow:none!important;outline:none!important;cursor:pointer;white-space:nowrap
}
.vchat-handoff-actions button:hover{border-color:#bdb1ea!important;background:#faf8ff!important;transform:none!important}
.vchat-handoff-actions button:focus-visible{outline:3px solid rgba(101,84,184,.18)!important;outline-offset:2px!important}
#vchat-handoff-take{background:#6554b8!important;color:#fff!important;border-color:#6554b8!important}
#vchat-handoff-return-ai{background:#f8f6ff!important;color:#4e3c96!important}

.vchat-handoff-modal-intro,.vchat-handoff-return-confirm{
  display:flex;align-items:flex-start;gap:12px;padding:14px 15px;margin:0 0 16px;
  border:1px solid #e1dcf2;border-radius:15px;background:#faf9fe
}
.vchat-handoff-modal-intro>span,.vchat-handoff-return-confirm>span{
  flex:0 0 38px;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#6554b8;color:#fff;font-size:18px;font-weight:800
}
.vchat-handoff-modal-intro strong,.vchat-handoff-return-confirm strong{display:block;font-size:14px;color:#27213e;margin:1px 0 4px}
.vchat-handoff-modal-intro p,.vchat-handoff-return-confirm p,.vchat-handoff-modal-copy p{margin:0;color:#777086;font-size:12px;line-height:1.55}
.vchat-handoff-modal-copy{padding:12px 14px;margin-bottom:14px;border:1px solid #e3def2;border-radius:14px;background:#faf9fd}
.vchat-handoff-modal-copy strong{display:block;margin-bottom:4px;color:#2d2742;font-size:14px}
.vchat-handoff-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* Handoff state is operational context, not a destructive/error state. Neutralize
   inherited browser/theme red outlines on these controls. */
.vchat-handoff-strip button,
.vchat-handoff-modal-intro~label select,
.vchat-handoff-modal-intro~label input,
.vchat-handoff-modal-intro~label textarea,
.vchat-handoff-form-grid select{
  accent-color:#6554b8;
}

@media (max-width:1100px){
  .vchat-handoff-strip{grid-template-columns:40px minmax(0,1fr);margin-left:14px;margin-right:14px}
  .vchat-handoff-actions{grid-column:2;justify-content:flex-start}
}
@media (max-width:720px){
  .vchat-handoff-strip{margin:10px 10px 0;padding:14px;border-radius:16px;grid-template-columns:36px minmax(0,1fr);gap:11px}
  .vchat-handoff-mark{width:36px;height:36px;border-radius:11px}
  .vchat-handoff-copy>p{font-size:12px}
  .vchat-handoff-summary{font-size:11.5px;padding:9px 10px}
  .vchat-handoff-actions{grid-column:1/-1;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:4px}
  .vchat-handoff-actions button{width:100%;min-width:0;white-space:normal;line-height:1.2!important}
  #vchat-handoff-return-ai:last-child:nth-child(odd){grid-column:1/-1}
  .vchat-handoff-form-grid{grid-template-columns:1fr}
}
@media (max-width:420px){
  .vchat-handoff-strip{margin-left:8px;margin-right:8px;padding:12px}
  .vchat-handoff-actions{grid-template-columns:1fr}
  #vchat-handoff-return-ai:last-child:nth-child(odd){grid-column:auto}
}

/* Workspace handoff policy */
.vchat-handoff-settings-card{position:relative;overflow:hidden}
.vchat-handoff-settings-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#6554b8}
.vchat-handoff-settings-card .vchat-card-copy{margin:0 0 18px;max-width:760px;line-height:1.6}
.vchat-handoff-settings-grid{margin-bottom:16px}
.vchat-handoff-settings-grid label{display:flex;flex-direction:column;gap:7px}
.vchat-handoff-settings-grid label>small{font-size:11px;line-height:1.45;color:#888197}
.vchat-handoff-settings-flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 18px;padding:13px 14px;border:1px solid #e2ddf2;border-radius:14px;background:#faf9fe}
.vchat-handoff-settings-flow span{padding:7px 9px;border-radius:9px;background:#fff;border:1px solid #e2ddf2;color:#504969;font-size:11px;font-weight:750}
.vchat-handoff-settings-flow i{font-style:normal;color:#8b82af;font-size:13px}
@media(max-width:720px){
  .vchat-handoff-settings-flow{display:grid;grid-template-columns:1fr auto;align-items:center}
  .vchat-handoff-settings-flow span{min-width:0}
  .vchat-handoff-settings-flow i:nth-of-type(3){display:none}
}

/* Inbox list: human handoff must be visible before opening the conversation. */
.vchat-conversation-item.has-human-handoff{position:relative}
.vchat-conversation-item.has-human-handoff:after{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 4px 4px 0;background:#6554b8}
.vchat-conversation-item.is-handoff-waiting:after{background:#b8872f}
.vchat-conversation-item.is-handoff-active:after{background:#2f8c68}
.vchat-conversation-item.has-human-handoff .vchat-conversation-state-row>em:first-of-type{background:#f3efff;color:#5b47aa;border-color:#ded5fa}
.vchat-conversation-item.is-handoff-waiting .vchat-conversation-state-row>em:first-of-type{background:#fff8e5;color:#8d651b;border-color:#f1dfab}
.vchat-conversation-item.is-handoff-active .vchat-conversation-state-row>em:first-of-type{background:#edf9f3;color:#267456;border-color:#cfe9dd}
