/* Date fields as one control with the picker inside the field (owner decision 2026-11-12; reports/design-differences.md,
   "Date fields (b77)"). Loaded after bizbox-theme.css on every themed page. Owned by the date-field work.

   The site-wide date control (courier-form-controls.js) keeps today's parts and today's posting: a typed MM/DD/YYYY box
   and the named native date input (".business-date-picker") that carries the posted value. Here the native input is laid
   over the right end of the typed box, showing only its calendar icon, so the pair draws as the approved
   <input class="bb-input" type="date">: one 34px field, the date text on the left, the calendar icon inside on the right.
   A date-and-time control (".business-datetime": date box, hour:minute box, AM/PM, calendar) draws as one field the same
   way, like the approved datetime-local field.

   Many older page files style these parts (courier-form-controls.css, A8 in bizbox-theme-additions.css,
   courier-reviewed-validation.css, page files); the geometry below is marked !important so that one rule wins on every
   page. Without scripts the named inputs stay the browser's own date fields (one control, picker inside). */

/* ---------- date ---------- */
:root .business-date{min-width:136px;display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:0!important;min-height:0!important;max-width:100%;position:relative;vertical-align:middle}
:root .business-date>input[type=text]{grid-area:1/1!important;align-self:stretch;width:100%!important;min-width:0!important;max-width:none!important;flex:none!important;height:34px;box-sizing:border-box!important;margin:0!important;padding:0 36px 0 10px!important;border:1px solid var(--bb-border-2,#d1d5db)!important;border-radius:var(--bb-r,8px)!important;background:#fff!important;font:inherit;font-size:13.5px!important;color:var(--bb-text,#111827)!important;box-shadow:none}
:root .business-date>input[type=text]::placeholder{color:#8b93a1;opacity:1}
:root .business-date>.business-date-picker{grid-area:1/1!important;justify-self:end!important;align-self:stretch!important;order:0!important;position:relative;z-index:1;display:flex!important;align-items:center;justify-content:flex-end;width:34px!important;min-width:0!important;max-width:34px!important;height:auto!important;min-height:0!important;flex:none!important;box-sizing:border-box!important;margin:0!important;padding:0 12px 0 0!important;border:1px solid transparent!important;border-radius:0 var(--bb-r,8px) var(--bb-r,8px) 0!important;background:transparent!important;box-shadow:none!important;color:transparent!important;font-size:13.5px!important;cursor:pointer}
:root .business-date>.business-date-picker::-webkit-datetime-edit,:root .business-date>.business-date-picker::-webkit-datetime-edit-fields-wrapper{display:none}
:root .business-date>.business-date-picker::-webkit-calendar-picker-indicator{margin:0 0 0 auto;padding:0;opacity:1;cursor:pointer}
:root .business-date>.business-date-picker:disabled,:root .business-date>.business-date-picker:read-only{cursor:default}
:root .business-date>.business-date-picker:focus-visible{outline:2px solid var(--bb-focus,#2563eb);outline-offset:-3px;border-radius:var(--bb-r,8px)}
/* Messages written under a part (field-error, reviewed-field-error) take the line below the field. */
:root .business-date>:not(input){grid-column:1!important;grid-row:auto!important}

/* ---------- date and time ---------- */
:root .business-datetime{display:grid!important;grid-template-columns:auto auto auto minmax(0,1fr) 34px!important;align-items:stretch!important;gap:0!important;width:100%;max-width:100%;min-height:0!important;position:relative}
/* The one field's border and background, behind the parts. */
:root .business-datetime::before{content:"";grid-area:1/1/2/-1;border:1px solid var(--bb-border-2,#d1d5db);border-radius:var(--bb-r,8px);background:#fff;pointer-events:none}
:root .business-datetime>.business-date,:root .business-datetime>.business-time{display:contents!important}
:root .business-datetime input:not([type=hidden]),:root .business-datetime select{position:relative;z-index:1;height:34px!important;min-height:0!important;box-sizing:border-box!important;margin:0!important;border:0!important;border-radius:0!important;background-color:transparent!important;box-shadow:none!important;font:inherit;font-size:13.5px!important;color:var(--bb-text,#111827)!important}
:root .business-datetime .business-date>input[type=text]{grid-area:1/1!important;width:7.7em!important;min-width:0!important;padding:0 4px 0 10px!important;border-radius:var(--bb-r,8px) 0 0 var(--bb-r,8px)!important}
:root .business-datetime .business-time>input{grid-area:1/2!important;width:calc(5ch + 10px)!important;min-width:0!important;max-width:none!important;flex:none!important;padding:0 2px 0 6px!important;text-align:left}
:root .business-datetime .business-time>select{grid-area:1/3!important;width:auto!important;min-width:0!important;flex:none!important;padding:0 18px 0 4px!important;appearance:none;-webkit-appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 4px center!important;cursor:pointer}
:root .business-datetime .business-date>.business-date-picker{grid-area:1/5!important;justify-self:stretch!important;width:34px!important;max-width:34px!important;border:0!important;border-radius:0 var(--bb-r,8px) var(--bb-r,8px) 0!important}
:root .business-datetime input:focus-visible,:root .business-datetime select:focus-visible{outline:2px solid var(--bb-focus,#2563eb)!important;outline-offset:-2px!important;border-radius:var(--bb-r,8px)!important}
:root .business-datetime .business-date>:not(input),:root .business-datetime .business-time>:not(input):not(select),:root .business-datetime>:not(.business-date):not(.business-time):not(input){grid-column:1/-1!important;grid-row:auto!important}
