/* v2 Order Screening: No-reply rules + Rebill protection layout (Nov 28 2026, ux pass).
   Shared row system (dp-fr), same tokens as the other v2 Setup steps and Settings:
   white card #E6E6E6 / 12px radius / 24px padding, 14px 500 navy section titles, 13px slate helper,
   hairline dividers, 38px controls with the stock omp-resolve-ops input/select look.
   Roll back: remove this file's <link> in index.html (and the dp-fr markup in v2-os-noreply.js / v2-os-rebills.js). */

/* 1. Use the full content column on the no-reply step (Settings use minmax(0, 880px) for the same reason). */
@media (min-width: 1367px) {
  body.dp-v2 .v2-stepper:has(#os-noreply-rules) { grid-template-columns: 240px minmax(0, 880px); }
}
body.dp-v2 .v2-stepper:has(#os-noreply-rules) .v2-stepper-form { min-width: 0; }

/* 2. Panels are size containers so rows can stack on narrow columns, not only on narrow screens. */
body.dp-v2 .dp-nr, body.dp-v2 .dp-rb { container-type: inline-size; gap: 16px; }
body.dp-v2 .dp-nr p, body.dp-v2 .dp-rb p { max-width: none; }

/* 3. Intro */
body.dp-v2 .dp-nr-intro h2 { margin: 0 0 4px; font-size: 16px; font-weight: 500; line-height: 22px; color: #163549; }
body.dp-v2 .dp-nr-intro p { margin: 0; font-size: 13px; line-height: 18px; color: #4E6574; }

/* 4. Rule card */
body.dp-v2 .dp-nr .dp-nr-rule {
  background: #fff; border: 1px solid #E6E6E6; border-radius: 12px; padding: 20px 24px 16px; margin: 0;
  min-width: 0; box-sizing: border-box;
}
body.dp-v2 .dp-nr .dp-nr-rule.is-off .dp-nr-body { opacity: .55; }
body.dp-v2 .dp-nr-list { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.dp-v2 .dp-nr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-width: 0; }
body.dp-v2 .dp-nr-head .dp-nr-name.omp-resolve-ops__input { flex: 1 1 280px; width: auto; min-width: 0; max-width: 100%; }
body.dp-v2 .dp-nr-pri { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: #4E6574; white-space: nowrap; }
body.dp-v2 .dp-nr-pri b { font-weight: 400; color: #163549; }
body.dp-v2 .dp-nr-onoff { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: #4E6574; white-space: nowrap; }

/* 5. Sections and rows */
body.dp-v2 .dp-fs { display: block; min-width: 0; margin-top: 16px; padding-top: 16px; border-top: 1px solid #E6E6E6; }
body.dp-v2 .dp-fs:first-of-type { margin-top: 16px; }
body.dp-v2 .dp-fs__t { margin: 0 0 2px; font-size: 14px; font-weight: 500; line-height: 20px; color: #163549; }
body.dp-v2 .dp-fs__d { margin: 0 0 4px; font-size: 13px; line-height: 18px; color: #4E6574; }
body.dp-v2 .dp-fr {
  display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 4px 24px; align-items: start;
  padding: 10px 0; min-width: 0;
}
body.dp-v2 .dp-fr__lab { display: flex; align-items: center; min-height: 38px; font-size: 13px; line-height: 18px; color: #163549; white-space: nowrap; }
body.dp-v2 .dp-fr__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
body.dp-v2 .dp-fr__help { grid-column: 2; margin: 0; font-size: 12px; line-height: 16px; color: #4E6574; }
body.dp-v2 .dp-fr__txt, body.dp-v2 .dp-fr__unit { font-size: 14px; line-height: 20px; color: #163549; white-space: nowrap; }
body.dp-v2 .dp-fr__unit { color: #4E6574; font-size: 13px; }
body.dp-v2 .dp-fr.is-na .dp-fr__ctl { opacity: .5; }
body.dp-v2 .dp-fr--stack { grid-template-columns: minmax(0, 1fr); gap: 6px; }
body.dp-v2 .dp-fr--stack .dp-fr__help { grid-column: 1; }
@container (max-width: 760px) {
  body.dp-v2 .dp-fr { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body.dp-v2 .dp-fr__help { grid-column: 1; }
  body.dp-v2 .dp-fr__lab { white-space: normal; min-height: 0; }
}

/* 6. Controls. Widths are fixed to content; the stock look (38px, 6px radius, #CCC border) is inherited. */
body.dp-v2 .dp-fr .omp-resolve-ops__select { width: 100%; max-width: 440px; min-width: 0; box-sizing: border-box; }
body.dp-v2 .dp-fr--stack .omp-resolve-ops__select.dp-w-long { max-width: 640px; }
body.dp-v2 .dp-fr .omp-resolve-ops__select.dp-w-fb { flex: 1 1 380px; width: auto; max-width: 440px; }
html body.dp-v2 .dp-fr input.omp-resolve-ops__input.dp-w-hrs,
html body.dp-v2 .dp-nr-pri input.omp-resolve-ops__input.dp-w-hrs,
html body.dp-v2 .dp-sent input.omp-resolve-ops__input.dp-w-hrs { width: 96px; max-width: 96px; flex: none; }
html body.dp-v2 .dp-fr input.omp-resolve-ops__input.dp-w-money { width: 136px; max-width: 136px; flex: none; padding-left: 24px; }
body.dp-v2 .dp-money { position: relative; display: inline-flex; flex: none; }
body.dp-v2 .dp-money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #4E6574; pointer-events: none; }
body.dp-v2 .dp-fr .omp-resolve-ops__input:disabled,
body.dp-v2 .dp-fr .omp-resolve-ops__select:disabled { background: #F8F9FB; color: #86969C; cursor: not-allowed; }

/* checkbox + sentence helpers */
body.dp-v2 .dp-chk { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; font-size: 14px; line-height: 20px; color: #163549; white-space: nowrap; cursor: pointer; }
body.dp-v2 .dp-chk input { margin: 0; width: 16px; height: 16px; flex: none; accent-color: #1E91A4; }
body.dp-v2 .dp-chk.is-dis { color: #86969C; cursor: not-allowed; }
body.dp-v2 .dp-sent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; margin: 0; }

/* preset pills (24 / 48 / 72 / custom) */
body.dp-v2 .dp-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
body.dp-v2 .dp-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px;
  border: 1px solid #CCCCCC; border-radius: 6px; background: #fff; color: #163549; font-size: 14px; line-height: 20px;
  white-space: nowrap; cursor: pointer; box-sizing: border-box;
}
body.dp-v2 .dp-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
body.dp-v2 .dp-pill:hover { background: #F5FDFF; }
body.dp-v2 .dp-pill.is-on { border-color: #2EB3C9; background: #F5FDFF; box-shadow: inset 0 0 0 1px #2EB3C9; }
body.dp-v2 .dp-pill:focus-within { outline: 1px solid #1E91A4; outline-offset: 2px; }
body.dp-v2 .dp-pill.is-dis { color: #86969C; cursor: not-allowed; }

/* card footer */
body.dp-v2 .dp-nr-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #E6E6E6; min-width: 0; }
body.dp-v2 .dp-nr-api { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 12px; line-height: 16px; color: #4E6574; overflow-wrap: anywhere; }
body.dp-v2 .dp-nr .dp-os-savebar { gap: 8px 12px; }
body.dp-v2 .dp-nr .dp-os-savebar .btn { white-space: nowrap; }
body.dp-v2 .dp-nr .dp-os-savebar__note { flex: 1 1 280px; }

/* 7. Rebill protection panel: same rows, plus trigger rows and the decision timeline */
body.dp-v2 .dp-rb .dp-rb-trigger { grid-template-columns: minmax(220px, 1fr) auto 44px; gap: 8px 24px; padding: 14px 0; align-items: center; }
body.dp-v2 .dp-rb .dp-rb-trigger__what { font-size: 12px; line-height: 16px; }
body.dp-v2 .dp-rb .dp-rb-trigger__fields.dp-os-rule__fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; width: auto; }
body.dp-v2 .dp-rb .dp-rb-trigger__fields.dp-os-rule__fields { align-items: center; gap: 8px 20px; }
body.dp-v2 .dp-rb .dp-rb-block .dp-fr { padding: 10px 0; }
body.dp-v2 .dp-rb .dp-os-cat { padding: 0 16px 10px; }
body.dp-v2 .dp-rb .dp-rb-hold { padding: 14px 0 4px; }
body.dp-v2 .dp-rb .dp-rb-hold .dp-sent .dp-fr__txt { white-space: normal; }
@container (max-width: 760px) {
  body.dp-v2 .dp-rb .dp-rb-trigger { grid-template-columns: minmax(0, 1fr) 44px; }
  body.dp-v2 .dp-rb .dp-rb-trigger__fields { grid-column: 1 / -1; grid-row: 2; }
}
/* timeline: 2 x 2 so each step reads in at most two lines */
body.dp-v2 .dp-rb .dp-os-hc-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
body.dp-v2 .dp-rb .dp-os-hc-arrow { display: none; }
body.dp-v2 .dp-rb .dp-os-hc-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; padding: 10px 12px; }
body.dp-v2 .dp-rb .dp-os-hc-step__n { grid-row: 1 / span 2; }
@container (max-width: 640px) {
  body.dp-v2 .dp-rb .dp-os-hc-timeline { grid-template-columns: minmax(0, 1fr); }
}
body.dp-v2 .dp-rb .dp-rb-quiet p + p { margin-top: 6px; }

/* mobile: v2-mobile.css makes every control 44px tall / 16px type; match that for pills and checkboxes */
@media (max-width: 900px) {
  body.dp-v2 .dp-pill, body.dp-v2 .dp-chk { min-height: 44px; }
  body.dp-v2 .dp-nr .dp-nr-rule { padding: 16px; }
  body.dp-v2 .dp-nr-pri { flex-wrap: wrap; }
}
