/* Shared date family. Screen-only, exact-account gate from gc-date-controls.js.
 * Consume ERP tokens; do not change readonly history, printed dates or business layouts. */
html body.gc-date-controls-peter {
  --gc-date-height: 32px;
  --gc-date-cell: 32px;
  --gc-date-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
}
html body.gc-date-controls-peter :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]),
html body.gc-date-controls-peter :is(#main#main,#controlsBar#controlsBar,#updateBackdrop#updateBackdrop,#newStyleBackdrop#newStyleBackdrop,#drawer#drawer,.gc-rpt-backdrop,#gc-st-backdrop#gc-st-backdrop) :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100%;
  height: var(--gc-date-height) !important;
  min-height: var(--gc-date-height) !important;
  border: 1px solid var(--line-strong,#d9d9d9) !important;
  border-radius: 6px !important;
  background-color: #fff !important;
  color: var(--ink,#262626) !important;
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  letter-spacing: normal !important;
  padding: 0 11px !important;
  outline: none !important;
  box-shadow: none !important;
  color-scheme: light;
}
html body.gc-date-controls-peter :is(input[type="date"],input[data-macos-date]),
html body.gc-date-controls-peter :is(#main#main,#controlsBar#controlsBar,#updateBackdrop#updateBackdrop,#newStyleBackdrop#newStyleBackdrop,#drawer#drawer,.gc-rpt-backdrop,#gc-st-backdrop#gc-st-backdrop) :is(input[type="date"],input[data-macos-date]) {
  background-image: var(--gc-date-icon) !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  padding-right: 31px !important;
}
html body.gc-date-controls-peter :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]):hover,
html body.gc-date-controls-peter :is(#main#main,#controlsBar#controlsBar,#updateBackdrop#updateBackdrop,#newStyleBackdrop#newStyleBackdrop,#drawer#drawer,.gc-rpt-backdrop,#gc-st-backdrop#gc-st-backdrop) :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]):hover {
  background-color: #fff !important;
  border-color: var(--apple-blue,#1677ff) !important;
}
html body.gc-date-controls-peter :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]):focus-visible {
  outline: 2px solid var(--apple-blue,#1677ff) !important;
  outline-offset: -2px !important;
}
html body.gc-date-controls-peter :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]):disabled,
html body.gc-date-controls-peter :is(#main#main,#controlsBar#controlsBar,#updateBackdrop#updateBackdrop,#newStyleBackdrop#newStyleBackdrop,#drawer#drawer,.gc-rpt-backdrop,#gc-st-backdrop#gc-st-backdrop) :is(input[type="date"],input[type="month"],input[type="datetime-local"],input[data-macos-date]):disabled {
  background-color: var(--bg-sunken,#f5f5f5) !important;
  color: var(--ink-mute,#8c8c8c) !important;
  cursor: not-allowed !important;
}
html body.gc-date-controls-peter :is(input[type="date"],input[type="month"],input[type="datetime-local"])[readonly] {
  cursor: default;
}
/* Label + date are one control, not an outer field containing another field. */
html body.gc-date-controls-peter :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter),
html body.gc-date-controls-peter :is(#controlsBar#controlsBar,#main#main) :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter) {
  box-sizing: border-box !important;
  height: var(--gc-date-height) !important;
  min-height: var(--gc-date-height) !important;
  display: flex;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 11px !important;
  border: 1px solid var(--line-strong,#d9d9d9) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
html body.gc-date-controls-peter :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter):hover {
  border-color: var(--apple-blue,#1677ff) !important;
}
html body.gc-date-controls-peter :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter) :is(label,span):not(.ef-clear-btn),
html body.gc-date-controls-peter :is(#controlsBar#controlsBar,#main#main) :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter) :is(label,span):not(.ef-clear-btn) {
  font: 400 14px/22px var(--font-sans) !important;
  color: var(--ink-mute) !important;
  letter-spacing: normal !important;
  white-space: nowrap;
  height: auto !important;
  flex: 0 0 auto;
}
html body.gc-date-controls-peter :is(#controlsBar#controlsBar,#main#main,.fs-detail-root) :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter) input[type="date"] {
  flex: 1 1 auto;
  width: 100%;
  height: calc(var(--gc-date-height) - 2px) !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  padding: 0 23px 0 0 !important;
  background-position: right 0 center !important;
  box-shadow: none !important;
}
html body.gc-date-controls-peter :is(.ef-date-filter,.erp-workspace-date-control,.peter-followup-date-filter) :is(.ef-clear-btn,[data-acc-ef-clear]) {
  flex-shrink: 0;
  min-width: 24px;
  height: calc(var(--gc-date-height) - 2px) !important;
  min-height: 0 !important;
  color: var(--ink-mute) !important;
  background: transparent !important;
}
html body.gc-date-controls-peter input::-webkit-datetime-edit,
html body.gc-date-controls-peter input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  background: transparent;
}
/* Range picker keeps its original range state/events and popover positioning. */
html body.gc-date-controls-peter #gc-followup-date-trigger {
  height: var(--gc-date-height) !important;
  min-height: var(--gc-date-height) !important;
  border-radius: 6px !important;
  background: #fff !important;
  font: 400 14px/22px var(--font-sans) !important;
  box-shadow: none !important;
}
html body.gc-date-controls-peter #gc-followup-date-popover,
html body.gc-date-controls-peter .gc-date-popup {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 10100;
  box-sizing: border-box;
  width: 300px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--ink);
  font: 400 14px/22px var(--font-sans);
  box-shadow: 0 6px 16px rgba(0,0,0,.08),0 3px 6px rgba(0,0,0,.04);
  backdrop-filter: none;
  animation: none;
}
html body.gc-date-controls-peter .gc-date-popup::backdrop { background: transparent; }
html body.gc-date-controls-peter :is(.gc-date-popup,#gc-followup-date-popover) button {
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--ink) !important;
  font: 400 14px/22px var(--font-sans) !important;
  min-width: 0;
  min-height: var(--gc-date-cell) !important;
  padding: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}
html body.gc-date-controls-peter :is(.gc-date-popup,#gc-followup-date-popover) button:hover:not(:disabled) { background: var(--bg-sunken,#f5f5f5) !important; }
html body.gc-date-controls-peter :is(.gc-date-popup,#gc-followup-date-popover) button:focus-visible {
  outline: 2px solid var(--apple-blue,#1677ff) !important;
  outline-offset: -2px;
}
html body.gc-date-controls-peter :is(.gc-date-popup,#gc-followup-date-popover) button[aria-pressed="true"] {
  background: var(--apple-blue,#1677ff) !important;
  color: #fff !important;
}
html body.gc-date-controls-peter .gc-date-popup button:disabled { opacity: .35; cursor: not-allowed; }
html body.gc-date-controls-peter #gc-date-popup button[aria-current="date"] { box-shadow: inset 0 0 0 1px var(--apple-blue) !important; }
html body.gc-date-controls-peter .gc-date-head { display: grid;grid-template-columns: 28px 28px 1fr 28px 28px;align-items:center;margin-bottom:8px; }
html body.gc-date-controls-peter .gc-date-head strong { text-align:center;font-weight:600;white-space:nowrap; }
html body.gc-date-controls-peter :is(.gc-date-week,.gc-date-grid) { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px; }
html body.gc-date-controls-peter .gc-date-week span { text-align:center;color:var(--ink-mute);line-height:28px;font-size:12px; }
html body.gc-date-controls-peter .gc-date-foot { display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:8px;padding-top:8px; }
html body.gc-date-controls-peter #gc-date-popup .gc-date-foot button { padding:0 8px !important;color:var(--apple-blue) !important; }
html body.gc-date-controls-peter #gc-followup-date-popover .gc-followup-calendar-modes { border-radius:6px;padding:2px; }
html body.gc-date-controls-peter #gc-followup-date-popover button.is-in-range { background:var(--apple-blue-bg,#e6f4ff) !important;color:var(--apple-blue) !important; }
@media (max-width:900px) {
  html body.gc-date-controls-peter { --gc-date-height:44px;--gc-date-cell:44px; }
  html body.gc-date-controls-peter .gc-date-popup,
  html body.gc-date-controls-peter #gc-followup-date-popover { width:340px; }
}
@media print {
  .gc-date-popup { display:none !important; }
}
