/* ROI calculator (.dp-roi). Built by initRoi() in assets/js/widgets.js from the
   ".dp-roi-assumptions" list that editors maintain in the block editor. 2026-11-19
   Layout: inputs (two groups side by side) + button, then the results underneath. */
.dp-roi { max-width: 1000px; margin-left: auto !important; margin-right: auto !important; }
.dp-roi-calc { display: grid; gap: 32px; margin-bottom: 48px; }
.dp-roi-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dp-roi-group { margin: 0; padding: 24px 28px; border: 1px solid var(--wp--preset--color--silver, #e4e9ed); border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(0, 58, 99, .08); }
.dp-roi-group legend { padding: 0 6px; margin-left: -6px; font-weight: 800; font-size: 18px; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-row { display: grid; gap: 6px; margin-top: 16px; }
.dp-roi-row label { font-size: 15px; font-weight: 600; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-input { display: flex; align-items: stretch; border: 1px solid #c7d2db; border-radius: 10px; overflow: hidden; background: #fff; }
.dp-roi-input:focus-within { outline: 3px solid var(--wp--preset--color--sky-1, #3fccfb); outline-offset: 1px; border-color: var(--wp--preset--color--sky, #00b8f9); }
.dp-roi-input input { flex: 1; min-width: 0; border: 0 !important; padding: 10px 12px; font: inherit; font-size: 16px; color: #1d2b36; background: transparent; outline: none; box-shadow: none !important; }
.dp-roi-affix { display: flex; align-items: center; padding: 0 12px; background: var(--wp--preset--color--surface, #f4f7fa); color: #5a6b78; font-weight: 600; }

/* Button + validation */
.dp-roi-actions { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; }
.dp-roi-button { border: 0; border-radius: 600px; padding: 14px 32px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; background: var(--wp--preset--color--navy, #003a63); color: #fff; transition: background .15s; }
.dp-roi-button:hover, .dp-roi-button:focus-visible { background: var(--wp--preset--color--sky-dark, #008ec7); }
.dp-roi-button:focus-visible { outline: 3px solid var(--wp--preset--color--sky-1, #3fccfb); outline-offset: 2px; }
.dp-roi-error { margin: 0; color: #b42318; font-weight: 600; font-size: 15px; text-align: center; }
.dp-roi-error[hidden] { display: none; }
.dp-roi-input.is-invalid { border-color: #b42318; }

/* Results, under the inputs */
.dp-roi-results { border-radius: 16px; background: var(--wp--preset--color--surface, #f4f7fa); padding: 32px; }
.dp-roi-results h2.dp-roi-heading { margin: 0 0 16px !important; font-size: clamp(24px, 2.6vw, 30px) !important; text-align: center; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-prompt { margin: 0; font-size: 17px; text-align: center; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-prompt[hidden] { display: none; }
.dp-roi-out { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dp-roi-out[hidden] { display: none; }
.dp-roi-card { border-radius: 14px; padding: 22px 24px; background: var(--wp--preset--color--navy, #003a63); color: #fff; text-align: center; }
.dp-roi-card--net { background: var(--wp--preset--color--sky-dark, #008ec7); }
.dp-roi-value { font-size: clamp(32px, 4vw, 44px); font-weight: 800; line-height: 1.1; }
.dp-roi-label { margin-top: 6px; font-size: 14px; font-weight: 600; opacity: .9; }
.dp-roi-table { background: #fff; border-radius: 14px; padding: 18px 20px; }
.dp-roi-table h3 { margin: 0 0 8px !important; font-size: 17px !important; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid #edf1f4; font-size: 15px; }
.dp-roi-line span:last-child { font-weight: 700; white-space: nowrap; color: var(--wp--preset--color--navy, #003a63); }
.dp-roi-line--total { font-weight: 800; border-top: 2px solid #d5dee5; }
.dp-roi-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; text-align: center; color: #5a6b78; }

/* Assumptions list (edited in the block editor) */
.dp-roi :is(.dp-roi-assumptions, .dp-roi-pricing) { font-size: 15px; columns: 2; column-gap: 40px; }

@media (max-width: 760px) {
	.dp-roi-form, .dp-roi-out { grid-template-columns: 1fr; }
	.dp-roi :is(.dp-roi-assumptions, .dp-roi-pricing) { columns: 1; }
	.dp-roi-group, .dp-roi-results { padding: 20px; }
	.dp-roi-button { width: 100%; }
}
/* v2 (ROI math doc): hint, pro tip, table notes (2026-11-19) */
.dp-roi-hint { font-size: 13px; color: #5a6b78; }
.dp-roi-tip { grid-column: 1 / -1; padding: 14px 18px; border-radius: 12px; background: var(--wp--preset--color--mint-1, #c6f9df); color: var(--wp--preset--color--navy, #003a63); font-size: 15px; }
.dp-roi-sub { margin: 0 0 6px !important; font-size: 13px !important; color: #5a6b78; }
