.custom-date-input { cursor: pointer; }
.custom-date-input::-webkit-calendar-picker-indicator { display: none; }
.custom-date-popover {
  position: fixed;
  z-index: 10000;
  inset: auto;
  width: min(344px, calc(100vw - 24px));
  max-height: min(470px, calc(100dvh - 24px));
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid #e2dff0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 64px #25213d30, 0 4px 16px #25213d12;
  color: #2c2937;
  font: 14px/1.35 Onest, system-ui, sans-serif;
}
.custom-date-popover[hidden] { display: none !important; }
.custom-date-popover button { font: inherit; cursor: pointer; }
.custom-date-head { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 5px; margin-bottom: 13px; }
.custom-date-head > button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: #514d66; }
.custom-date-head > button:hover,.custom-date-head > button:focus-visible { background: #f2f0fa; }
.custom-date-head .custom-date-heading { gap: 6px; font-size: 16px; font-weight: 750; color: #282638; text-transform: capitalize; }
.custom-date-weekdays,.custom-date-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.custom-date-weekdays { margin-bottom: 5px; color: #9995a5; font-size: 11px; font-weight: 700; }
.custom-date-weekdays span { padding: 5px 0; }
.custom-date-days button { display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 35px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #302d39; font-weight: 600; }
.custom-date-days button.outside { color: #aba7b4; }
.custom-date-days button.today { border-color: #9a92ec; color: #5146b7; }
.custom-date-days button:hover:not(:disabled),.custom-date-days button:focus-visible { border-color: #bdb7ef; background: #f0effb; outline: 0; }
.custom-date-days button.selected,.custom-date-days button.selected:hover { border-color: #6258c8; background: #6258c8; color: #fff; box-shadow: 0 3px 9px #6258c840; }
.custom-date-days button:disabled { opacity: .3; cursor: not-allowed; }
.custom-date-year { display: flex; justify-content: center; margin: 5px 0 12px; }
.custom-date-year label { display: flex; align-items: center; gap: 8px; color: #777286; font-size: 12px; }
.custom-date-year input { width: 82px; min-height: 34px; padding: 5px 8px; border: 1px solid #e2dff0; border-radius: 8px; color: #302d39; font: inherit; }
.custom-date-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.custom-date-months button { min-height: 43px; padding: 5px; border: 1px solid #e7e5f0; border-radius: 9px; background: #fff; color: #514c65; font-size: 12px; }
.custom-date-months button:hover,.custom-date-months button:focus-visible { border-color: #bab4ed; background: #f5f3fd; }
.custom-date-months button.selected { border-color: #6258c8; background: #eeecfb; color: #5145b6; font-weight: 700; }
.custom-date-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eeecf3; }
.custom-date-foot button { min-height: 35px; padding: 5px 10px; border: 0; border-radius: 8px; background: #f3f1fc; color: #5449b8; font-size: 12px; font-weight: 700; }
.custom-date-foot button:last-child { margin-left: auto; }
.custom-date-foot button:hover:not(:disabled) { background: #e8e4fa; }
.custom-date-foot button:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 600px) {
  .custom-date-popover { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(344px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
}
