/* Long distance care package builder. Tokens only (dark mode from tools.css). */
.tool .ldr { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tool .ldr-setup { display: flex; flex-direction: column; gap: 16px; }
.tool .ldr-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tool .ldr-budget { font-size: 28px; line-height: 32px; font-weight: 950; letter-spacing: -.02em; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }

/* Budget slider: a thick track that fills, a big thumb for thumbs */
.tool .ldr-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; margin: 0; cursor: pointer; touch-action: pan-y;
}
.tool .ldr-range::-webkit-slider-runnable-track {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgb(var(--accent)) var(--p, 25%), rgb(var(--ink) / .1) var(--p, 25%));
}
.tool .ldr-range::-moz-range-track { height: 12px; border-radius: 6px; background: rgb(var(--ink) / .1); }
.tool .ldr-range::-moz-range-progress { height: 12px; border-radius: 6px; background: rgb(var(--accent)); }
.tool .ldr-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -9px; border-radius: 15px; background: var(--surface);
  box-shadow: 0 0 0 1px rgb(var(--ink) / .12), 0 4px 12px rgb(0 0 0 / .18); transition: transform .15s ease;
}
.tool .ldr-range::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 15px; background: var(--surface); box-shadow: 0 0 0 1px rgb(var(--ink) / .12), 0 4px 12px rgb(0 0 0 / .18); }
.tool .ldr-range:active::-webkit-slider-thumb { transform: scale(1.08); }
.tool .ldr-range:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 8px; }

.tool .ldr-shiprow { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: end; }
.tool .ldr-shiprow .u19-toggle { justify-self: start; }

/* The box */
.tool .ldr-box, .tool .ldr-free { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .ldr-box.is-new { animation: card-in .45s var(--ease-out) both; }
.tool .ldr-boxhead { display: flex; flex-direction: column; gap: 2px; }
.tool .ldr-sum { font-size: 15px; line-height: 22px; font-weight: 650; color: rgb(var(--ink) / .7); font-variant-numeric: tabular-nums; }
.tool .ldr-sum b { font-size: 20px; font-weight: 950; color: rgb(var(--ink)); }
.tool .ldr-over { color: #C0237A; font-weight: 800; }
.tool .ldr-meter.is-over > span { background: #C0237A; }
.tool .ldr-list { display: grid; gap: 2px; margin: 0 -8px; }
.tool .ldr-item {
  display: flex; align-items: flex-start; gap: 4px; padding: 4px 0 4px 4px; border-radius: 14px; transition: background-color .15s ease, opacity .2s ease;
}
.tool .ldr-item.is-done .ldr-text { text-decoration: line-through; text-decoration-color: rgb(var(--ink) / .35); color: rgb(var(--ink) / .5); }
.tool .ldr-item.is-shake { animation: ldr-shake .3s ease; }
@keyframes ldr-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.tool .ldr-check { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.tool .ldr-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tool .ldr-box-ic {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgb(var(--ink) / .25);
  color: transparent; transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.tool .ldr-box-ic .tool-icon { width: 16px; height: 16px; stroke-width: 3; }
.tool .ldr-check input:checked + .ldr-box-ic { background: rgb(var(--accent)); box-shadow: none; color: #fff; }
.tool .ldr-check input:focus-visible + .ldr-box-ic { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
.tool .ldr-text { flex: 1; min-width: 0; font-size: 16px; line-height: 22px; font-weight: 650; color: rgb(var(--ink) / .88); }
.tool .ldr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.tool .ldr-text small { font-size: 12px; line-height: 16px; font-weight: 800; color: #B0571A; }
.tool .ldr-cost {
  min-height: 28px; padding: 0 8px; margin-left: -8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; line-height: 18px;
  font-weight: 800; color: rgb(var(--ink) / .82); font-variant-numeric: tabular-nums; cursor: pointer; text-decoration: underline dotted rgb(var(--ink) / .35); text-underline-offset: 3px;
}
.tool .ldr-cost:focus-visible { outline: 2px solid rgb(var(--accent)); }
.tool .ldr .ldr-priceedit { width: 88px; min-height: 32px; padding: 4px 10px; border-radius: 10px; font-size: 16px; }
@media (prefers-color-scheme: dark) { .tool .ldr-text small { color: #F0A46A; } }
.tool .ldr-act {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px; border: 0; background: none; border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 800; color: rgb(var(--ink) / .62); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tool .ldr-act .tool-icon { width: 15px; height: 15px; }
.tool .ldr-act:active { transform: scale(.95); }
.tool .ldr-act:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: -2px; }
.tool .ldr-add { display: grid; grid-template-columns: 1fr 72px auto; gap: 8px; align-items: center; }
.tool .ldr-add input { min-height: 44px; }
.tool .ldr-tips { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: rgb(var(--accent) / .08); }
.tool .ldr-tips li { font-size: 14px; line-height: 20px; font-weight: 650; color: rgb(var(--ink) / .75); }

/* Budget presets, more chips, abroad, today, waiting state, sticky peek */
.tool .ldr-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: -4px; }
.tool .ldr-presets button {
  min-height: 40px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .08);
  font: inherit; font-size: 14px; font-weight: 850; color: rgb(var(--ink) / .75); cursor: pointer; font-variant-numeric: tabular-nums;
}
.tool .ldr-presets button[aria-pressed="true"] { background: rgb(var(--accent) / .16); box-shadow: inset 0 0 0 2px rgb(var(--accent) / .6); color: rgb(var(--ink)); }
.tool .ldr-presets button:active { transform: scale(.96); }
.tool .ldr-more { align-self: flex-start; min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: none; font: inherit; font-size: 14px; font-weight: 850; color: var(--link); cursor: pointer; }
.tool .ldr-abroad { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgb(var(--accent) / .08); }
.tool .ldr-abroad .u19-toggle { align-self: flex-start; white-space: normal; text-align: left; }
.tool .ldr-today { display: flex; flex-direction: column; gap: 10px; }
.tool .ldr-wait { padding: 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.tool .ldr-peek {
  position: sticky; bottom: 12px; z-index: 2; align-self: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px;
  background: rgb(var(--ink)); color: var(--bg, #fff); font: inherit; font-size: 14px; font-weight: 850; box-shadow: 0 8px 24px rgb(0 0 0 / .2); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.tool .ldr-peek:active { transform: scale(.97); }
@media (min-width: 1000px) { .tool .ldr-peek { display: none; } }
.tool .ldr-notehead { font-size: 16px; font-weight: 900; color: rgb(var(--ink)); }

.tool .ldr-setup > .u19-toggle { align-self: flex-start; }
.tool .ldr-why summary { font-size: 14px; font-weight: 800; color: var(--link); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.tool .ldr-why p { margin-top: 6px; }
.tool .ldr-warn { padding: 12px 16px; border-radius: 16px; background: rgb(var(--accent) / .12); font-size: 15px; line-height: 22px; font-weight: 750; color: rgb(var(--ink)); }
.tool .ldr-todayrow { padding-right: 8px; }
.tool .ldr-todayrow .u19-idea-text { flex: 1 1 200px; }
.tool .ldr-text small.ldr-how, .tool .ldr-msg, .tool .ldr-how { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 650; color: rgb(var(--ink) / .62); }
.tool .ldr-copymsg { flex: none; }

.tool .ldr-left { color: rgb(var(--ink) / .65); }
.tool .ldr .ldr-hint { list-style: none; padding: 0 12px 4px; font-size: 12px; line-height: 16px; font-weight: 750; color: rgb(var(--ink) / .6); }

.tool .ldr-shipbox { border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .08); }
.tool .ldr-shipbox summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none; }
.tool .ldr-shipbox summary::-webkit-details-marker { display: none; }
.tool .ldr-shipbox summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid rgb(var(--ink) / .5); border-bottom: 2px solid rgb(var(--ink) / .5); transform: rotate(45deg); margin-top: -4px; transition: transform .2s ease; }
.tool .ldr-shipbox[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.tool .ldr-shipsum { flex: 1; text-align: right; font-size: 14px; font-weight: 800; color: rgb(var(--ink) / .75); }
.tool .ldr-shipin { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.tool .ldr-shipin > .u19-toggle { align-self: flex-start; }
.tool .ldr-results { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tool .ldr-boxtitle .tool-title { display: flex; flex-direction: column; }
.tool .ldr-boxtitle { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tool .ldr-total { white-space: nowrap; font-size: 24px; line-height: 30px; font-weight: 950; letter-spacing: -.02em; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .ldr-meterrow { display: flex; align-items: center; gap: 10px; }
.tool .ldr-meterrow .tool-meter { flex: 1; }
.tool .ldr-progress { font-size: 13px; font-weight: 800; color: rgb(var(--ink) / .65); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: 0; }
@media (max-width: 420px) { .tool .ldr-act { padding: 0 6px; } .tool .ldr-act span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .tool .ldr-meta { flex-wrap: nowrap; } .tool .ldr-text small { flex-basis: 100%; } .tool .ldr-meta:has(small) { flex-wrap: wrap; } }
.tool .ldr-boxactions .u19-iconbtn { min-height: 36px; padding: 0 12px; }

/* Note */
.tool .ldr-note { display: flex; flex-direction: column; gap: 10px; }
.tool .ldr-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.tool .ldr-prompts button {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px 0 8px; border: 0; border-radius: 18px;
  background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .1); font: inherit; font-size: 13px; font-weight: 750;
  color: rgb(var(--ink) / .75); cursor: pointer; text-align: left;
}
.tool .ldr-prompts button .tool-icon { width: 14px; height: 14px; flex: none; }
.tool .ldr-prompts button:active { transform: scale(.97); }
.tool .ldr-note textarea { font-size: 17px; line-height: 26px; min-height: 140px; }

/* Wide screens: inputs on the left, the box and note on the right (sticky), so changes show live. */
@media (min-width: 1120px) {
  .tool.ldr-root { width: 1060px; margin-left: calc(50% - 530px); }
  .tool .ldr { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .tool .ldr > .tool-cta { grid-column: 1 / -1; }
  .tool .ldr-setup { position: sticky; top: 88px; }
}
@media (hover: hover) and (pointer: fine) {
  .tool .ldr-item:hover { background: rgb(var(--ink) / .03); }
  .tool .ldr-act:hover { color: rgb(var(--ink)); background: rgb(var(--ink) / .05); }
}
@media (prefers-reduced-motion: reduce) { .tool .ldr-item.is-shake, .tool .ldr-box.is-new { animation: none; } }
