/* DatePickerField (Components/Shared/DatePickerField.razor, 2026-12-04) — modern date field + month calendar.
   Flat: hairlines, no shadows. Selected = the theme primary (Bolera blue / Encore navy; teal in Encore dark). */
.dp { position: relative; display: inline-block; }

.dp-trigger {
    display: inline-flex; align-items: center; gap: .5rem;
    min-height: 40px; padding: 0 .875rem 0 .75rem; border-radius: 999px;
    border: 1px solid var(--surface-border, #e2e5e9); background: var(--surface-card, #fff);
    color: var(--text-primary, #15191e); font: inherit; font-size: .875rem; font-weight: 500;
    white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s;
}
.dp-trigger > .bi-calendar3 { font-size: .9rem; color: var(--brand-primary); }
.dp-trigger .dp-caret { font-size: .7rem; color: var(--text-secondary, #5a636d); transition: transform .15s; }
.dp-trigger:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--surface-border, #e2e5e9)); }
.dp-trigger:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.dp-trigger:disabled { opacity: .5; cursor: not-allowed; }
.dp.open .dp-trigger { border-color: var(--brand-primary); }
.dp.open .dp-caret { transform: rotate(180deg); }

.dp-backdrop { position: fixed; inset: 0; z-index: 30; }
.dp-pop {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 31;
    width: 296px; max-width: calc(100vw - 32px); padding: 1rem;
    background: var(--surface-card, #fff); border: 1px solid var(--surface-border, #e2e5e9); border-radius: 16px;
    display: flex; flex-direction: column; gap: .75rem;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dp-month { font-size: .9375rem; font-weight: 600; color: var(--text-heading, #15191e); }
.dp-nav {
    width: 32px; height: 32px; border-radius: 999px; border: 0; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary, #5a636d); cursor: pointer;
}
.dp-nav:hover:not(:disabled) { background: var(--surface-muted, #f1f3f5); color: var(--text-primary, #15191e); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-nav:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 1px; }

.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.dp-dow { height: 28px; display: flex; align-items: center; justify-content: center; font-size: .6875rem; font-weight: 600; color: var(--text-secondary, #5a636d); }
.dp-day {
    height: 36px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: .8125rem;
    color: var(--text-primary, #15191e); font-variant-numeric: tabular-nums; cursor: pointer; position: relative;
}
.dp-day:hover:not(:disabled):not(.selected) { background: color-mix(in srgb, var(--brand-primary) 10%, transparent); }
.dp-day:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.dp-day.outside { color: var(--text-muted, #9aa3ad); }
.dp-day:disabled { color: var(--text-muted, #c3c8cf); opacity: .45; cursor: default; }
.dp-day.today:not(.selected) { box-shadow: inset 0 0 0 1px var(--brand-primary); font-weight: 600; }
.dp-day.selected { background: var(--brand-primary); color: #fff; font-weight: 600; }
/* week mode: one band across Monday–Sunday */
.dp.week .dp-day.selected:not(.week-start):not(.week-end) { border-radius: 0; }
.dp.week .dp-day.selected.week-start { border-radius: 999px 0 0 999px; }
.dp.week .dp-day.selected.week-end { border-radius: 0 999px 999px 0; }

.dp-foot { display: flex; justify-content: flex-end; padding-top: .5rem; border-top: 1px solid var(--surface-border, #edeff2); }
.dp-link { border: 0; background: transparent; padding: .25rem .5rem; border-radius: 999px; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--brand-primary); cursor: pointer; }
.dp-link:hover { background: color-mix(in srgb, var(--brand-primary) 10%, transparent); }

[data-theme="dark"] .dp-trigger { background: transparent; border-color: rgba(255,255,255,.18); color: #e5e7eb; }
[data-theme="dark"] .dp-pop { border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .dp-day { color: #e5e7eb; }
[data-theme="dark"] .dp-day.selected { color: #0c111c; }
[data-theme="dark"] .dp-nav:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }

@media (max-width: 767.98px) {
    .dp-trigger { min-height: 44px; }
    .dp-day { height: 40px; }
}

/* Year / month grids (YearPickerField, MonthPickerField) */
.dp-pop.narrow { width: 232px; }
.dp-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; }
.dp-cell {
    height: 40px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: .8125rem; font-weight: 500;
    color: var(--text-primary, #15191e); font-variant-numeric: tabular-nums; cursor: pointer;
}
.dp-cell:hover:not(:disabled):not(.selected) { background: color-mix(in srgb, var(--brand-primary) 10%, transparent); }
.dp-cell:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.dp-cell.today:not(.selected) { box-shadow: inset 0 0 0 1px var(--brand-primary); font-weight: 600; }
.dp-cell.selected { background: var(--brand-primary); color: #fff; font-weight: 600; }
.dp-cell:disabled { opacity: .35; cursor: default; }
[data-theme="dark"] .dp-cell { color: #e5e7eb; }
[data-theme="dark"] .dp-cell.selected { color: #0c111c; }
