/* Shared date/time pickers. Media/artwork and source input semantics are untouched. */
.theme-date-field{display:block;position:relative;min-width:0;width:100%;margin-top:6px}
.theme-date-field[hidden],.theme-date-panel [hidden],.theme-date-panel[hidden]{display:none!important}
.theme-date-field>input{box-sizing:border-box;width:100%;margin:0;padding-inline-end:42px!important}
.theme-date-field>input::-webkit-calendar-picker-indicator{display:none}
.theme-date-field .theme-date-toggle{position:absolute;inset-inline-end:5px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:0;margin:0;padding:6px;background:transparent;border:0;border-radius:5px;color:var(--muted,#61718e);box-shadow:none}
.theme-date-toggle svg,.theme-date-nav svg{width:19px;height:19px;flex-shrink:0}
.theme-date-panel{--date-accent:#1464c8;--date-accent-ink:#fff;position:fixed;inset:auto;margin:0;padding:14px;width:336px;max-width:calc(100vw - 16px);box-sizing:border-box;max-height:calc(100dvh - 16px);overflow:auto;border:1px solid var(--control-border,var(--line,#dbe2ed));border-radius:10px;background:var(--surface,var(--card,#fff));color:var(--ink,#252f4a);font-family:inherit;font-size:13px;line-height:1.5;box-shadow:0 10px 36px #07143726;z-index:2500}
.theme-date-panel:popover-open{display:block}.theme-date-panel::backdrop{background:transparent;pointer-events:none}
.theme-date-panel .theme-date-title{margin:0 0 12px;font-size:13px;font-weight:600;color:inherit;overflow-wrap:anywhere}
.theme-date-heading{display:grid;grid-template-columns:30px minmax(0,1fr) 76px 30px;gap:5px;align-items:center;margin-bottom:10px}
.theme-date-panel button{font:inherit;letter-spacing:normal;box-sizing:border-box;cursor:pointer;box-shadow:none}
.theme-date-panel .theme-date-nav{display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;color:inherit;min-height:32px;width:30px;padding:4px;border-radius:5px}
.theme-date-panel .theme-date-heading input[type=number]:not([type=hidden]),.theme-date-panel .theme-select-trigger{height:34px;min-height:34px;margin:0;font-size:12px;padding:5px 7px;box-sizing:border-box;border:1px solid var(--control-border,var(--line,#dbe2ed));border-radius:5px;background:var(--surface,var(--card,#fff));color:inherit}
.theme-date-heading .theme-select{margin:0;min-width:0}.theme-date-heading .theme-select-caption{font-size:12px}.theme-date-heading>input{width:76px!important}
.theme-date-grid{display:grid;gap:3px}.theme-date-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.theme-date-week>[role=columnheader]{text-align:center;font-size:10px;font-weight:500;color:var(--muted,#61718e);padding:4px 0}
.theme-date-panel .theme-date-day{display:flex;align-items:center;justify-content:center;width:100%;height:34px;min-height:34px;margin:0;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:inherit;font-size:12px}
.theme-date-panel .theme-date-day.outside-month{color:var(--muted,#61718e)}
.theme-date-panel .theme-date-day[aria-current=date]{border-color:var(--date-accent);font-weight:600}
.theme-date-panel .theme-date-day[aria-selected=true]{background:var(--date-accent);color:var(--date-accent-ink)}
.theme-date-panel .theme-date-day:not(:disabled):not([aria-selected=true]):hover,.theme-date-panel .theme-date-nav:not(:disabled):hover,.theme-date-panel .theme-date-secondary:hover,.theme-date-field .theme-date-toggle:not(:disabled):hover{background:var(--accent-soft,var(--soft,#eff6ff));color:var(--date-accent)}
.theme-date-panel button:disabled,.theme-date-toggle:disabled{opacity:.4;cursor:default}
.theme-date-panel :is(button,input,.theme-select-trigger):focus-visible,.theme-date-field .theme-date-toggle:focus-visible{outline:2px solid var(--control-focus,#1b84ff);outline-offset:2px}
.theme-date-time{display:flex;gap:10px;margin-top:12px;border-top:1px solid var(--line,#e3e8f2);padding-top:12px}
.theme-date-time>label{display:block;flex:1;min-width:0;margin:0;color:var(--muted,#61718e);font-size:11px}
.theme-date-panel .theme-date-time input[type=number]:not([type=hidden]){display:block;box-sizing:border-box;width:100%;min-width:0;min-height:36px;margin:5px 0 0;padding:6px 9px;border:1px solid var(--control-border,var(--line,#dbe2ed));border-radius:5px;background:var(--surface,var(--card,#fff));color:var(--ink,#252f4a);font:inherit;font-size:13px;text-align:center}
.theme-date-time-hint{display:block;margin:6px 0 0;font-size:11px;color:var(--muted,#61718e)}
.theme-date-panel .theme-date-error{margin:10px 0 0;color:var(--danger,#b42332);font-size:12px}
.theme-date-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:5px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#e3e8f2)}
.theme-date-panel .theme-date-secondary,.theme-date-panel .theme-date-apply{min-height:32px;margin:0;padding:5px 9px;border:1px solid var(--control-border,var(--line,#dbe2ed));border-radius:5px;font-size:12px}
.theme-date-panel .theme-date-secondary{background:transparent;color:inherit}.theme-date-panel .theme-date-apply{background:var(--date-accent);border-color:var(--date-accent);color:var(--date-accent-ink)}
.theme-date-panel[dir=rtl] .theme-date-nav svg{transform:scaleX(-1)}
html[data-color-mode=dark] .theme-date-panel{--date-accent:#8abfff;--date-accent-ink:#101827;box-shadow:0 12px 40px #0007}
html[data-color-mode=dark] .theme-date-panel .theme-date-error{color:#ffb0b8}
@media(prefers-color-scheme:dark){html:not([data-color-mode]) .theme-date-panel{--date-accent:#8abfff;--date-accent-ink:#101827;box-shadow:0 12px 40px #0007}html:not([data-color-mode]) .theme-date-panel .theme-date-error{color:#ffb0b8}}
@media(max-width:400px){.theme-date-panel{padding:12px}.theme-date-panel .theme-date-day{min-height:36px;height:36px}}
@media(pointer:coarse){.theme-date-panel .theme-date-day{min-height:44px;height:44px}.theme-date-panel .theme-date-secondary,.theme-date-panel .theme-date-apply{min-height:40px}.theme-date-panel .theme-date-heading input[type=number]:not([type=hidden]),.theme-date-panel .theme-select-trigger{height:40px;min-height:40px}}
