/* Destination: one segmented control in the toolbar. Amber = physical, blue = virtual.
 * Its explanation (destination-note) lives under the session title. */
.topbar.has-destination-controls{height:var(--toolbar);min-height:var(--toolbar);flex:0 0 var(--toolbar)}
.destination-controls{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center}
.destination-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.destination-choices{display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:3px;border-radius:12px;background:var(--fill-2)}
.destination-choice{position:relative;display:flex;align-items:center;gap:8px;min-width:150px;height:34px;padding:0 14px 0 10px;border:0;border-radius:9px;background:none;color:var(--label-2);text-align:left;transition:background .15s,color .15s,box-shadow .15s}
.destination-choice:not(:disabled):hover{background:rgba(255,255,255,.6);color:var(--label)}
.destination-icon{display:grid;place-items:center;width:20px;height:20px}
.destination-icon svg{width:18px;height:18px;stroke-width:1.7}
.destination-copy{display:flex;flex-direction:column;min-width:0}
.destination-copy strong{font-size:13px;font-weight:650;line-height:1.1}
.destination-copy>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.destination-state{display:none}
.destination-choice[aria-pressed=true]{background:var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.04)}
.destination-choice[aria-pressed=true] .destination-state{display:none}
.destination-choice[aria-pressed=true][data-destination=simulator]{color:var(--sim)}
.destination-choice[aria-pressed=true][data-destination=live]{color:var(--live)}
.destination-choice[aria-pressed=true]:after{content:'';width:7px;height:7px;border-radius:50%;margin-left:auto;background:currentColor}
.destination-choice:disabled[aria-pressed=false]{opacity:.55}
.destination-note{margin:0}
.has-destination-controls .destination-controls>.destination-note{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.mode-badge.destination-badge-live{background:var(--live-wash);color:var(--live)}
.mode-badge.destination-badge-live span{background:#d97706}
.mode-badge.destination-badge-simulator{background:var(--sim-wash);color:var(--sim)}
.mode-badge.destination-badge-simulator span{background:var(--sim)}
.app-shell[data-destination=live] #primary-action:not(:disabled){background:var(--live);box-shadow:0 1px 2px rgba(180,83,9,.3)}
.app-shell[data-destination=live] #primary-action:not(:disabled):hover{background:var(--live-strong)}
.app-shell[data-destination=live] .setup-card{box-shadow:var(--shadow-card),inset 0 3px 0 #f59e0b}
.app-shell[data-destination=simulator] .setup-card{box-shadow:var(--shadow-card),inset 0 3px 0 #3b8fe0}
/* The pinned session header covers the card top, so it repeats the stripe. */
@media(min-width:861px){
  .app-shell[data-destination=live] .setup-pinned{background:linear-gradient(#f59e0b,#f59e0b) top/100% 3px no-repeat,var(--surface)}
  .app-shell[data-destination=simulator] .setup-pinned{background:linear-gradient(#3b8fe0,#3b8fe0) top/100% 3px no-repeat,var(--surface)}
}

/* Physical profile: a labelled row inside "Profile & motion". */
#robot-profile-controls{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px 12px;padding:10px 14px}
#robot-profile-controls label{font-size:13px;font-weight:650;color:var(--label)}
#robot-profile{justify-self:end;max-width:100%;min-width:200px;height:34px;padding:0 30px 0 12px;border:1px solid var(--separator);border-radius:9px;background:var(--surface);color:var(--label);font-size:13px;font-weight:600}
#robot-profile:disabled{opacity:.6}
#robot-profile-help{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;color:var(--label-3)}

/* Physical start confirmation. */
.physical-start-dialog{width:min(480px,calc(100vw - 32px));padding:30px}
.physical-start-eyebrow{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--live)}
.physical-start-eyebrow>span{width:7px;height:7px;border-radius:50%;background:#d97706}
.physical-start-dialog h2{font-size:24px;margin:12px 0 0;line-height:1.2}
.physical-start-dialog>p{font-size:14px;color:var(--label-2);line-height:1.6;margin-top:10px}
.physical-start-effect{margin:18px 0 20px;padding:14px 16px;background:var(--live-wash);border-radius:14px;color:#7a4a12}
.physical-start-effect strong{font-size:13px;font-weight:650}
.physical-start-effect p{font-size:13px;color:#7a4a12;line-height:1.55;margin-top:4px}
.physical-start-actions{display:grid;grid-template-columns:.75fr 1.25fr;gap:10px}
.physical-start-actions .primary-button,.physical-start-actions .secondary-button{margin:0;min-height:46px;font-size:14px}
.physical-start-actions .primary-button{background:var(--live)}
.physical-start-actions .primary-button:hover{background:var(--live-strong)}

@media(max-width:1100px){.destination-choice{min-width:0;padding:0 12px 0 9px}.destination-state{display:none}}
@media(max-width:980px){.destination-controls{position:static;transform:none;margin-left:auto;order:2}.topbar.has-destination-controls .top-actions{margin-left:0;order:3}}
@media(max-width:700px){.destination-icon{display:none}}
#switch-destination-dialog .physical-start-actions{margin-top:22px}
/* Steps the top bar takes when it is crowded (mode_controls.js measures it; never on a phone, mobile.css). */
.topbar.topbar-flow .destination-controls{position:static;transform:none;margin-left:auto;order:2}
.topbar.topbar-flow .top-actions{margin-left:0;order:3}
.topbar.topbar-compact .top-actions{gap:4px}
.topbar.topbar-compact #phone-toggle,.topbar.topbar-compact #details-toggle{width:36px;padding:0;justify-content:center}
.topbar.topbar-compact #phone-toggle>span,.topbar.topbar-compact #details-toggle>span,.topbar.topbar-compact #help-button{display:none}
.topbar.topbar-tight .runtime-host-waiting-label{display:none}
/* Last step, a narrow window: Simulator / Real robot gets a second row, centred (the views' own height rules lose here). */
.topbar.topbar-wrap{height:auto!important;min-height:var(--toolbar)!important;flex:0 0 auto!important;flex-wrap:wrap;row-gap:8px;padding-top:8px;padding-bottom:8px}
.app-shell .topbar.topbar-wrap #destination-controls.destination-controls{order:5;flex:1 0 100%;justify-content:center;margin:0}
.topbar.topbar-wrap .top-actions{margin-left:auto}
