/* ============================================================================
   AgentOS AI DESK — shared "Ask the AI" bar (top-of-app placement).
   Self-contained: every class is osdesk- prefixed so it never collides with
   an app's own styles. Navy #0a1f44 / gold #c9a227, Archivo headlines /
   Inter body (the apps already self-host both fonts).
   The bar is IN NORMAL FLOW (position: static) directly under the app's
   header — it can never cover a fixed tab bar or the update pill.
   ============================================================================ */
.osdesk-top {
  box-sizing: border-box;
  width: auto;
  max-width: 1180px;
  margin: 12px auto;
  padding: 0 12px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.osdesk-top *, .osdesk-top *::before, .osdesk-top *::after { box-sizing: border-box; }

.osdesk-bar {
  background: #0a1f44;
  border: 1px solid #c9a227;
  border-radius: 14px;
  padding: 10px 12px 12px;
  box-shadow: 0 2px 10px rgba(10, 31, 68, .18);
}
.osdesk-label {
  display: block;
  color: #c9a227;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.osdesk-controls { display: flex; gap: 8px; align-items: stretch; }
.osdesk-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #c9a227;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  color: #0a1f44;
  background: #fff;
}
.osdesk-input:focus { outline: 2px solid #c9a227; outline-offset: 1px; }
.osdesk-ask {
  flex: 0 0 auto;
  border: 1px solid #c9a227;
  border-radius: 10px;
  background: #c9a227;
  color: #0a1f44;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  cursor: pointer;
}
.osdesk-ask:disabled { opacity: .55; cursor: default; }

.osdesk-panel {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #0a1f44;
  border-radius: 14px;
  padding: 12px;
}
.osdesk-panel[hidden] { display: none; }
.osdesk-thread {
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.osdesk-msg {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.osdesk-u { align-self: flex-end; background: #0a1f44; color: #fff; border-bottom-right-radius: 4px; }
.osdesk-a { align-self: flex-start; background: #f2f4f8; color: #0a1f44; border: 1px solid #d8dee9; border-bottom-left-radius: 4px; }
.osdesk-typing { color: #5a6a86; font-size: 13.5px; margin-top: 8px; }
.osdesk-typing[hidden] { display: none; }
.osdesk-close {
  margin-top: 10px;
  border: 1px solid #0a1f44;
  background: #fff;
  color: #0a1f44;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 16px;
  cursor: pointer;
  min-height: 36px;
}

@media (max-width: 480px) {
  .osdesk-top { margin: 10px auto; padding: 0 10px; }
  .osdesk-label { font-size: 14px; }
  .osdesk-ask { padding: 10px 14px; }
  .osdesk-thread { max-height: 46vh; }
}
