/* Site chrome around the MIT-licensed Codexia React workspace. */
.ict-codexia-workspace { background: #fff; }
.ict-codexia-workspace main.shell { padding: 0; min-height: 0; background: #fff; }
.ict-codexia-workspace .workspace-bar { box-sizing: border-box; height: 68px; min-height: 68px; }
.ict-codexia-workspace .workspace-footer { display: none; }
#codexia-workspace { height: calc(100dvh - 68px); min-height: 420px; min-width: 0; overflow: hidden; isolation: isolate; position: relative; }
/* Shared button rules must not make the launch status controls visible. */
#codexia-workspace > [hidden] { display: none !important; }
#codexia-workspace .codexia-loading { padding: 32px; font-size: 15px; color: #5c6068; }
.harness-status-panel { position: absolute; inset: 24px auto auto 24px; z-index: 2; max-width: min(560px, calc(100% - 48px)); box-sizing: border-box; padding: 18px 22px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; color: #20334f; }
.harness-status-panel [hidden] { display: none !important; }
#harness-status { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.6; }
#harness-detail { margin: 6px 0 0; color: #50617a; font-size: 14px; line-height: 1.65; }
.harness-status-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
#harness-elapsed { color: #50617a; font-size: 13px; font-variant-numeric: tabular-nums; }
#harness-retry { min-height: 36px; padding: 6px 14px; border: 1px solid #b4c8e8; border-radius: 8px; background: #f1f6fe; color: #244e88; font-size: 14px; font-weight: 600; cursor: pointer; }
#harness-retry:hover { background: #e4eefc; }
#harness-retry:focus-visible { outline: 2px solid #416fb3; outline-offset: 3px; }
#harness-retry:disabled { cursor: wait; opacity: .65; }
#harness-frame { display: block; width: 100%; height: 100%; border: 0; }
.harness-tools { margin-left: auto; flex: 0 0 auto; }
.harness-tools[hidden] { display: none !important; }
.workspace-page-tools { display: contents; }
.ict-harness-open .workspace-page-tools { display: none; }
/* Keep the native browsing context connected and fully sized while parked.
   Display:none/reparenting would discard useful layout or the iframe itself. */
#codexia-workspace[data-harness-global="true"] { position: fixed; top: var(--harness-host-top, 68px); right: 0; bottom: 0; left: var(--sidebar-width, 224px); height: auto; min-height: 0; z-index: 19; background: #fff; transform: translateX(-220vw); opacity: 0; pointer-events: none; }
.ict-harness-open { overflow: hidden; }
.ict-harness-open #workspace { visibility: hidden; pointer-events: none; }
.ict-harness-open .workspace-footer { display: none; }
.ict-harness-open #codexia-workspace[data-harness-global="true"] { transform: none; opacity: 1; pointer-events: auto; }
#codexia-workspace[data-harness-global="true"].harness-auth-pending #harness-frame { visibility: hidden; }
.harness-background { position: relative; margin-left: auto; color: #20334f; font-size: 13px; }
.harness-background[open] { z-index: 1002; }
.harness-background summary { padding: 9px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.harness-background summary:hover { background: #f1f6fe; }
.harness-background summary:focus-visible, .harness-background button:focus-visible { outline: 2px solid #416fb3; outline-offset: 2px; }
#harness-background-state { margin-left: 6px; color: #345a8b; font-weight: 600; }
.harness-background-settings { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; white-space: normal; }
.harness-background-settings strong { font-size: 16px; }
.harness-background-settings p { line-height: 1.65; margin: 10px 0; color: #465b76; }
.harness-background-settings button { margin: 4px 0; min-height: 40px; padding: 8px 16px; background: #244e88; border: 1px solid #244e88; border-radius: 8px; color: #fff; font-size: 14px; cursor: pointer; }
.harness-background-settings button:hover { background: #193d70; }
.harness-background-settings button:disabled { opacity: .65; cursor: wait; }
.harness-background-settings .harness-background-note { font-size: 12px; }
.harness-background-settings { max-height: min(680px, calc(100dvh - 154px)); overflow: auto; }
#harness-recovery { border-top: 1px solid #dbe3ef; margin-top: 16px; padding-top: 16px; }
#harness-recovery[hidden] { display: none; }
.harness-recovery-item { padding-top: 12px; overflow-wrap: anywhere; }
.harness-recovery-item label { display: flex; align-items: flex-start; gap: 8px; line-height: 1.6; }
.harness-recovery-item input { margin-top: 4px; width: 16px; height: 16px; accent-color: #244e88; flex: 0 0 auto; }
.harness-recovery-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.harness-recovery-actions button { font-size: 13px; }
@media (max-width: 1050px) {
  #codexia-workspace { height: calc(100dvh - 136px); }
  #codexia-workspace[data-harness-global="true"] { left: 0; height: auto; }
  .harness-tools { margin-left: 0; }
  .harness-background { margin-left: 0; }
  .harness-background-settings { position: fixed; top: 128px; right: 16px; }
}
@media (max-width: 520px) {
  .ict-codexia-workspace .workspace-title { display: none; }
}
