/* Shared pickers (wwwroot/js/pickers.js): the jurisdiction search picker, the date field with its calendar and the time
   field. They follow AccessPoint's own controls — the demo bar's jurisdiction picker (search box, region filter, grouped
   list) and the product's date field (a text box with a compact calendar) — so the site's tools feel like the product.
   Popups are appended to <body> and placed under their field, so no card or sheet can clip them. */

.rz-jp, .rz-dp, .rz-tp { position: relative; font: inherit; }
.rz-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Field look, shared ─────────────────────────────────────────────────── */
.rz-jp-trigger, .rz-dp-text, .rz-tp-text {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 8px 38px 8px 12px;
    border: 1px solid #8A94A6;
    border-radius: 4px;
    background: #fff;
    color: #1A2332;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
}
.rz-jp-trigger { display: flex; align-items: center; cursor: pointer; position: relative; }
.rz-jp-trigger:hover, .rz-jp-trigger.is-open, .rz-dp-text:hover, .rz-tp-text:hover { border-color: #0074C4; }
.rz-jp-trigger:focus-visible, .rz-dp-text:focus, .rz-tp-text:focus { border-color: #0074C4; outline: 2px solid #0074C4; outline-offset: -1px; }
.rz-jp-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-jp-trigger.is-placeholder .rz-jp-value { color: #5A6577; font-weight: 400; }
.rz-jp-chevron { position: absolute; right: 13px; top: 50%; margin-top: -5px; color: #5A6577; pointer-events: none; }
.rz-jp-leading { flex: none; margin-right: 8px; color: #5A6577; }

/* Chosen laws (multi-select) */
.rz-jp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rz-jp-chips:empty { display: none; }
.rz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 0; border-radius: 999px; background: #1A2332; color: #fff; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.rz-chip:hover { background: #005A9C; }
.rz-chip:focus-visible { outline: 2px solid #0074C4; outline-offset: 2px; }
.rz-chip svg { flex: none; opacity: 0.85; }

/* ── Popups ─────────────────────────────────────────────────────────────── */
.rz-pop {
    font-variant-ligatures: no-common-ligatures no-contextual; /* "(c)" in an Act's name stays "(c)" */
    position: fixed;
    z-index: 1200;
    box-sizing: border-box;
    background: #fff;
    color: #1A2332;
    border: 1px solid #C2C9D3;
    border-radius: 6px;
    box-shadow: 0 12px 32px -8px rgba(13, 19, 32, 0.28), 0 2px 8px rgba(13, 19, 32, 0.1);
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    overflow: hidden;
}
.rz-pop *, .rz-pop *::before, .rz-pop *::after { box-sizing: border-box; }
.rz-pop button { font: inherit; }

/* Jurisdiction list */
.rz-jp-pop { display: flex; flex-direction: column; }
.rz-jp-search { position: relative; margin: 12px 12px 8px; }
.rz-jp-search svg { position: absolute; left: 10px; top: 50%; margin-top: -7px; color: #5A6577; pointer-events: none; }
.rz-jp-search input { width: 100%; height: 36px; padding: 0 10px 0 32px; border: 1px solid #8A94A6; border-radius: 4px; background: #fff; color: #1A2332; font: inherit; }
.rz-jp-search input::placeholder { color: #5A6577; }
.rz-jp-search input:focus { border-color: #0074C4; outline: 2px solid #0074C4; outline-offset: -1px; }
.rz-jp-regions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; border-bottom: 1px solid #E1E5EB; }
.rz-jp-region { padding: 3px 10px; border: 1px solid #C2C9D3; border-radius: 14px; background: #fff; color: #1A2332; font-size: 12px; line-height: 18px; white-space: nowrap; cursor: pointer; }
.rz-jp-region:hover { border-color: #0074C4; }
.rz-jp-region.is-checked { background: #0074C4; border-color: #0074C4; color: #fff; font-weight: 600; }
.rz-jp-region:focus-visible, .rz-jp-everywhere:focus-visible, .rz-jp-done:focus-visible { outline: 2px solid #0074C4; outline-offset: 2px; }
.rz-jp-list { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 8px; }
.rz-jp-group { padding: 10px 12px 2px; font-size: 12px; font-weight: 600; color: #5A6577; }
.rz-jp-option { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 20px; line-height: 20px; cursor: pointer; }
.rz-jp-option.is-active { background: #E8F4FD; box-shadow: inset 3px 0 0 #0074C4; }
.rz-jp-option.is-selected .rz-jp-option-name { font-weight: 700; }
.rz-jp-option-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rz-jp-option-meta { font-size: 12px; line-height: 16px; color: #5A6577; }
.rz-jp-check { flex: none; color: #0074C4; }
.rz-jp-box { flex: none; width: 16px; height: 16px; border: 1.5px solid #8A94A6; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.rz-jp-option.is-selected .rz-jp-box { background: #0074C4; border-color: #0074C4; }
.rz-jp-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; color: #3B4555; }
.rz-jp-everywhere { padding: 4px 10px; border: 1px solid #0074C4; border-radius: 4px; background: #fff; color: #005A9C; cursor: pointer; }
.rz-jp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid #E1E5EB; font-size: 13px; color: #3B4555; }
.rz-jp-done { padding: 5px 14px; border: 1px solid #0074C4; border-radius: 4px; background: #0074C4; color: #fff; font-weight: 600; cursor: pointer; }
.rz-jp-done:hover { background: #005A9C; border-color: #005A9C; }

/* ── Date field ─────────────────────────────────────────────────────────── */
.rz-dp-btn, .rz-tp-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 38px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0 3px 3px 0; background: transparent; color: #5A6577; cursor: pointer; }
.rz-dp-btn:hover, .rz-tp-btn:hover { color: #0074C4; background: #F3F6F9; }
.rz-dp-error { margin: 5px 0 0; font-size: 13px; color: #A4262C; }

.rz-dp-pop { width: 268px; padding: 12px; }
.rz-dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rz-dp-title { padding: 4px 8px; margin-left: -4px; border: 0; border-radius: 4px; background: transparent; color: #1A2332; font-size: 14px; font-weight: 600; cursor: pointer; }
.rz-dp-title:hover { background: #F3F6F9; }
.rz-dp-nav { display: flex; gap: 2px; }
.rz-dp-nav button { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: transparent; color: #3B4555; cursor: pointer; }
.rz-dp-nav button:hover { background: #F3F6F9; }
.rz-dp-pop button:focus-visible { outline: 2px solid #0074C4; outline-offset: 1px; }
.rz-dp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rz-dp-grid th { padding: 0; height: 28px; font-size: 12px; font-weight: 400; color: #5A6577; text-align: center; border: 0; background: none; }
.rz-dp-grid td { padding: 0; text-align: center; border: 0; background: none; }
.rz-dp-day { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #1A2332; font-size: 13px; cursor: pointer; }
.rz-dp-day:hover { background: #F3F6F9; }
.rz-dp-day.is-outside { color: #8A94A6; }
.rz-dp-day.is-today { background: #0074C4; color: #fff; border-radius: 50%; font-weight: 600; }
.rz-dp-day.is-selected { background: #E8F4FD; box-shadow: inset 0 0 0 1.5px #0074C4; color: #1A2332; font-weight: 600; }
.rz-dp-day.is-selected.is-today { background: #0074C4; color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #0074C4; }
.rz-dp-day[aria-disabled="true"] { color: #C2C9D3; cursor: default; background: transparent; }
.rz-dp-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 0; }
.rz-dp-month { height: 44px; border: 0; border-radius: 3px; background: transparent; color: #1A2332; font-size: 13px; cursor: pointer; }
.rz-dp-month:hover { background: #F3F6F9; }
.rz-dp-month.is-current { background: #0074C4; color: #fff; font-weight: 600; }
.rz-dp-month.is-selected:not(.is-current) { box-shadow: inset 0 0 0 1.5px #0074C4; background: #E8F4FD; }
.rz-dp-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.rz-dp-today { padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: #005A9C; font-size: 12.5px; cursor: pointer; }
.rz-dp-today:hover { color: #1A2332; background: #F3F6F9; }

/* ── Time field ─────────────────────────────────────────────────────────── */
.rz-tp-pop { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
.rz-tp-option { padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.rz-tp-option.is-active { background: #E8F4FD; box-shadow: inset 3px 0 0 #0074C4; }
.rz-tp-option.is-selected { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
    .rz-pop { animation: rz-pop-in 0.09s ease-out; }
    @keyframes rz-pop-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
}
@media (forced-colors: active) {
    .rz-jp-option.is-active, .rz-tp-option.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
    .rz-jp-region.is-checked, .rz-dp-day.is-today, .rz-dp-day.is-selected { outline: 2px solid Highlight; }
}
@media print { .rz-pop { display: none !important; } }
