.date-control{position:relative}.date-control>input{padding-right:58px}
.date-calendar-toggle{position:absolute;right:5px;top:5px;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:9px;color:#655075;background:transparent;cursor:pointer}
.date-calendar-toggle:hover,.date-calendar-toggle[aria-expanded="true"]{background:var(--f-selected);color:#51326f}
.date-calendar-toggle svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.date-calendar{position:fixed;z-index:9000;overflow:auto;overscroll-behavior:contain;margin:0;box-shadow:0 8px 28px #45372f24;padding:16px;background:#fcf9ff;border:1px solid #d5c4e8;border-radius:12px;color:var(--f-ink);width:min(410px,calc(100vw - 16px));max-width:none}
.date-calendar-head{display:grid;grid-template-columns:32px minmax(0,1fr) minmax(0,.8fr) 32px;gap:7px;align-items:center}
.date-calendar-head select{min-height:40px;height:40px;padding:6px 20px 6px 10px;font-size:14px;appearance:auto;background:#fff;border-color:#d5c4e8}
.date-calendar-nav{width:32px;height:40px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#655075;cursor:pointer}
.date-calendar-nav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.date-calendar-nav:hover{background:var(--f-selected)}.date-calendar-nav:disabled{opacity:.3;cursor:default}
.date-calendar-week,.date-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.date-calendar-week{margin:16px 0 4px;text-align:center;color:var(--f-muted);font-size:12px}
.date-calendar-day{width:100%;min-height:36px;aspect-ratio:1.1;border:1px solid transparent;background:transparent;border-radius:8px;font:inherit;font-size:14px;cursor:pointer;color:var(--f-ink);padding:2px}
.date-calendar-day:hover:not(:disabled){background:var(--f-selected)}
.date-calendar-day[aria-pressed="true"]{background:#e9ddf8;border-color:#9c80bc;color:#51326f;font-weight:600}
.date-calendar-day[aria-current="date"]{border-color:#d5c4e8}.date-calendar-day:disabled{color:#a29ba8;opacity:.5;cursor:default}
.date-calendar-footer{display:flex;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid #e5dceb}
.date-calendar-footer button{border:0;border-radius:6px;padding:6px 4px;background:transparent;font:inherit;font-size:13px;color:#655075;cursor:pointer}
.date-calendar-footer button:hover{color:#51326f;background:var(--f-selected)}

.date-calendar{box-sizing:border-box;--f-ink:#2a2230;--f-muted:#796c83;--f-selected:#eee5f4}.date-calendar button,.date-control button{margin:0;padding:0}.date-calendar[hidden]{display:none}.date-calendar-toggle{top:50%;transform:translateY(-50%)}.date-calendar-footer button{padding:6px}.date-calendar button{min-height:36px}.date-calendar-day{aspect-ratio:auto}
/* Calendar can be narrow inside an editor even on a wide desktop. */
.date-calendar{container-type:inline-size;container-name:meiova-calendar}
@container meiova-calendar (max-width:300px){
 .date-calendar-head{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .date-calendar-head .date-calendar-month{grid-column:1;grid-row:1}
 .date-calendar-head .date-calendar-year{grid-column:2;grid-row:1}
 .date-calendar-head select{width:100%;min-width:0;padding:6px;font-size:14px}
 .date-calendar-nav[data-month="-1"]{grid-column:1;grid-row:2;justify-self:start;width:44px;height:44px}
 .date-calendar-nav[data-month="1"]{grid-column:2;grid-row:2;justify-self:end;width:44px;height:44px}
 .date-calendar-footer{gap:6px}
 .date-calendar-footer button{font-size:12px;white-space:nowrap;padding:6px 2px;min-height:44px}
}
