/* The leave entitlement calculator (templates/includes/kalkulator.html, static/kalkulator.js).
   Loaded on its page only. Colours are tokens from variables.css; the card, the inputs of .tool
   and the .warns list come from site.css. The result card is the price calculator's deep green. */

/* The tool is the page's first screen: the hero leaves it room. */
.hero--page { padding-bottom: clamp(20px, 3vw, 32px); }

.kalk-band { padding-block: 0 clamp(56px, 7vw, 96px); }
.kalk { display: grid; gap: 18px; }
.kalk__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* --- the form ------------------------------------------------------------------ */
.kalk__form { gap: 0; }
.kalk__title { margin-bottom: 4px; }
.kalk__group { border: 0; margin: 0; padding: 18px 0 0; min-width: 0; }
.kalk__group + .kalk__group { margin-top: 18px; border-top: 1px solid var(--line); }
/* A floated legend sits inside the fieldset like a heading instead of on its border. */
.kalk__legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--ink); }
.kalk__n { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-bg); color: var(--teal-ink); font-size: 13px; font-weight: 800; }
.kalk__fields { clear: both; display: grid; gap: 14px; min-width: 0; }
.kalk__sub { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.kalk__sublegend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.kalk__sub > :not(legend) { clear: both; }
.kalk__sub--indent { padding-left: 32px; }
.kalk__pair { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.kalk__field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.kalk__field--date { flex: 1 1 180px; max-width: 240px; }
.kalk__field--year { max-width: 160px; }
.kalk__label { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.kalk__hint { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); max-width: 64ch; }
.kalk__slash { font-size: 22px; font-weight: 700; color: var(--ink-3); padding-bottom: 8px; }
.kalk select, .kalk input[type="number"], .kalk input[type="date"] { min-height: 44px; }
.kalk select { width: 100%; max-width: 100%; }
.kalk input[type="date"] { width: 100%; }
.kalk__choices { display: grid; gap: 4px; }
.kalk__check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 5px 0; font-size: 15px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.kalk__check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal-btn); cursor: pointer; }

/* --- the result ---------------------------------------------------------------- */
.kalk__side { display: grid; gap: 16px; min-width: 0; position: sticky; top: calc(var(--top-h) + 16px); }
.kalk__res { display: grid; gap: 6px; padding: clamp(20px, 3vw, 30px); border-radius: 22px; background: var(--deep); color: var(--white); box-shadow: var(--shadow); }
.kalk__res:focus-visible { outline-offset: 4px; }
.kalk__res-title { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; color: var(--teal-bg); }
.kalk__sum { display: grid; gap: 6px; transition: opacity .15s ease; }
.kalk__res.is-off .kalk__sum { opacity: .4; }
.kalk__big { margin-top: 4px; font-size: clamp(52px, 6vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.kalk__unit { font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: 0; color: rgba(var(--white-rgb), .82); }
.kalk__hours { font-size: clamp(20px, 2vw, 24px); font-weight: 800; }
.kalk__why { font-size: 15px; line-height: 1.5; color: rgba(var(--white-rgb), .84); }
.kalk__nojs { font-size: 14px; line-height: 1.5; color: var(--amber-light); }
.kalk__warns { margin-top: 8px; }
.kalk__warns li { color: var(--ink); }
.kalk__how { gap: 14px; }
.kalk__how h3 { font-size: 18px; letter-spacing: -0.01em; }
.kalk__steps { margin: 0; padding: 0; list-style: none; counter-reset: kstep; display: grid; gap: 10px; }
.kalk__steps li { counter-increment: kstep; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.kalk__steps li::before { content: counter(kstep); display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--sand); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.kalk__note { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); max-width: 96ch; }

/* On a phone the result is below the form: a bar at the bottom of the screen keeps it in sight. */
.kalk__peek { display: none; }
@media (max-width: 980px) {
  .kalk__grid { grid-template-columns: minmax(0, 1fr); }
  .kalk__side { position: static; }
  .kalk__peek { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 12px 20px; border-radius: 999px; background: var(--deep); color: var(--white); text-decoration: none; font-size: 15px; font-weight: 700; box-shadow: 0 14px 30px -14px rgba(var(--ink-rgb), .55); }
  .kalk__peek b { font-size: 17px; font-weight: 800; }
  .kalk__peek.is-off b { opacity: .4; }
}
@media (max-width: 480px) {
  .kalk__sub--indent { padding-left: 0; }
  .kalk__field--date { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .kalk__sum { transition: none; } }
