/**
 * FLAITOPS Flight Brief — Phase 1 styles
 * Scoped to .workspace-flight-brief / body.flight-brief-active
 * Uses professional design tokens from flaitops-pro-ds.css
 */

.workspace-flight-brief{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
  overflow:auto;
  background:var(--pro-bg, #0a0f18);
  color:var(--pro-text, #e8eef4);
}

.workspace-flight-brief[hidden]{display:none!important}

.fb-shell{
  width:min(1180px, 100%);
  margin:0 auto;
  padding:var(--pro-space-4, 16px) var(--pro-space-5, 24px) var(--pro-space-6, 32px);
  display:flex;
  flex-direction:column;
  gap:var(--pro-space-4, 16px);
}

.fb-loading,
.fb-error,
.fb-muted{
  color:var(--pro-text-muted, rgba(160,176,192,.62));
  font-size:var(--pro-fs-body, .8125rem);
}

.fb-error{color:var(--pro-status-critical, #e07070)}

.fb-banner{
  margin:0;
  padding:.55rem .85rem;
  border-radius:var(--pro-radius-md, 10px);
  border:1px solid var(--pro-border, rgba(255,255,255,.07));
  background:var(--pro-surface-2, #161e28);
  color:var(--pro-text-secondary, rgba(198,211,226,.78));
  font-size:var(--pro-fs-meta, .6875rem);
}

.fb-back{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  border:0;
  background:transparent;
  color:var(--pro-text-secondary);
  font-size:var(--pro-fs-ui, .75rem);
  font-weight:var(--pro-fw-semibold, 600);
  cursor:pointer;
  padding:0;
  margin-bottom:.35rem;
}
.fb-back .material-symbols-rounded{font-size:1rem}
.fb-back:hover{color:var(--pro-brand, #6bcf3a)}

.fb-hero{
  display:flex;
  flex-direction:column;
  gap:var(--pro-space-4, 16px);
  padding:var(--pro-space-4, 16px) 0 var(--pro-space-3, 12px);
  border-bottom:1px solid var(--pro-border, rgba(255,255,255,.07));
}

.fb-hero-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
}

.fb-flight-num{
  margin:0;
  font-size:1.65rem;
  font-weight:var(--pro-fw-bold, 700);
  letter-spacing:.02em;
  color:var(--pro-text);
  line-height:1.15;
}

.fb-airline{
  margin:.15rem 0 0;
  font-size:var(--pro-fs-body);
  color:var(--pro-text-secondary);
}

.fb-aircraft-line{
  margin:.1rem 0 0;
  font-size:var(--pro-fs-meta);
  color:var(--pro-text-muted);
}

.fb-hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  justify-content:flex-end;
  align-items:center;
}

.fb-status-badge,
.fb-demo-badge{
  display:inline-flex;
  align-items:center;
  padding:.28rem .7rem;
  border-radius:var(--pro-radius-pill, 999px);
  font-size:var(--pro-fs-meta);
  font-weight:var(--pro-fw-bold, 700);
  letter-spacing:.04em;
  text-transform:uppercase;
}
.fb-demo-badge{
  background:rgba(232,165,75,.12);
  color:var(--pro-status-attention, #e8a54b);
  border:1px solid rgba(232,165,75,.35);
}

.fb-status-badge.is-critical{
  background:rgba(224,112,112,.14);
  color:var(--pro-status-critical, #e07070);
  border:1px solid rgba(224,112,112,.35);
}

.fb-status-badge.is-ok{
  background:var(--pro-brand-soft, rgba(107,207,58,.16));
  color:var(--pro-brand, #6bcf3a);
  border:1px solid var(--pro-brand-border);
}

.fb-demo-badge.is-live{
  background:var(--pro-brand-soft, rgba(107,207,58,.16));
  color:var(--pro-brand, #6bcf3a);
  border:1px solid var(--pro-brand-border);
}
.fb-demo-badge.is-partial{
  background:rgba(126,182,232,.12);
  color:#7eb6e8;
  border:1px solid rgba(126,182,232,.35);
}
.fb-status-badge.is-neutral{
  background:rgba(255,255,255,.06);
  color:var(--pro-text-muted);
  border:1px solid var(--pro-border);
}
.fb-state-pill.is-muted{color:var(--pro-text-muted)}
.fb-state-pill.is-muted .fb-live-dot{background:var(--pro-text-muted);box-shadow:none}
.fb-estimate-note{margin:.35rem 0 0;font-size:.62rem!important}

.fb-route-track{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:.75rem;
  font-size:.95rem;
  font-weight:700;
}

.fb-route-bar{
  position:relative;
  height:2px;
  background:rgba(255,255,255,.1);
  border-radius:999px;
}

.fb-route-fill{
  position:absolute;
  inset:0 auto 0 0;
  background:var(--pro-brand, #6bcf3a);
  border-radius:inherit;
}

.fb-route-plane{
  position:absolute;
  top:50%;
  transform:translate(-50%,-50%);
  width:28px;
  height:28px;
  border-radius:999px;
  background:var(--pro-surface-2, #161e28);
  border:1px solid var(--pro-brand-border);
  display:grid;
  place-items:center;
  color:var(--pro-brand);
}
.fb-route-plane .material-symbols-rounded{font-size:1rem;transform:rotate(90deg)}

.fb-route-cities{
  display:flex;
  justify-content:space-between;
  font-size:var(--pro-fs-meta);
  color:var(--pro-text-muted);
  margin-top:-.35rem;
}

.fb-hero-cols{
  display:grid;
  grid-template-columns:1fr 1.05fr 1fr;
  gap:var(--pro-space-4, 16px);
}

.fb-hero-col h2{
  margin:0 0 .35rem;
  font-size:var(--pro-fs-meta);
  font-weight:var(--pro-fw-semibold);
  color:var(--pro-text-muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.fb-code{
  margin:0;
  font-size:1.35rem;
  font-weight:700;
}

.fb-sub{
  margin:.15rem 0 .55rem;
  font-size:var(--pro-fs-meta);
  color:var(--pro-text-muted);
}

.fb-times{
  margin:0 0 .65rem;
  display:grid;
  gap:.25rem;
}
.fb-times > div{display:flex;gap:.55rem;align-items:baseline;font-size:var(--pro-fs-body)}
.fb-times dt{margin:0;color:var(--pro-text-muted);min-width:2.4rem;font-weight:600}
.fb-times dd{margin:0;font-weight:600}
.fb-times dd.is-delay{color:var(--pro-status-critical)}

.fb-delay{
  color:var(--pro-status-critical);
  font-weight:700;
  font-size:var(--pro-fs-meta);
  margin-left:.25rem;
}

.fb-hero-col--center{
  text-align:center;
  padding:0 .5rem;
  border-left:1px solid var(--pro-border);
  border-right:1px solid var(--pro-border);
}

.fb-state-pill{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  margin:.2rem 0 .55rem;
  font-size:var(--pro-fs-ui);
  font-weight:700;
  color:var(--pro-brand);
  letter-spacing:.04em;
}

.fb-live-dot{
  width:7px;height:7px;border-radius:999px;
  background:var(--pro-brand);
  box-shadow:0 0 0 3px var(--pro-brand-soft);
}

.fb-state-metrics{
  list-style:none;margin:0;padding:0;
  display:flex;flex-wrap:wrap;justify-content:center;gap:.35rem .75rem;
  font-size:var(--pro-fs-body);font-weight:600;
}
.fb-state-metrics span{color:var(--pro-text-muted);font-weight:500}

.fb-wx-mini{
  display:flex;gap:.55rem;align-items:flex-start;
  margin-top:.35rem;
}
.fb-wx-icon{font-size:1.25rem;color:var(--pro-text-secondary)}
.fb-wx-mini-body{
  display:flex;flex-direction:column;gap:.08rem;
  font-size:var(--pro-fs-meta);color:var(--pro-text-secondary);
}
.fb-wx-mini-body strong{font-size:var(--pro-fs-body);color:var(--pro-text)}
.fb-hero-col--center .fb-wx-mini{justify-content:center}

.fb-tabs{
  display:flex;
  gap:.15rem;
  overflow-x:auto;
  border-bottom:1px solid var(--pro-border);
  padding-bottom:0;
  scrollbar-width:thin;
}

.fb-tab{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--pro-text-muted);
  font-size:var(--pro-fs-ui);
  font-weight:var(--pro-fw-semibold);
  padding:.65rem .85rem;
  cursor:pointer;
  white-space:nowrap;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
}
.fb-tab:hover{color:var(--pro-text)}
.fb-tab.is-active{
  color:var(--pro-brand);
  border-bottom-color:var(--pro-brand);
}

.fb-body{min-height:12rem}

.fb-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr);
  gap:var(--pro-space-4, 16px);
  align-items:start;
}
.fb-grid--2{grid-template-columns:1fr 1fr}
.fb-col{display:flex;flex-direction:column;gap:var(--pro-space-4, 16px)}

.fb-card{
  background:var(--pro-surface-1, #121820);
  border:1px solid var(--pro-border);
  border-radius:var(--pro-radius-lg, 12px);
  padding:var(--pro-space-4, 16px);
}
.fb-card--wide{grid-column:1/-1}
.fb-card h3{
  margin:0 0 .75rem;
  font-size:var(--pro-fs-section);
  font-weight:var(--pro-fw-semibold);
  color:var(--pro-text);
}
.fb-card-head{
  display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:.65rem;
}
.fb-card-head h3{margin:0}

.fb-link-btn,
.fb-chip-btn{
  appearance:none;
  border:1px solid var(--pro-border);
  background:transparent;
  color:var(--pro-text-secondary);
  border-radius:var(--pro-radius-pill);
  font-size:var(--pro-fs-meta);
  font-weight:600;
  padding:.28rem .7rem;
  cursor:pointer;
}
.fb-link-btn{border:0;color:var(--pro-brand);padding:0}
.fb-link-btn:hover,
.fb-chip-btn:hover{
  color:var(--pro-brand);
  border-color:var(--pro-brand-border);
}

.fb-airport-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.75rem}

.fb-timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0}
.fb-timeline-item{
  display:grid;
  grid-template-columns:18px 1fr;
  gap:.65rem;
  position:relative;
  padding:0 0 1rem;
}
.fb-timeline-item:not(:last-child)::before{
  content:"";
  position:absolute;
  left:7px;top:14px;bottom:0;
  width:1px;
  background:rgba(255,255,255,.1);
}
.fb-timeline-marker{
  width:14px;height:14px;margin-top:3px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.22);
  background:transparent;
  display:grid;place-items:center;
  z-index:1;
}
.fb-timeline-item.is-completed .fb-timeline-marker{
  border-color:var(--pro-status-ok);
  background:var(--pro-status-ok);
}
.fb-timeline-item.is-current .fb-timeline-marker{
  border-color:var(--pro-brand);
  background:var(--pro-surface-1);
  color:var(--pro-brand);
  width:18px;height:18px;margin-left:-2px;
}
.fb-timeline-item.is-current .fb-timeline-marker .material-symbols-rounded{font-size:.85rem}
.fb-timeline-item.is-future .fb-timeline-marker{border-color:rgba(255,255,255,.18)}
.fb-timeline-head{display:flex;gap:.55rem;align-items:baseline;flex-wrap:wrap}
.fb-timeline-head time{font-size:var(--pro-fs-meta);color:var(--pro-text-muted);font-variant-numeric:tabular-nums;min-width:3.2rem}
.fb-timeline-head strong{font-size:var(--pro-fs-body)}
.fb-timeline-body p{margin:.2rem 0 0;font-size:var(--pro-fs-meta);color:var(--pro-text-secondary)}

.fb-map-canvas{
  min-height:180px;
  border-radius:var(--pro-radius-md);
  background:var(--ws-card-bg-map, #0d1520);
  border:1px solid var(--pro-border);
  display:grid;place-items:center;
  padding:1rem;
  text-align:center;
}
.fb-map-tooltip{margin:.35rem 0;font-size:var(--pro-fs-body)}
.fb-map-route{margin:0;font-weight:700;color:var(--pro-brand)}

.fb-causes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1rem}
.fb-cause{display:grid;grid-template-columns:28px 1fr;gap:.65rem}
.fb-cause-idx{
  width:28px;height:28px;border-radius:999px;
  display:grid;place-items:center;
  font-size:var(--pro-fs-meta);font-weight:700;
  background:var(--pro-surface-3);color:var(--pro-text-secondary);
}
.fb-cause-title{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .5rem;margin-bottom:.25rem}
.fb-cause-title .material-symbols-rounded{font-size:1rem;color:var(--pro-text-secondary)}
.fb-cause-badge{
  font-style:normal;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:.12rem .4rem;
  border-radius:var(--pro-radius-pill);
  border:1px solid var(--pro-border);
  color:var(--pro-text-muted);
}
.fb-cause.is-confirmed .fb-cause-badge{color:var(--pro-status-ok);border-color:rgba(107,207,58,.35)}
.fb-cause.is-likely .fb-cause-badge{color:var(--pro-status-attention);border-color:rgba(232,165,75,.35)}
.fb-cause.is-possible .fb-cause-badge{color:#7eb6e8;border-color:rgba(126,182,232,.35)}
.fb-cause p{margin:0;font-size:var(--pro-fs-body);color:var(--pro-text-secondary);line-height:1.45}
.fb-provenance{display:block;margin-top:.35rem;font-size:.62rem;color:var(--pro-text-muted)}

.fb-ops-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.85rem}
.fb-ops-item{display:grid;grid-template-columns:10px 1fr;gap:.65rem;align-items:start}
.fb-ops-dot{width:8px;height:8px;border-radius:999px;margin-top:.35rem;background:var(--pro-text-muted)}
.fb-ops-item.is-critical .fb-ops-dot{background:var(--pro-status-critical)}
.fb-ops-item.is-warning .fb-ops-dot{background:var(--pro-status-attention)}
.fb-ops-item.is-info .fb-ops-dot{background:#7eb6e8}
.fb-ops-item.is-ok .fb-ops-dot{background:var(--pro-status-ok)}
.fb-ops-item strong{display:block;font-size:var(--pro-fs-body);margin-bottom:.15rem}
.fb-ops-item p{margin:0;font-size:var(--pro-fs-meta);color:var(--pro-text-secondary);line-height:1.4}

.fb-quick-prompts{
  display:flex;flex-wrap:wrap;gap:.45rem;
  padding-top:.25rem;
  border-top:1px solid var(--pro-border);
}
.fb-prompt-chip{
  appearance:none;
  border:1px solid var(--pro-border);
  background:var(--pro-surface-2);
  color:var(--pro-text-secondary);
  border-radius:var(--pro-radius-pill);
  font-size:var(--pro-fs-meta);
  font-weight:600;
  padding:.4rem .75rem;
  cursor:pointer;
}
.fb-prompt-chip:hover{
  border-color:var(--pro-brand-border);
  color:var(--pro-brand);
}

@media (max-width: 1100px){
  .fb-grid{grid-template-columns:1fr 1fr}
  .fb-col--right{grid-column:1 / -1}
}

@media (max-width: 820px){
  .fb-hero-cols{grid-template-columns:1fr;gap:1.1rem}
  .fb-hero-col--center{
    border:0;
    border-top:1px solid var(--pro-border);
    border-bottom:1px solid var(--pro-border);
    padding:1rem 0;
  }
  .fb-grid,
  .fb-grid--2{grid-template-columns:1fr}
  .fb-col--right{grid-column:auto}
  .fb-shell{padding:var(--pro-space-3) var(--pro-space-3) var(--pro-space-5)}
  .fb-flight-num{font-size:1.4rem}
}

/* —— Flight Brief shell: desk full + compose tube —— */
body.flight-brief-active #workspaceWorldWrap,
body.flight-brief-active .workspace-world-wrap{
  display:none!important;
}
body.flight-brief-active #workspaceProfessionalOverview{
  display:none!important;
}
body.flight-brief-active .workspace-desk-head,
body.flight-brief-active .workspace-desk-meta,
body.flight-brief-active #workspaceRefsSection,
body.flight-brief-active #workspaceFlowSection{
  display:none!important;
}
body.flight-brief-active:not(.flight-brief-chat) #workspaceChatMessages,
body.flight-brief-active:not(.flight-brief-chat) #workspaceChatIntro,
body.flight-brief-active:not(.flight-brief-chat) #workspaceExpandBtn,
body.flight-brief-active:not(.flight-brief-chat) #workspaceChatChips,
body.flight-brief-active:not(.flight-brief-chat) #workspaceProQuick,
body.flight-brief-active:not(.flight-brief-chat) #workspaceChatMobileBack{
  display:none!important;
}
body.flight-brief-active.workspace-pane-layout.workspace-pane-desk-open .workspace-desk-pane{
  display:flex!important;
  flex:1 1 auto;
  min-width:0;
  width:100%;
}
body.flight-brief-active .workspace-desk-scroll{
  max-width:none;
  padding-bottom:5.5rem;
}
body.flight-brief-active.workspace-pane-layout.workspace-pane-chat-open .workspace-chat-pane{
  display:flex!important;
  position:fixed;
  left:var(--ws-rail-width, 56px);
  right:0;
  bottom:0;
  top:auto;
  width:auto;
  height:auto;
  max-height:min(42vh, 360px);
  z-index:25;
  background:rgba(10,15,24,.96);
  border-top:1px solid var(--pro-border, rgba(255,255,255,.07));
  backdrop-filter:blur(12px);
}
body.flight-brief-active:not(.flight-brief-chat).workspace-pane-layout.workspace-pane-chat-open .workspace-chat-pane{
  max-height:none;
}
body.flight-brief-active .workspace-pro-compose-foot,
body.flight-brief-active #workspaceTypingArea{
  display:flex!important;
}
body.workspace-professional.flight-brief-active .workspace-rail-add-btn{
  display:none!important;
}
@media (max-width: 760px){
  body.flight-brief-active.workspace-pane-layout.workspace-pane-chat-open .workspace-chat-pane{
    left:0;
  }
}
