/* Just the Bootstrap 5 pieces the classification wizard renders, in AgentCore's
   dark theme. Everything is scoped under .cw-root so nothing leaks into the app. */

body.cw-modal-open { overflow: hidden; }

.cw-root .modal-backdrop {
  position: fixed; inset: 0; z-index: 140; background: rgba(4, 7, 12, .66);
}
.cw-root .modal {
  position: fixed; inset: 0; z-index: 150; display: none; overflow-x: hidden; overflow-y: auto;
  outline: 0; color: var(--text); font-size: 14px; line-height: 1.5;
}
.cw-root .modal-dialog {
  position: relative; width: auto; max-width: 760px; margin: 5vh auto; padding: 0 16px; outline: 0;
}
.cw-root .modal-dialog-scrollable { height: calc(100% - 10vh); }
.cw-root .modal-dialog-scrollable .modal-content { max-height: 100%; overflow: hidden; }
.cw-root .modal-dialog-scrollable .modal-body { overflow-y: auto; }
.cw-root .modal-content {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.cw-root .modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.cw-root .modal-title { margin: 0; font-size: 16px; font-weight: 600; }
.cw-root .modal-body { position: relative; flex: 1 1 auto; padding: 18px 20px; min-height: 0; }
.cw-root .modal-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.cw-root .btn-close {
  width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 0;
}
.cw-root .btn-close::before { content: "\00d7"; font-size: 22px; line-height: 28px; }
.cw-root .btn-close:hover { background: var(--surface-2); color: var(--text); }

.cw-root h6 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.cw-root .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
  padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); font: inherit;
  font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text);
}
.cw-root .btn:disabled, .cw-root .btn.disabled { opacity: .5; cursor: default; }
.cw-root .btn-primary { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }
.cw-root .btn-primary:hover:not(:disabled) { background: var(--accent); }
.cw-root .btn-success { background: #2f8a5e; border-color: #2f8a5e; color: #fff; }
.cw-root .btn-success:hover:not(:disabled) { background: var(--ok); }
.cw-root .btn-outline-secondary { background: transparent; color: var(--muted); }
.cw-root .btn-outline-secondary:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }

.cw-root .badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600;
  line-height: 1.4; white-space: normal; word-break: break-word;
}
.cw-root .bg-primary { background: var(--accent-dim); color: #fff; }
.cw-root .bg-success { background: #2f6e52; color: #fff; }
.cw-root .bg-secondary { background: var(--surface-2); color: var(--muted); }
.cw-root .text-bg-light { background: var(--surface-2); color: var(--muted); }
.cw-root .text-bg-secondary { background: var(--surface-2); color: var(--text); }

.cw-root .classification-badge {
  display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .03em; color: #fff;
}
.cw-root .classification-unclassified { background: #007a33; }
.cw-root .classification-cui { background: #502b85; }
.cw-root .classification-confidential { background: #0033a0; }
.cw-root .classification-secret { background: #c8102e; }
.cw-root .classification-top-secret { background: #ff8c00; color: #111; }

.cw-root .alert {
  padding: 9px 12px; margin-bottom: 12px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13px;
}
.cw-root .alert-warning { background: #2b2414; border-color: #5a4a22; color: #f0d08a; }
.cw-root .alert-danger { background: #2a1517; border-color: #5c2a2c; color: #eda09c; }
.cw-root .alert-info { background: #13202f; border-color: #24405f; color: #a9c8ea; }

.cw-root .spinner-border {
  display: inline-block; width: 28px; height: 28px; border: 3px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: cw-spin .75s linear infinite;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }

.cw-root .form-check { display: flex; align-items: flex-start; gap: 9px; padding: 5px 2px; }
.cw-root .form-check-input { margin-top: 3px; accent-color: var(--accent); flex: none; width: auto; }
.cw-root .form-check-label { cursor: pointer; }
.cw-root .form-select, .cw-root .form-control {
  width: 100%; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font: inherit;
}
.cw-root .form-control-sm { height: 30px; font-size: 13px; }
.cw-root .cw-options-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cw-root .cw-options-filter .form-control { flex: 1; }
.cw-root .cw-options-list {
  max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 10px; background: var(--bg-soft);
}
.cw-root .cw-step { font-weight: 500; }

.cw-root dl.row { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 0; }
.cw-root dt { color: var(--muted); font-weight: 500; }
.cw-root dd { margin: 0; }

.cw-root .d-none { display: none !important; }
.cw-root .d-flex { display: flex; }
.cw-root .d-inline-flex { display: inline-flex; }
.cw-root .flex-wrap { flex-wrap: wrap; }
.cw-root .flex-column { flex-direction: column; }
.cw-root .justify-content-between { justify-content: space-between; }
.cw-root .gap-2 { gap: 8px; }
.cw-root .text-center { text-align: center; }
.cw-root .text-muted { color: var(--muted); }
.cw-root .text-primary { color: var(--accent); }
.cw-root .small { font-size: 12.5px; }
.cw-root .mb-0 { margin-bottom: 0; }
.cw-root .mb-1 { margin-bottom: 4px; }
.cw-root .mb-2 { margin-bottom: 8px; }
.cw-root .mb-3 { margin-bottom: 14px; }
.cw-root .mt-2 { margin-top: 8px; }
.cw-root .me-2 { margin-right: 8px; }
.cw-root .ms-2 { margin-left: 8px; }
.cw-root .py-1 { padding-top: 4px; padding-bottom: 4px; }
.cw-root .py-4 { padding-top: 24px; padding-bottom: 24px; }
.cw-root .px-2 { padding-left: 8px; padding-right: 8px; }
