/* Platform-wide brand tokens. Semantic warning colors and video canvases stay independent. */
:root {
  --wy-primary: #275BC4;
  --wy-primary-hover: #214DA7;
  --wy-primary-active: #1B408A;
  --wy-primary-soft: #EDF2FC;
  --wy-primary-border: #BDCEF0;
  --blue: var(--wy-primary);
  --primary: var(--wy-primary);
  --nav: var(--wy-primary);
}

.app-shell .global-header { background: var(--wy-primary); }
.app-shell .global-nav .nav-item > a { color: #fff; }
.app-shell .global-nav .nav-item > a:hover,
.app-shell .global-nav .nav-item > a.active,
.app-shell .tenant-selector { background: var(--wy-primary-hover); }
.app-shell .global-nav .nav-dropdown a { color: #333; }
.app-shell .global-nav .nav-dropdown a:hover,
.app-shell .global-nav .nav-dropdown a.active,
.app-shell .management-sidebar nav a.active,
.app-shell .feature-sidebar button.active {
  color: var(--wy-primary);
  background: var(--wy-primary-soft);
}

/* Primary actions, including dialogs teleported outside the app shell. */
.app-shell .button.primary,
.app-shell .prototype-tabs .button,
.app-shell .quick-dispatch-bar .dispatch-primary,
.app-shell .segmented-control button.active,
.app-shell .cockpit-actions .primary,
.app-shell .control-owner button,
.app-shell .flight-payload-bar > button.active,
.tenant-create-modal .tenant-provider button.active,
dialog.modal .button.primary,
dialog.modal:not(.task-planner-modal):not(.route-planner-modal) .modal-footer .button.primary,
dialog.modal.quick-flight-modal:not(.task-planner-modal):not(.route-planner-modal) .modal-footer .button.primary,
.task-planner-modal .planner-button.primary,
.route-planner-modal .planner-button.primary,
.route-editor-virtual.route-planner-workspace .route-planner-tools .primary {
  background: var(--wy-primary);
  border-color: var(--wy-primary);
  color: #fff;
  box-shadow: none;
}
.app-shell .button.primary:hover:not(:disabled),
.app-shell .prototype-tabs .button:hover:not(:disabled),
.app-shell .dispatch-primary:hover:not(:disabled),
dialog.modal .button.primary:hover:not(:disabled),
dialog.modal:not(.task-planner-modal):not(.route-planner-modal) .modal-footer .button.primary:hover:not(:disabled),
dialog.modal.quick-flight-modal:not(.task-planner-modal):not(.route-planner-modal) .modal-footer .button.primary:hover:not(:disabled),
.task-planner-modal .planner-button.primary:hover:not(:disabled),
.route-planner-modal .planner-button.primary:hover:not(:disabled) {
  background: var(--wy-primary-hover);
  border-color: var(--wy-primary-hover);
}
.app-shell .button.primary:active:not(:disabled),
dialog.modal .button.primary:active:not(:disabled) { background: var(--wy-primary-active); }
.app-shell .button.primary-soft {
  color: var(--wy-primary);
  background: var(--wy-primary-soft);
  border-color: var(--wy-primary-border);
}
.app-shell .button:focus-visible,
.app-shell .global-nav a:focus-visible,
.app-shell .segmented-control button:focus-visible,
dialog.modal .button:focus-visible {
  outline: 2px solid var(--wy-primary);
  outline-offset: 3px;
}
.app-shell .global-nav .nav-item > a:focus-visible { outline-color: #fff; }
.app-shell .button.primary:disabled,
dialog.modal .button.primary:disabled { opacity: .5; cursor: not-allowed; }

.app-shell .table-actions button:not(.danger),
.app-shell .link-button { color: var(--wy-primary); }
.app-shell .filter-card .button:not(.primary):not(.danger) { color: var(--wy-primary); border-color: var(--wy-primary); }

/* The legacy native-switch rule is !important; only its enabled state is branded. */
.app-shell .native-switch:checked,
.task-planner-modal .native-switch:checked,
.tenant-create-modal .tenant-status input:checked { background: var(--wy-primary) !important; }
.app-shell .payload-management-page .payload-switch.on,
dialog.payload-management-modal .payload-switch.on,
.app-shell .route-enable-toggle[aria-checked="true"] .route-enable-track { background: var(--wy-primary); }
.app-shell .quick-dispatch-bar { background: var(--wy-primary-hover); }
.app-shell .quick-dispatch-bar .dispatch-ai:hover:not(:disabled) { background: var(--wy-primary-active); }

/* Control ownership has explicit action colors, independent of platform blue. */
.app-shell.cockpit-route .control-owner button[data-control-state="acquire"] {
  background: #BE5B00;
  border-color: #BE5B00;
  color: #fff;
}
.app-shell.cockpit-route .control-owner button[data-control-state="release"] {
  background: #AB091C;
  border-color: #AB091C;
  color: #fff;
}
.app-shell.cockpit-route .control-owner button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
