/* True Price Calculator ([dd_true_price]). Mobile-first; loaded only on pages carrying the shortcode. */

.dd-tp { margin: 1.8rem 0 2.2rem; }
.dd-tp *, .dd-tp *::before, .dd-tp *::after { box-sizing: border-box; }
.dd-tp__kicker { font-family: var(--dd-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dd-mulberry); margin: 0 0 0.7rem; }

/* Inputs: each group is its own soft card on the cream canvas */
.dd-tp__form { display: grid; gap: 0.9rem; }
.dd-tp__group { margin: 0; padding: 0.4rem 1.1rem 0.6rem; background: #fff; border: 1px solid var(--dd-rule); border-radius: 16px; min-width: 0; }
.dd-tp__group legend { float: left; width: 100%; padding: 0.7rem 0 0.3rem; font-family: var(--dd-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dd-muted); }
.dd-tp__group legend + * { clear: both; }

.dd-tp__row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid var(--dd-rule); }
.dd-tp__group .dd-tp__row:first-of-type { border-top: 0; }
.dd-tp__row label { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; cursor: pointer; }
.dd-tp__lbl { font-weight: 700; font-size: 0.98rem; line-height: 1.25; color: var(--dd-ink); }
.dd-tp__hint { font-size: 0.8rem; line-height: 1.3; color: var(--dd-muted); }
.dd-tp__field { flex: 0 0 auto; display: inline-flex; align-items: center; width: 7.6rem; height: 44px; padding: 0 0.7rem; background: var(--dd-canvas); border: 1.5px solid var(--dd-border); border-radius: 12px; }
.dd-tp__field:focus-within { border-color: var(--dd-berry); box-shadow: 0 0 0 3px rgba(217, 79, 106, 0.18); }
.dd-tp__field input { width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; font-family: var(--dd-mono); font-size: 16px; color: var(--dd-ink); text-align: right; padding: 0; outline: none; -moz-appearance: textfield; appearance: textfield; }
.dd-tp__field input::-webkit-outer-spin-button, .dd-tp__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dd-tp__unit { font-family: var(--dd-mono); font-size: 0.85rem; color: var(--dd-muted); }
.dd-tp__unit--after { margin-left: 0.3rem; }
.dd-tp__row.is-off { opacity: 0.45; }
.dd-tp__row.is-off label { cursor: not-allowed; }

/* In store / Online segmented pill */
.dd-tp__row--where { flex-wrap: wrap; }
.dd-tp__seg { display: inline-flex; padding: 3px; background: var(--dd-canvas); border: 1.5px solid var(--dd-border); border-radius: 999px; }
.dd-tp__seg label { position: relative; display: inline-flex; flex: none; flex-direction: row; align-items: center; justify-content: center; min-height: 38px; padding: 0 0.95rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--dd-muted); cursor: pointer; }
.dd-tp__seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dd-tp__seg label:has(input:checked) { background: var(--dd-berry); color: #fff; }
.dd-tp__seg label:has(input:focus-visible) { outline: 2px solid var(--dd-ink); outline-offset: 2px; }

/* Optional balances */
.dd-tp__more { background: #fff; border: 1px solid var(--dd-rule); border-radius: 16px; padding: 0 1.1rem; }
.dd-tp__more summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; font-size: 0.95rem; list-style: none; }
.dd-tp__more summary::-webkit-details-marker { display: none; }
.dd-tp__more summary::before { content: "+"; font-family: var(--dd-mono); color: var(--dd-berry); margin-right: 0.55rem; font-size: 1.1rem; }
.dd-tp__more[open] summary::before { content: "\2212"; }
.dd-tp__more summary span { font-weight: 400; color: var(--dd-muted); margin-left: 0.35rem; }
.dd-tp__more[open] { padding-bottom: 0.5rem; }
.dd-tp__note { font-size: 0.85rem; color: var(--dd-muted); margin: 0 0 0.3rem; }

/* Output */
.dd-tp__out { display: grid; gap: 0.9rem; margin-top: 1.1rem; }
.dd-tp__receipt { position: relative; background: var(--dd-paper); border: 1px solid var(--dd-border); border-radius: 16px; padding: 1.2rem 1.15rem 1.1rem; font-family: var(--dd-mono); }
.dd-tp__rhead { text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dd-mulberry); margin: 0 0 0.8rem; padding-bottom: 0.7rem; border-bottom: 2px dashed var(--dd-border); }
.dd-tp__line { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; line-height: 1.4; padding: 0.22rem 0; color: var(--dd-ink); }
.dd-tp__line span:last-child { white-space: nowrap; }
.dd-tp__line.is-off span:last-child { color: var(--dd-mulberry); }
.dd-tp__line.is-back span:last-child { color: var(--dd-ledger); }
.dd-tp__line.is-sub { margin: 0.35rem 0; padding: 0.45rem 0; border-top: 1px solid var(--dd-border); border-bottom: 1px solid var(--dd-border); }
.dd-tp__line.is-total { margin-top: 0.5rem; padding-top: 0.6rem; border-top: 2px dashed var(--dd-border); font-size: 1rem; }
.dd-tp__line.is-total span:last-child { color: var(--dd-ledger); }
.dd-tp__sum { font-family: var(--wp--preset--font-family--body, 'DM Sans', sans-serif); font-size: 0.95rem; line-height: 1.45; margin: 0.9rem 0 0; color: var(--dd-ink); }
.dd-tp__big { display: block; font-family: var(--dd-display); font-size: 2rem; line-height: 1.05; color: var(--dd-ink); margin-bottom: 0.2rem; }
.dd-tp__fine { font-family: var(--dd-mono); font-size: 0.7rem; line-height: 1.45; color: var(--dd-muted); margin: 0.6rem 0 0; }
.dd-tp__empty { margin: 0; font-size: 0.9rem; color: var(--dd-muted); text-align: center; }

.dd-tp__warn, .dd-tp__ok, .dd-tp__pay { background: #fff; border: 1px solid var(--dd-rule); border-radius: 16px; padding: 1rem 1.1rem; font-size: 0.92rem; line-height: 1.5; }
.dd-tp__warn { border-left: 4px solid var(--dd-berry); }
.dd-tp__ok { border-left: 4px solid var(--dd-ledger); }
.dd-tp__ok p:last-child { margin: 0; }
.dd-tp__h { font-family: var(--dd-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dd-muted); margin: 0 0 0.5rem; }
.dd-tp__warn ul { margin: 0; padding-left: 1.1rem; }
.dd-tp__warn li + li { margin-top: 0.45rem; }

.dd-tp__pay ol { list-style: none; margin: 0; padding: 0; }
.dd-tp__pay li { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; padding: 0.7rem 0; border-top: 1px solid var(--dd-rule); }
.dd-tp__pay li:first-child { border-top: 0; padding-top: 0.2rem; }
.dd-tp__when { grid-row: span 2; align-self: start; font-family: var(--dd-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--dd-paper); color: var(--dd-mulberry); }
.dd-tp__pay li:first-child .dd-tp__when { background: #E4F4EC; color: #1F7550; }
.dd-tp__who { font-weight: 700; }
.dd-tp__what { color: var(--dd-ink); }
.dd-tp__what b { color: var(--dd-ink); }

/* Email CTA + app links (full mode only) */
.dd-tp__cta { margin-top: 1.1rem; text-align: center; background: #fff; border: 1px solid var(--dd-rule); border-radius: 16px; padding: 1.4rem 1.2rem 1.2rem; }
.dd-tp__cta h3 { font-family: var(--dd-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin: 0.2rem 0 0.5rem; }
.dd-tp__cta p { color: var(--dd-muted); margin: 0 auto 1rem; max-width: 40ch; font-size: 0.95rem; }
.dd-tp__cta .dd-optin-note { margin: 0.7rem 0 0; }
.dd-tp__apps, .dd-tp__full { font-size: 0.88rem; color: var(--dd-muted); margin: 0.9rem 0 0; text-align: center; }
.dd-tp__full a { font-weight: 700; color: var(--dd-mulberry); }

@media (min-width: 721px) {
  .dd-tp__field { width: 9rem; }
  .dd-tp__receipt { padding: 1.5rem 1.6rem 1.3rem; }
}
