/* The house date picker (datepicker.js, accounts contract section 16). The field is the workspace's own text field;
   the calendar card is absolutely placed inside the field's box, below it or above it, so the page never grows or
   moves when it opens. Nothing here is fixed or sticky. Same tokens as the forms around it (platform.css, vault.css). */

/* a native date field before datepicker.js upgrades it (the same task, never painted) is already the upgraded height,
   so a form that measures itself as it is drawn measures what it will be */
.fk-field input[type=date]{height:44px}

.fk-date-cap{display:block}
.fk-date-box{position:relative}
.fk-date-box.is-open{z-index:30}
.fk-date-box .fk-date-in{display:block;width:100%;min-height:44px;font:inherit;font-size:14px;color:var(--ink);background:#fff;border:1px solid #e1e4e0;border-radius:10px;padding:11px 42px 11px 12px;font-variant-numeric:tabular-nums;transition:border-color .15s,box-shadow .15s}
.fk-date-box .fk-date-in::placeholder{color:#a3a8a4}
.fk-date-box .fk-date-in:hover{border-color:#d3d6d2}
.fk-date-box .fk-date-in:focus,.fk-date-box.is-open .fk-date-in{outline:none;border-color:#b9c9bd;box-shadow:0 0 0 3px #eef4ef}
.fk-date-ico{position:absolute;right:13px;top:13px;width:18px;height:18px;fill:none;stroke:#6b716d;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;transition:stroke .2s}
.fk-date-box.is-open .fk-date-ico{stroke:var(--green)}
/* while typing: what it reads as, quietly, at the field's end */
.fk-date-hint{position:absolute;right:40px;top:0;height:44px;display:flex;align-items:center;font-size:12px;color:#6f7671;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s}
.fk-date-hint.on{opacity:1}
.fk-date-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* the card: over the form, the width of seven 44px days and a little air. It matches the field from 318px to 344px wide
   (a 375px phone's form column), its sides narrowing from 10px to 4px so the seven days still fit; only a field
   narrower than that has a card wider than itself */
.fk-date-card{position:absolute;left:0;top:calc(100% + 6px);z-index:1;width:max(318px,min(344px,100%));padding:6px clamp(4px,calc((100% - 318px)/2 + 4px),10px) 8px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 1px 2px rgba(30,34,32,.04),0 18px 44px rgba(30,34,32,.13);color:var(--ink);font-size:13px;line-height:1.3;text-align:left;cursor:default;-webkit-user-select:none;user-select:none}
.fk-date-card.up{top:auto;bottom:calc(100% + 6px)}
.fk-date-card[hidden]{display:none}
.fk-date-head{display:flex;align-items:center;justify-content:space-between;gap:8px;height:44px;padding-left:8px}
.fk-date-title{margin:0;font-size:14px;font-weight:500;letter-spacing:-.015em;color:var(--ink);white-space:nowrap}
.fk-date-title span{font-weight:400;color:#6b716d}
.fk-date-nav{display:flex;margin-right:-4px}
.fk-date-nav button{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:12px;background:none;color:#5f6662;transition:background .15s,color .15s,opacity .2s}
.fk-date-nav svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.fk-date-prev svg{transform:rotate(180deg)}
.fk-date-nav button[aria-disabled=true]{opacity:.3;cursor:default}

.fk-date-grid{display:block}
.fk-date-row{display:grid;grid-template-columns:repeat(7,minmax(44px,1fr))}
.fk-date-week .fk-date-row{height:24px;align-items:center}
.fk-date-week span{text-align:center;font-size:10px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:#6b716d}
/* the weeks glide sideways inside this window; six rows every month, so the card never changes height */
.fk-date-view{position:relative;overflow:hidden;margin:2px -2px 0;padding:0 2px}
.fk-date-weeks{display:grid;grid-template-rows:repeat(6,44px)}
.fk-date-weeks.leaving{position:absolute;left:2px;right:2px;top:0;pointer-events:none}
.fk-date-day{height:44px;display:grid;place-items:center;outline:none;cursor:pointer;font-size:13px;color:var(--ink);-webkit-tap-highlight-color:transparent}
.fk-date-day span{position:relative;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;transition:background .15s,color .15s,box-shadow .15s}
.fk-date-day.out{color:#717772}
.fk-date-day.today span{color:var(--green);font-weight:600}
.fk-date-day.today span:after{content:"";position:absolute;left:50%;bottom:5px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:currentColor}
.fk-date-day[aria-selected=true] span{background:var(--green);color:#fff;font-weight:500}
.fk-date-day[aria-disabled=true]{color:#cdd1cd;cursor:default}
.fk-date-day.today[aria-disabled=true] span{color:#9cc0ad}
.fk-date-day:focus-visible span{box-shadow:0 0 0 2px #fff,0 0 0 4px #9fcfb3}

/* quick picks: quiet words under the grid; Clear sits apart at the end */
.fk-date-picks{display:flex;flex-wrap:wrap;align-items:center;gap:0 2px;margin:6px -4px 0;padding-top:6px;border-top:1px solid var(--line)}
.fk-date-pick{min-height:44px;padding:0 8px;border:0;border-radius:10px;background:none;font-size:13px;font-weight:500;color:#3f4642;white-space:nowrap;transition:background .15s,color .15s}
.fk-date-clear{margin-left:auto;font-weight:400;color:#6b716d}
.fk-date-pick[aria-disabled=true]{color:#b9beb9;cursor:default}
.fk-date-nav button:focus-visible,.fk-date-pick:focus-visible{outline:2px solid #9fcfb3;outline-offset:-2px}

@media(hover:hover){
  .fk-date-nav button:not([aria-disabled=true]):hover{background:#f3f6f3;color:var(--ink)}
  .fk-date-day:not([aria-disabled=true]):not([aria-selected=true]):hover span{background:#f1f4f1}
  .fk-date-pick:not([aria-disabled=true]):hover{background:#f3f6f3;color:var(--ink)}
}
@media(prefers-reduced-motion:reduce){.fk-date-box .fk-date-in,.fk-date-ico,.fk-date-hint,.fk-date-nav button,.fk-date-day span,.fk-date-pick{transition:none}}
