/* Order Screening suggested-rule catalog — compact rows (sp9) */
.dp-os-catalog { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; min-width: 0; }
.dp-os-bands { border: 1px solid var(--omp-border-light, #e4e7ec); border-radius: 8px; padding: 12px; min-width: 0; background: var(--omp-bg, #fff); }
.dp-os-bands__title { margin: 0 0 4px; font-weight: 500; color: var(--omp-navy, #002A3A); font-size: 14px; }
.dp-os-bands .omp-resolve-ops__note { margin: 0 0 8px; }
.dp-os-bands__grid, .dp-os-rule__fields, .dp-os-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
  min-width: 0;
}
.dp-os-toolbar { margin: 0; }
.dp-os-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dp-os-field__lab { font-size: 12px; color: var(--omp-slate, #4a5a64); line-height: 1.3; }
.dp-os-field__ctrl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dp-os-field__ctrl .omp-resolve-ops__input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.dp-os-field__unit { flex: none; font-size: 12px; color: var(--omp-slate, #4a5a64); white-space: nowrap; }
.dp-os-field--search { grid-column: 1 / -1; }
.dp-os-field--chips { grid-column: 1 / -1; }
.dp-os-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dp-os-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--omp-border-light, #e4e7ec);
  background: #f6f7f8; color: var(--omp-navy, #002A3A);
  border-radius: 100px; padding: 6px 10px; font-size: 12px; line-height: 1.2;
  cursor: pointer; max-width: 100%;
}
.dp-os-chip-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.dp-os-chip-add .omp-resolve-ops__input { flex: 1 1 140px; min-width: 0; }
.dp-os-summary { margin: 0; font-size: 13px; color: var(--omp-slate, #4a5a64); }
.dp-os-savebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.dp-os-savebar__note { font-size: 12px; color: var(--omp-slate, #4a5a64); flex: 1 1 160px; min-width: 0; }
.dp-os-cat { border: 1px solid var(--omp-border-light, #e4e7ec); border-radius: 8px; padding: 0 10px 4px; min-width: 0; background: #fff; }
.dp-os-cat__sum {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 6px 12px; padding: 10px 0 4px; font-weight: 500; color: var(--omp-navy, #002A3A);
}
.dp-os-cat__sum::-webkit-details-marker { display: none; }
.dp-os-cat__name { min-width: 0; }
.dp-os-cat__count { font-weight: 400; font-size: 12px; color: var(--omp-slate, #4a5a64); }
.dp-os-cat__bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 0 6px; min-width: 0; }
.dp-os-cat__bar .lnk { font-size: 12px; }
.dp-os-hard-note { margin: 0 0 6px; }
.dp-os-rule { padding: 0; border-top: 1px solid var(--omp-border-light, #e4e7ec); min-width: 0; }
.dp-os-rule__head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  min-width: 0;
  width: 100%;
}
.dp-os-rule__details { flex: 1 1 auto; min-width: 0; line-height: var(--omp-lh-sub, 1.5); }
.dp-os-rule__details > summary {
  list-style: none;
  cursor: pointer;
  color: var(--omp-navy, #163549);
  min-width: 0;
  position: relative;
  padding-left: 18px;
}
.dp-os-rule__details > summary::-webkit-details-marker,
.dp-os-rule__details > summary::marker { display: none; content: none; }
.dp-os-rule__details > summary::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--omp-slate, #4E6574);
}
.dp-os-rule__details[open] > summary::before {
  border-width: 7px 5px 0 5px;
  border-color: var(--omp-navy, #163549) transparent transparent transparent;
  top: 0.5em;
  left: 1px;
}
.dp-os-rule__sum-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.dp-os-rule .omp-resolve-ops__rule-name {
  font-weight: var(--omp-weight-strong, 600);
  line-height: var(--omp-lh-sub, 1.5);
  min-width: 0;
}
.dp-os-rule .omp-resolve-ops__id {
  display: block;
  margin-top: 2px;
  font-size: var(--omp-fs-xs, 12px);
  color: var(--omp-muted, #86969C);
  line-height: var(--omp-lh-sub, 1.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.dp-os-rule__head > .tgl {
  flex: none;
  margin-left: auto;
  margin-top: 2px;
}
.dp-os-rule.is-off .omp-resolve-ops__rule-name { color: var(--omp-slate, #4E6574); }
.dp-os-rule__panel { padding: 4px 0 10px 18px; min-width: 0; }
.dp-os-rule__desc { margin: 0 0 8px; }
.dp-os-rule__details[open] > .dp-os-rule__panel {
  animation: dpOsOpen 0.18s ease;
}
@keyframes dpOsOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dp-os-rule__details[open] > .dp-os-rule__panel { animation: none; }
}
#os-suggested-rules, #dp-os-suggested-catalog { min-width: 0; max-width: 100%; }
.dp-os-learned-h { margin: 16px 0 8px; font-size: 14px; font-weight: 500; color: var(--omp-navy, #002A3A); }

@media (max-width: 700px) {
  .dp-os-bands__grid, .dp-os-rule__fields, .dp-os-toolbar { grid-template-columns: 1fr; }
  .dp-os-field--search, .dp-os-field--chips { grid-column: auto; }
  .dp-os-rule__head { flex-wrap: nowrap; align-items: flex-start; }
  .dp-os-rule__head > .tgl,
  .dp-os-rule .tgl {
    width: 44px !important;
    height: 24px !important;
    min-width: 44px !important;
    min-height: 24px !important;
    max-width: 44px;
    margin-left: auto;
    flex: none;
  }
  .dp-os-chip { min-height: 44px; }
  .dp-os-savebar .btn { min-height: 44px; }
  .dp-os-rule__panel { padding-left: 0; }
}

/* sp10 — rule info popovers, data-source panel, integrations */
.dp-os-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-left: 2px;
  vertical-align: middle;
  z-index: 3;
}
.dp-os-info.is-open { z-index: 80; }
.dp-os-integ-card, .dp-os-integ__h, .dp-os-rule[open], .dp-os-rule__details[open] {
  scroll-margin-top: 72px;
}
.dp-os-info-btn,
body.dp-v2 .dp-os-info-btn,
body.dp-v2 button.dp-os-info-btn {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  flex: none;
  align-self: center;
  padding: 0;
  border: 1px solid var(--omp-border, #d0d5dd);
  border-radius: 50%;
  background: #fff;
  color: var(--omp-navy, #163549);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.dp-os-info-btn:hover,
.dp-os-info-btn:focus-visible,
.dp-os-info.is-open .dp-os-info-btn {
  color: var(--omp-navy, #163549);
  border-color: #2EB3C9;
}
.dp-os-info-btn:focus-visible { outline: 2px solid #2EB3C9; outline-offset: 2px; }
.dp-os-tip {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--omp-navy, #163549);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  box-shadow: 0 8px 24px rgba(22,53,73,0.2);
  white-space: normal;
  text-align: left;
}
.dp-os-tip[hidden] { display: none !important; }
.dp-os-tip,
.dp-os-tip p,
.dp-os-tip strong {
  color: #fff !important;
}
.dp-os-tip p { margin: 0 0 8px; }
.dp-os-tip p:last-child { margin-bottom: 0; }
.dp-os-tip strong { display: block; font-weight: 600; margin-bottom: 2px; }
.dp-os-rule__explain {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--omp-border-light, #e4e7ec);
  border-radius: 8px;
  background: #f7f9fa;
  min-width: 0;
}
.dp-os-rule__explain p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--omp-navy, #163549); }
.dp-os-rule__explain p:last-child { margin-bottom: 0; }
.dp-os-rule__explain strong { display: inline; }
.dp-os-rule__srcs { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; min-width: 0; }
.dp-os-rule__srcs li { margin: 0 0 6px; overflow-wrap: anywhere; }
.dp-os-integ { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0 0 16px; }
.dp-os-integ__h { margin: 0; font-size: 16px; font-weight: 500; color: var(--omp-navy, #002A3A); }
.dp-os-integ-card { min-width: 0; }
.dp-os-integ-card h3 { margin: 0 0 6px; font-size: 14px; }
.dp-os-integ-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.dp-os-integ__rec { font-weight: 500; color: var(--omp-navy, #163549); }
.dp-os-integ__status { margin: 6px 0; }
.dp-os-integ-card.is-target {
  outline: 2px solid #2EB3C9;
  outline-offset: 2px;
  background: #f3fbfc;
}
#os-integrations-card, #rz-st-os-sources, #os-integrations { min-width: 0; max-width: 100%; }
@media (max-width: 700px) {
  .dp-os-tip { max-width: min(320px, calc(100vw - 24px)); }
  .dp-os-info-btn,
  body.dp-v2 .dp-os-info-btn,
  body.dp-v2 button.dp-os-info-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    line-height: 20px;
  }
}

/* sp11 — Hold and capture policy */
.dp-os-hc { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0 0 8px; }
.dp-os-hc__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0;
}
.dp-os-hc__head .dp-os-integ__h { display: inline; margin-right: 6px; }
.dp-os-hc__head > .tgl { flex: none; margin-top: 2px; }
.dp-os-hc-timeline {
  list-style: none; margin: 0; padding: 12px; display: flex; flex-wrap: wrap;
  align-items: stretch; gap: 0; min-width: 0;
  border: 1px solid var(--omp-border-light, #e4e7ec); border-radius: 8px; background: #f7f9fa;
}
.dp-os-hc-step {
  flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 4px;
  padding: 8px 10px; background: #fff; border: 1px solid var(--omp-border-light, #e4e7ec);
  border-radius: 8px;
}
.dp-os-hc-step__n {
  width: 22px; height: 22px; border-radius: 50%;
  background: #F5FDFF; color: var(--omp-navy, #163549); border: 1px solid #2EB3C9;
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.dp-os-hc-step__t { font-size: 13px; font-weight: 600; color: var(--omp-navy, #163549); line-height: 1.35; }
.dp-os-hc-step__d { font-size: 12px; color: var(--omp-slate, #4E6574); line-height: 1.4; }
.dp-os-hc-arrow {
  flex: none; width: 16px; align-self: center;
  height: 0; border-top: 2px solid #2EB3C9; position: relative; margin: 0 4px;
}
.dp-os-hc-arrow::after {
  content: ""; position: absolute; right: -1px; top: -5px;
  border: 4px solid transparent; border-left-color: #2EB3C9;
}
.dp-os-hc-note {
  margin: 0; padding: 8px 10px; border: 1px solid var(--omp-border-light, #e4e7ec);
  border-radius: 8px; background: #fff; min-width: 0;
}
.dp-os-hc-note p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--omp-navy, #163549); overflow-wrap: anywhere; }
.dp-os-hc-note p:last-child { margin-bottom: 0; }
.dp-os-field--check .dp-os-field__ctrl { display: flex; align-items: flex-start; gap: 8px; }
.dp-os-field--check input[type="checkbox"] { margin-top: 3px; flex: none; }
.dp-os-field--check .dp-os-field__lab { font-size: 13px; color: var(--omp-navy, #163549); }
#os-hold-capture-card, #rz-st-os-hold-capture, #os-hold-capture { min-width: 0; max-width: 100%; }
#os-hold-capture-card, #rz-st-os-hold-capture { scroll-margin-top: 72px; }
@media (max-width: 700px) {
  .dp-os-hc-timeline { flex-direction: column; }
  .dp-os-hc-arrow {
    width: 0; height: 14px; margin: 2px auto; border-top: 0;
    border-left: 2px solid #2EB3C9;
  }
  .dp-os-hc-arrow::after {
    right: auto; left: -5px; top: auto; bottom: -1px;
    border: 4px solid transparent; border-top-color: #2EB3C9; border-left-color: transparent;
  }
  .dp-os-hc__head > .tgl,
  .dp-os-hc .tgl {
    width: 44px !important; height: 24px !important;
    min-width: 44px !important; min-height: 24px !important; max-width: 44px; flex: none;
  }
}

#rz-st-os-hold-capture > .v2-composite-h { display: none; }
#os-hold-capture-card > .card-title { display: none; }
.dp-os-hc-lead { margin: 0; font-size: 13px; line-height: 1.45; color: var(--omp-slate, #4E6574); overflow-wrap: anywhere; }

/* sp12 — linked hold, SLA warning, new-customer match checks */
.dp-os-hc-lock {
  margin: 0; padding: 8px 10px;
  border: 1px solid #2EB3C9; border-radius: 8px;
  background: #F5FDFF; color: var(--omp-navy, #163549);
  font-size: 13px; font-weight: 600; line-height: 1.45;
}
.dp-os-hc-warn {
  margin: 0; padding: 8px 10px;
  border: 1px solid #C46B2D; border-radius: 8px;
  background: #FFF7F0; color: var(--omp-navy, #163549);
  font-size: 13px; line-height: 1.45;
}
.dp-os-checks { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dp-os-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.dp-os-check input { margin-top: 3px; flex: none; }
.dp-os-field--checks { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .dp-os-field--checks { grid-column: auto; }
}

/* sp13 — full-width text, side-by-side info, field grid, spacing */

.dp-os-catalog { gap: 20px; margin: 0 0 20px; }
.dp-os-cat { padding: 2px 12px 10px; }
.dp-os-rule { padding: 2px 0; }
.dp-os-rule__head { padding: 12px 0; }
.dp-os-cat__sum { padding: 12px 0 6px; }
.dp-os-cat__bar { padding: 0 0 10px; }

/* Expanded panel uses the full row; the toggle stays on the summary row only. */
.dp-os-rule__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.dp-os-rule__details {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  max-width: none;
}
.dp-os-rule__head:has(> .tgl) .dp-os-rule__details > summary {
  padding-right: 52px;
}
.dp-os-rule__head > .tgl {
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  margin-left: 0;
  margin-top: 2px;
}

body.dp-v2 #os-suggested-rules p,
body.dp-v2 #dp-os-suggested-catalog p,
body.dp-v2 #os-hold-capture-card p,
body.dp-v2 #os-integrations-card p,
body.dp-v2 #rz-st-os-hold-capture p,
body.dp-v2 .dp-os-rule p,
body.dp-v2 .dp-os-rule__explain p,
body.dp-v2 .dp-os-rule__desc,
body.dp-v2 .dp-os-rule .omp-resolve-ops__id,
body.dp-v2 .dp-os-hc p,
body.dp-v2 .dp-os-bands p,
body.dp-v2 .dp-os-cat p,
body.dp-v2 .dp-os-hc-note p,
body.dp-v2 .v2-set-card .dp-os-rule p,
body.dp-v2 .v2-set-card .dp-os-rule__explain p,
body.dp-v2 .v2-set-card .dp-os-rule__desc,
body.dp-v2 .v2-set-card .dp-os-hc p,
body.dp-v2 .v2-set-card .dp-os-bands p {
  max-width: none !important;
}

.dp-os-rule__panel,
.dp-os-rule__desc,
.dp-os-rule__explain,
.dp-os-rule__fields,
.dp-os-hc-note,
.dp-os-bands,
#os-suggested-rules,
#dp-os-suggested-catalog,
.dp-os-catalog,
.dp-os-cat {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  min-width: 0;
}

.dp-os-rule__desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--omp-slate, #4E6574);
}

.dp-os-rule .omp-resolve-ops__id {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  width: 100%;
}

.dp-os-rule__explain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0 0 12px;
  padding: 8px 12px;
}
.dp-os-rule__explain > p { margin: 0; }
.dp-os-rule__explain-src,
.dp-os-rule__explain > p:nth-child(3),
.dp-os-rule__explain > .dp-os-rule__srcs {
  grid-column: 1 / -1;
}
.dp-os-rule__explain-src {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: flex-start;
  min-width: 0;
}
.dp-os-rule__explain-src > p { margin: 0; flex: none; }
.dp-os-rule__explain-src > ul,
.dp-os-rule__explain > .dp-os-rule__srcs {
  margin: 0;
  padding-left: 18px;
  flex: 1 1 220px;
  min-width: 0;
}
.dp-os-rule__explain-src li { margin: 0 0 4px; }
.dp-os-rule__explain-src li:last-child { margin-bottom: 0; }

.dp-os-rule__fields,
.dp-os-bands__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  width: 100%;
  max-width: none;
}
.dp-os-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 200px) minmax(140px, 200px);
  gap: 10px 16px;
  width: 100%;
  max-width: none;
}
.dp-os-field--chips,
.dp-os-field--checks,
.dp-os-field--search { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .dp-os-rule__fields, .dp-os-bands__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dp-os-rule__fields, .dp-os-bands__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-os-toolbar { grid-template-columns: 1fr 1fr; }
  .dp-os-field--search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .dp-os-rule__fields,
  .dp-os-bands__grid,
  .dp-os-toolbar { grid-template-columns: 1fr; }
  .dp-os-field--search, .dp-os-field--chips, .dp-os-field--checks { grid-column: auto; }
  .dp-os-rule__explain { grid-template-columns: 1fr; }
  .dp-os-rule__explain-src,
  .dp-os-rule__explain > p:nth-child(3),
  .dp-os-rule__explain > .dp-os-rule__srcs { grid-column: auto; }
  .dp-os-rule__panel { padding-left: 0; }
}
