/* Shared modern date/time artwork. Retain native/Django picker behaviour. */
:root {
  --ui-date-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4m10-4v4M3 11h18m-13 4h2m4 0h2m-8 3h2'/%3E%3C/svg%3E");
  --ui-clock-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --ui-native-date-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300035b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4m10-4v4M3 11h18m-13 4h2m4 0h2m-8 3h2'/%3E%3C/svg%3E");
  --ui-native-clock-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300035b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
.datetimeshortcuts .date-icon, .datetimeshortcuts .clock-icon {
  display: block; position: static; width: 20px; height: 20px; top: 0;
  background-image: none; background-color: currentColor;
  -webkit-mask: var(--ui-date-art) center / contain no-repeat;
  mask: var(--ui-date-art) center / contain no-repeat;
}
.datetimeshortcuts .clock-icon { -webkit-mask-image: var(--ui-clock-art); mask-image: var(--ui-clock-art); }
.datetimeshortcuts a:has(.date-icon, .clock-icon),
#container .datetimeshortcuts a:has(.date-icon, .clock-icon) {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-height: 44px; padding: 11px; margin: 0;
  border: 1px solid #d8dfeb; border-radius: 9px; background: #f7f9fc;
  color: #00035b; vertical-align: middle; text-decoration: none;
}
.datetimeshortcuts a:has(.date-icon, .clock-icon):hover { border-color: #8b9cbd; background: #eaf0fa; }
.datetimeshortcuts a:has(.date-icon, .clock-icon):focus-visible { outline: 2px solid #00035b; outline-offset: 3px; }

/* Replace the month-navigation sprite, not the existing date-picker logic. */
.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  top: 0; width: 44px; height: 44px; padding: 12px; border-radius: 8px;
  background: transparent; color: #00035b; font-size: 0; text-indent: 0;
}
.calendarbox .calendarnav-previous { left: 0; }
.calendarbox .calendarnav-next { right: 0; }
.calendarbox .calendarnav-previous::before, .calendarbox .calendarnav-next::before {
  content: ""; display: block; width: 20px; height: 20px; background-color: currentColor;
  --ui-chevron-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E");
  -webkit-mask: var(--ui-chevron-art) center / contain no-repeat;
  mask: var(--ui-chevron-art) center / contain no-repeat;
}
.calendarbox .calendarnav-next::before { transform: rotate(180deg); }
.calendarbox .calendar caption { box-sizing: border-box; min-height: 44px; padding: 14px 44px; line-height: 16px; }
.calendarbox :is(.calendarnav-previous, .calendarnav-next):focus-visible { outline: 2px solid #00035b; outline-offset: -3px; }

/* Browsers exposing native indicator styling use the same vector family.
   Keep the real native control, its hit area, keyboard support and validation. */
input:is([type="date"], [type="datetime-local"])::-webkit-calendar-picker-indicator {
  background-image: var(--ui-native-date-art); background-position: center; background-repeat: no-repeat;
  background-size: 20px 20px; width: 20px; height: 20px; opacity: 1; cursor: pointer;
}
input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: var(--ui-native-clock-art); background-position: center; background-repeat: no-repeat;
  background-size: 20px 20px; width: 20px; height: 20px; opacity: 1; cursor: pointer;
}
@media (forced-colors: active) {
  .datetimeshortcuts a:has(.date-icon, .clock-icon) { color: ButtonText; border-color: ButtonText; background: Canvas; }
  .calendarbox :is(.calendarnav-previous, .calendarnav-next) { color: LinkText; }
  input:is([type="date"], [type="datetime-local"], [type="time"])::-webkit-calendar-picker-indicator { background-image: revert; }
}
