/* pa-range.css · the period calendar (30 Nov 2026, Mikky: "this is not our calendar style").
   Ported from Support: 2026-11-11-support-redesign/08-build/dashboard-calendar.css. Same rail, months, band, day circles and footer.
   The shell (.pp), its motion and the phone sheet stay the Creators kit's (kit/period.css). Screen only. */
.pp.rcal { --rcal-cap: 16px; width: max-content; padding: 0; overflow: auto; }
.rcal__f { display: flex; flex-direction: column; margin: 0; min-height: 0; }
.rcal__body { display: grid; grid-template-columns: 164px auto; }
.rcal--only .rcal__body { grid-template-columns: 220px; }
.rcal svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Quick ranges: the Lilac menu rows (picked row tinted, with a tick) */
.rcal__rail { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2); border-right: 1px solid var(--color-border-subtle); }
.rcal--only .rcal__rail { border-right: 0; }
.rcal .rcal__q { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-size: var(--row); color: var(--color-text-primary); text-align: left; white-space: nowrap; }
.rcal__q > span:first-child { flex: 1; }
.rcal .rcal__q[aria-pressed="true"] { background: var(--color-bg-brand); color: var(--color-text-accent); font-weight: var(--font-weight-semibold); }
.rcal__q .fck { display: grid; place-items: center; width: 16px; opacity: 0; }
.rcal__q .fck svg { width: 14px; height: 14px; stroke-width: 2.25; }
.rcal__q[aria-pressed="true"] .fck { opacity: 1; }
.rcal__hr { flex: none; height: 1px; margin: 5px var(--space-2); background: var(--color-border-subtle); }
.rcal--only .rcal__hr { display: none; }
.rcal__only { margin: 0; max-width: 220px; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border-subtle); font-size: var(--font-size-12); color: var(--color-text-tertiary); }

.rcal__main { padding: var(--space-3) var(--space-4); }

/* Months */
.rcal__cal { position: relative; }
.rcal__nav { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.rcal .rcal__nb { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--color-text-secondary); pointer-events: auto; }
.rcal .rcal__nb[aria-disabled="true"] { color: var(--color-text-disabled); cursor: default; }
.rcal__ms { position: relative; overflow: hidden; }
.rcal__mw { display: flex; gap: var(--space-6); }
.rcal__ghost { position: absolute; inset: 0 auto auto 0; width: 100%; pointer-events: none; }
.rcal__m { width: 252px; flex: none; }
.rcal__t { display: flex; align-items: center; justify-content: center; height: 32px; margin: 0; font-size: var(--row); font-weight: var(--font-weight-semibold); }
.rcal .rcal__tb { height: 28px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-weight: inherit; }
.rcal__g { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
.rcal__g th { height: 28px; padding: 0; font-size: var(--font-size-11); font-weight: var(--font-weight-medium); color: var(--color-text-tertiary); text-align: center; }
.rcal__g td { position: relative; height: 36px; padding: 0; text-align: center; font-variant-numeric: tabular-nums; }

/* The band: one strip per day, joined; caps round off at the week's and the month's edges */
.rcal__g td::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: -.5px; right: -.5px; background: var(--color-lilac-100); opacity: 0; pointer-events: none; }
.rcal__g td.in::before { opacity: 1; }
.rcal__g td.s::before { left: 50%; }
.rcal__g td.e::before { right: 50%; }
.rcal__g td.s.e::before { opacity: 0; }
.rcal__g td.in:is(:first-child, .is-mf):not(.s)::before { left: 2px; border-top-left-radius: var(--rcal-cap); border-bottom-left-radius: var(--rcal-cap); }
.rcal__g td.in:is(:last-child, .is-ml):not(.e)::before { right: 2px; border-top-right-radius: var(--rcal-cap); border-bottom-right-radius: var(--rcal-cap); }
.rcal.is-pv .rcal__g td.in::before { opacity: .55; }
.rcal .rcal__g td.in.s:is(:last-child, .is-ml)::before, .rcal .rcal__g td.in.e:is(:first-child, .is-mf)::before { opacity: 0; }

/* A day: the whole cell is the button; the circle is drawn inside it */
.rcal .cd { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; font-size: var(--row); color: var(--color-text-primary); }
.cd::after { content: ""; position: absolute; inset: 2px; z-index: -1; margin: auto; width: 32px; height: 32px; border-radius: 50%; }
.rcal .cd:focus-visible { outline: none; }
.rcal .cd:focus-visible::after { box-shadow: 0 0 0 2px var(--color-bg-canvas), 0 0 0 calc(2px + var(--focus-ring-width)) var(--focus-ring-color); }
.rcal .cd:disabled { color: var(--color-text-disabled); cursor: default; }
td.is-today .cd { font-weight: var(--font-weight-semibold); }
td.is-today .cd::before { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--color-text-accent); }
.rcal td:is(.s, .e) .cd { color: var(--color-text-on-accent); font-weight: var(--font-weight-semibold); }
.rcal td:is(.s, .e) .cd::after, .rcal td:is(.s, .e) .cd:hover::after { background: var(--color-bg-brand-strong); }
td:is(.s, .e).is-today .cd::before { background: var(--color-text-on-accent); }
.rcal.is-pv td.e:not(.s) .cd { color: var(--color-text-accent); }
.rcal.is-pv td.e:not(.s) .cd::after { background: var(--color-bg-canvas); box-shadow: inset 0 0 0 1.5px var(--color-bg-brand-strong); }

/* Whole campaigns, under the months (partner and campaign pages) */
.rcal__fl { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 2px; margin: var(--space-2) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--color-border-subtle); }
.rcal .rcal__flb { display: grid; gap: 1px; padding: 6px var(--space-2); border-radius: var(--radius-xs); text-align: left; min-width: 0; }
.rcal__flb b { font-size: var(--row); font-weight: var(--font-weight-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcal__flb span { font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rcal .rcal__flb[aria-pressed="true"] { background: var(--color-bg-brand); }
.rcal__flb[aria-pressed="true"] b { color: var(--color-text-accent); font-weight: var(--font-weight-semibold); }

/* Footer: the range in words, then Cancel and Apply */
.rcal__ft { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); border-top: 1px solid var(--color-border-subtle); }
.rcal__sum, .rcal__sum { font-weight: var(--font-weight-medium); font-variant-numeric: tabular-nums; }
.rcal__sum span { font-weight: var(--font-weight-regular); color: var(--color-text-tertiary); }
.rcal__sum em { display: block; font-style: normal; font-size: var(--font-size-12); font-weight: var(--font-weight-regular); color: var(--color-text-tertiary); }
.rcal .rcal__sum .pa-lnkb { color: var(--color-text-accent); }
.rcal .rcal__ft .b { flex: none; height: 34px; padding: 0 14px; border: 1px solid transparent; font-size: var(--row); font-weight: var(--font-weight-medium); }
.rcal .rcal__ft .b--primary { background: var(--color-action-primary-bg); color: var(--color-action-primary-text); }
.rcal .rcal__ft .b--primary:disabled { background: var(--color-action-primary-bg-disabled); color: var(--color-action-primary-text-disabled); }

.rcal :is(.rcal__q, .rcal__nb, .rcal__tb, .rcal__flb, .pa-lnkb):focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
    .rcal .cd:not(:disabled):hover::after { background: var(--color-bg-surface-raised); }
  .rcal td.in:not(.s, .e) .cd:hover::after { background: var(--color-lilac-200); }
  .rcal .rcal__ft .b--primary:not(:disabled):hover { background: var(--color-action-primary-bg-hover); }
}

/* Small (30 Nov, Mikky: "too big"): 12px, 28px days, one month, about 370px wide */
.rcal:not(.rcal--sheet) { --rcal-cap: 13px; }
.rcal:not(.rcal--sheet) .rcal__body { grid-template-columns: 128px 248px; }
.rcal--only:not(.rcal--sheet) .rcal__body { grid-template-columns: 220px; }
.rcal:not(.rcal--sheet) .rcal__rail { gap: 0; padding: 6px; }
.rcal:not(.rcal--sheet) .rcal__q { height: 26px; font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__q .fck, .rcal:not(.rcal--sheet) .rcal__q .fck svg { width: 12px; height: 12px; }
.rcal:not(.rcal--sheet) .rcal__hr { margin: 4px var(--space-2); }
.rcal:not(.rcal--sheet) .rcal__main { display: flex; flex-direction: column; padding: 6px 0 0; }
.rcal:not(.rcal--sheet) .rcal__cal { padding: 0 10px 6px; }
.rcal:not(.rcal--sheet) .rcal__nav { inset: 0 10px auto; }
.rcal:not(.rcal--sheet) .rcal__nb { width: 26px; height: 26px; }
.rcal:not(.rcal--sheet) .rcal__nb svg { width: 14px; height: 14px; }
.rcal:not(.rcal--sheet) .rcal__m { width: 228px; }
.rcal:not(.rcal--sheet) .rcal__t { height: 26px; font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__tb { height: 22px; }
.rcal:not(.rcal--sheet) .rcal__g th { height: 24px; }
.rcal:not(.rcal--sheet) .rcal__g td { height: 28px; }
.rcal:not(.rcal--sheet) .rcal__g td::before { top: 1px; bottom: 1px; }
.rcal:not(.rcal--sheet) .cd { font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .cd::after { inset: 1px; width: 26px; height: 26px; }
.rcal:not(.rcal--sheet) td.is-today .cd::before { bottom: 3px; width: 3px; height: 3px; margin-left: -1.5px; }
.rcal:not(.rcal--sheet) .rcal__fl { grid-template-columns: 1fr; gap: 0; margin: 0; padding: 4px 6px 6px; }
.rcal:not(.rcal--sheet) .rcal__flb { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); height: 26px; padding: 0 var(--space-2); }
.rcal:not(.rcal--sheet) .rcal__flb b { font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__flb span { font-size: var(--font-size-11); overflow: hidden; text-overflow: ellipsis; }
.rcal:not(.rcal--sheet) .rcal__cmp { min-height: 36px; margin-top: auto; padding: 0 6px 0 14px; font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__cmpb { height: 26px; font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__ft { min-height: 40px; padding: 6px 8px 6px 14px; }
.rcal:not(.rcal--sheet) .rcal__sum { font-size: var(--font-size-12); line-height: 16px; }
.rcal:not(.rcal--sheet) .rcal__ft .b { height: 28px; padding: 0 12px; font-size: var(--font-size-12); }
.rcal:not(.rcal--sheet) .rcal__sum em { font-size: var(--font-size-11); }
.rcal__ft[hidden] { display: none; }
.rcal__sum { flex: 1; min-width: 0; }

/* Phone sheet: one month, 44px days, quick ranges in two columns (nothing scrolls sideways), Apply always in reach */
.pp.pp--sheet.rcal { --rcal-cap: 20px; width: auto; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.rcal--sheet .pp__head { flex: none; margin: 0; padding: var(--space-2) var(--space-4) var(--space-3); border-bottom: 1px solid var(--color-border-subtle); }
.rcal--sheet .rcal__f { flex: 1; }
.rcal--sheet .rcal__body { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.rcal--sheet .rcal__body::-webkit-scrollbar { display: none; }
.rcal--sheet .rcal__rail { order: 2; display: grid; grid-template-columns: 1fr 1fr; padding: var(--space-2) var(--space-2) var(--space-3); border-right: 0; border-top: 1px solid var(--color-border-subtle); }
.rcal--sheet .rcal__hr { display: none; }
.rcal.rcal--sheet .rcal__q { height: 44px; }
.rcal--sheet .rcal__m { width: 100%; }
.rcal--sheet .rcal__t { height: 44px; font-size: var(--font-size-16); }
.rcal.rcal--sheet .rcal__nb { width: 44px; height: 44px; }
.rcal.rcal--sheet .rcal__tb { height: 44px; }
.rcal--sheet .rcal__g td { height: 44px; }
.rcal.rcal--sheet .cd { font-size: var(--font-size-14); }
.rcal--sheet .cd::after { width: 40px; height: 40px; }
.rcal--sheet td.is-today .cd::before { bottom: 6px; }
.rcal--sheet .rcal__fl { grid-template-columns: 1fr 1fr; }
.rcal--sheet .rcal__only { max-width: none; }
.rcal--sheet .rcal__ft { flex-wrap: wrap; flex: none; padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); }
.rcal.rcal--sheet .rcal__ft .b { flex: 1; height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  .rcal__g td::before { transition: opacity var(--motion-duration-fast) var(--motion-easing-out); }
  .rcal .cd, .rcal .cd::after, .rcal__q, .rcal__nb, .rcal__flb { transition: background-color var(--motion-duration-fast) var(--motion-easing-out), color var(--motion-duration-fast) var(--motion-easing-out), border-color var(--motion-duration-fast) var(--motion-easing-out); }
}

/* Compare with: inside the calendar, one row above the footer */
.rcal__cmp { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-3) 0 var(--space-4); border-top: 1px solid var(--color-border-subtle); font-size: var(--row); }

.rcal__cmp > span { white-space: nowrap; color: var(--color-text-secondary); }
.rcal__fl p { grid-column: 1 / -1; margin: 0; padding: 0 var(--space-2); font-size: var(--font-size-11); line-height: 20px; color: var(--color-text-tertiary); }

/* One control row: Filters, period, Export. The line below says the dates, what changes are against, and any filter that is on */
body:not(.rp-body) .pa-ph__line .pa-ph__m { display: inline; }
body:not(.rp-body) .pa-ph > .acts .pa-fbtn { order: -1; }
body:not(.rp-body) .pa-fb__end { flex-wrap: wrap; }
body:not(.rp-body) .pa-fb__end:empty { display: none; }

/* Filters: Support's button and panel (dashboard.css .fbtn / .fpop, dashboard-toolbars.css .tbpanel) */
.pa-fbtn { gap: 6px; }
.pa-fbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; color: var(--color-text-secondary); }
.pa-fbtn[aria-expanded="true"] { background: var(--color-bg-surface); }
.pa-fbtn.is-on, .pa-fbtn.is-on:hover { background: var(--color-bg-brand); border-color: transparent; color: var(--color-text-accent); }
.pa-fbtn.is-on svg { color: inherit; }
.pa-fbtn b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--color-text-accent); color: var(--color-text-on-accent); font-size: var(--font-size-11); font-weight: var(--font-weight-semibold); }
@container page (max-width: 640px) {
  body:not(.rp-body) .pa-ph > .acts .pa-fbtn { flex: 0 0 auto; }
  body:not(.rp-body) .pa-ph > .acts .pt__t { min-width: 0; overflow: hidden; }
  body:not(.rp-body) .pa-ph > .acts .pt__range { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 480px) {
  body:not(.rp-body) .pa-ph > .acts .pa-fbtn { min-width: 36px; padding: 0 10px; }
  .pa-fbtn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.rcal .rcal__cmpb { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-size: var(--row); }
.rcal__cmpb b { font-weight: var(--font-weight-medium); }
.rcal .rcal__cmpb svg { width: 14px; height: 14px; stroke-width: 1; color: var(--color-text-tertiary); }
.rcal .rcal__cmpb:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -2px; }
.rcal .rcal__cmpb[aria-expanded="true"] { background: var(--color-bg-surface); }
@media (hover: hover) and (pointer: fine) { .rcal .rcal__cmpb:hover { background: var(--color-bg-surface); } }
.rcal--sheet .rcal__cmp { margin: var(--space-2) calc(-1 * var(--space-4)) 0; }
.rcal.rcal--sheet .rcal__cmpb { height: 44px; }
