/* Unified routing editor: scoped to avoid changing the deployment UI. */
.route-toolbar { flex-wrap: wrap; }
.route-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.route-actions > select { width: auto; max-width: 100%; flex: 1; min-width: 170px; }
.route-formats { max-width: 240px; font-size: 12px; overflow-wrap: anywhere; }
.route-error { color: #ffac9e; background: rgba(240,85,63,.08); border: 1px solid var(--red); border-radius: 9px; padding: 12px; margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.routing-modal { max-width: 980px !important; }
.routing-modal .modal-head { position: sticky; top: 0; background: var(--panel); border-radius: 14px 14px 0 0; z-index: 2; }
.routing-modal .modal-foot { position: sticky; bottom: 0; background: var(--panel); border-radius: 0 0 14px 14px; z-index: 2; flex-wrap: wrap; }
.routing-modal label input:not([type=checkbox]), .routing-modal label select, .routing-modal label textarea { display: block; margin-top: 6px; }
.routing-modal h3 { font-size: 14px; margin: 0 0 12px; }
.routing-modal .card-head h3 { margin: 0; }
.routing-modal small { display: block; overflow-wrap: anywhere; }
.route-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 20px; }
.route-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.route-check { display: flex; align-items: flex-start; gap: 9px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.route-check input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.route-check span { min-width: 0; }
.route-check:has(input:checked) { background: rgba(76,141,255,.09); border-color: var(--accent); color: var(--text); }
.route-editor-row { border: 1px solid var(--border-2); background: var(--bg-2); padding: 16px; border-radius: 10px; margin-bottom: 12px; }
.route-editor-row .card-head { flex-wrap: wrap; margin-bottom: 8px; }
.route-editor-row > small { margin-bottom: 12px; }
.route-member { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.route-member > select, .route-member > input { flex: 1; min-width: 0; }
.route-member .route-actions { flex-shrink: 0; }
.route-save-hint { margin-right: auto; font-size: 12px; align-self: center; }
.route-preview { height: 320px; margin-bottom: 10px; white-space: pre; overflow: auto; word-break: normal; }
.route-preview-warnings { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 14px; }
.routing-modal .route-error:not(.hidden) { position: sticky; top: 60px; z-index: 2; background: #331e24; max-height: 220px; overflow: auto; }
@media (max-width: 760px) {
  .route-checks { grid-template-columns: 1fr; }
  .routing-modal .modal-body { padding: 16px 12px; }
  .route-editor-row { padding: 12px; }
  .route-member { flex-wrap: wrap; }
  .route-member > select { flex-basis: 100%; }
  .route-toolbar { align-items: flex-start; }
  .route-save-hint { flex-basis: 100%; }
}
