/* Shared standard calendar used by Overview, Bank and Cash period controls. */
.review-popover:has(.calendar-standard) {border-color:var(--choice-outline,#0999ff);}
.calendar-standard {display:contents;}
.calendar-standard .calendar-modes {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:8px;}
.calendar-standard .calendar-modes button {padding:6px 3px;min-height:40px;font-size:.875rem;color:#526e98;background:#f4f7fb;border:1px solid transparent;}
.calendar-standard .calendar-modes [aria-pressed="true"] {background:#ff7900;color:white;}
.calendar-standard .calendar-year {justify-content:space-between;gap:8px;}
.calendar-standard-center {display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;}
.calendar-standard .calendar-year-trigger {min-width:80px;padding:5px 8px;gap:0;}
.calendar-standard .date-calendars {display:block;margin:12px 0 0;}
.calendar-standard .calendar-month h3 {display:none;}
.calendar-standard .calendar-days {gap:4px;}
.calendar-standard .calendar-days button {min-height:38px;border-radius:7px;background:#f4f7fb;}
.calendar-standard .calendar-days button.selected {color:white;background:#087cfa;}
.calendar-standard .calendar-days button.in-range {background:#dcecff;}
.calendar-standard .month-grid .selected {color:white;background:#087cfa;}
.calendar-standard .month-grid button {min-height:42px;}
.calendar-standard button:focus-visible,.calendar-standard input:focus-visible {outline:2px solid #087cfa;outline-offset:1px;}
.calendar-standard .standard-range-fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:8px;}
.standard-range-fields label {display:grid;gap:4px;color:#526e98;font-size:.875rem;}
.standard-range-fields input {min-width:0;width:100%;padding:8px;font-size:.875rem;box-sizing:border-box;}
.calendar-standard .calendar-footer .primary:disabled {opacity:.45;cursor:default;}
.calendar-standard .calendar-summary {overflow-wrap:anywhere;}
/* Keep the established organization/period geometry from filter-controls.css. */
html[data-calendar-demo="257"] #top #searchform {display:none!important;}
html[data-calendar-demo="257"] #content .calendar-standard-field {display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px;text-align:left;}
.calendar-standard-field small {font-size:.8rem;color:var(--muted);}
.calendar-standard-field > span {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.calendar-standard-field .calendar-value {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
html[data-calendar-demo="257"] #content .calendar-standard-field svg {color:#ff7900;flex:none;}

/* Owner reference: slightly wider, equal organization and calendar fields. */
@media (min-width:701px) {
  html[data-calendar-demo="257"] #content .page-context:has(.calendar-standard-field) > :is(.page-organization,.calendar-standard-field) {
    width:clamp(180px,18vw,250px);
  }
}

/* Period modes use a wider, less elongated panel. Month-only pickers keep
   their reference geometry; the host still clamps width to the viewport. */
.calendar-standard:has(.calendar-modes) .calendar-modes {margin-top:6px;}
.calendar-standard:has(.calendar-modes) .date-calendars {margin-top:8px;}
.calendar-standard:has(.calendar-modes) .calendar-days {
  grid-template-columns:repeat(7,minmax(0,1fr));
}
.calendar-standard:has(.calendar-modes) .calendar-days button {min-height:34px;}
