/* =====================================================================
   D3 register-services dashboard (reads from AWS, matches the RSA look).
   Chart/grid internals live in aws-stats.css; this file owns the
   page-level layout: numeric cards, pie grid, and the empty/error states.
   ===================================================================== */

.wt25_d3rs_title {
    margin: 1rem 0 0.5rem;
}

/* ---- year selector ---- */
.wt25_d3rs_year_select {
    margin: 1.25rem 0 0.5rem;
}

.wt25_d3rs_year_select label {
    font-weight: 600;
    margin-right: 0.4rem;
}

.wt25_d3rs_year_select select {
    padding: 0.35rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
}

/* dashboard wrap dims while the year-selector AJAX swap is in flight */
.wt25_d3rs_wrap.is-loading {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

/* visually hidden, still read by screen readers (the aria-live status) */
.wt25_d3rs_sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- numeric stat cards ---- */
.wt25_d3rs_cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 2.5rem;
}

.wt25_d3rs_card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1rem 1.25rem;
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wt25_d3rs_card_label {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b7280;
}

.wt25_d3rs_card_value {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    color: #3a5da3;
}

/* ---- breakdown pies, side by side ---- */
.wt25_d3rs_pies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ---- one-line stand-in for a chart with nothing to plot ---- */
.wt25_d3rs_chart_empty {
    align-self: start;
    margin: 0.75rem 0;
    padding: 0.9rem 1.1rem;
    background: #f7f9fc;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-size: 0.95rem;
}

.wt25_d3rs_chart_empty strong {
    color: #374151;
}

/* ---- footer note ---- */
.wt25_d3rs_update_note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

/* ---- empty state: no data for this parish/year ---- */
.wt25_d3rs_nodata {
    margin: 1.5rem 0;
    padding: 1.75rem 1.75rem 1.5rem;
    background: #f7f9fc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4a72c4;
    border-radius: 12px;
}

.wt25_d3rs_nodata h4 {
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    color: #1f2937;
}

.wt25_d3rs_nodata p {
    margin: 0.45rem 0;
    color: #374151;
    line-height: 1.5;
}

.wt25_d3rs_nodata a {
    color: #3a5da3;
    font-weight: 600;
}

/* ---- error state: endpoint unreachable ---- */
.wt25_d3rs_unavailable {
    padding: 1rem 1.25rem;
    border-left: 4px solid #b45309;
    background: #fffbeb;
    color: #7c2d12;
    border-radius: 8px;
}

.wt_clear {
    clear: both;
}

/* =====================================================================
   WRITE PHASE: the service entry form ([wt25_d3rs_entry_form]).
   Same visual language as the dashboard: white panels, #3a5da3 accents,
   WCAG-AA button contrast.
   ===================================================================== */

.wt25_d3rs_form_wrap {
    max-width: 860px;
    margin: 1rem auto 2rem;
}

.wt25_d3rs_form_parish {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
}

.wt25_d3rs_form_editing {
    padding: 0.6rem 0.9rem;
    background: #fffbeb;
    border-left: 4px solid #b45309;
    border-radius: 8px;
}

.wt25_d3rs_entry_form .wt25_d3rs_row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wt25_d3rs_entry_form .wt25_d3rs_row .wt25_d3rs_field {
    flex: 1 1 260px;
}

.wt25_d3rs_field {
    margin: 0 0 1.1rem;
}

.wt25_d3rs_field label,
.wt25_d3rs_checkgroup legend,
.wt25_d3rs_radios legend,
.wt25_d3rs_people legend {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.wt25_d3rs_field input[type="text"],
.wt25_d3rs_field input[type="date"],
.wt25_d3rs_field input[type="time"],
.wt25_d3rs_field input[type="number"],
.wt25_d3rs_field textarea,
.wt25_d3rs_filter,
.wt25_d3rs_other_wrap input[type="text"],
.wt25_d3rs_person_row input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #6b7280;
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
}

.wt25_d3rs_hint {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.wt25_d3rs_req {
    color: #a02818;
}

/* the "already recorded on this date" advisory */
.wt25_d3rs_day_advice {
    margin: -0.25rem 0 1.1rem;
    padding: 0.75rem 1rem;
    background: #f0f6ff;
    border: 1px solid #bfd3f2;
    border-left: 4px solid #3a5da3;
    border-radius: 8px;
    font-size: 0.92rem;
}

.wt25_d3rs_day_advice p {
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.wt25_d3rs_day_advice ul {
    margin: 0;
    padding-left: 1.2rem;
}

/* The advisory region lives in the DOM at all times (so its aria-live updates are
   announced), but must be INVISIBLE when empty. Collapse its box via :empty rather than
   display:none — display:none would pull it out of the accessibility tree, reintroducing the
   very "mutated while not rendered, so never announced" bug this is meant to avoid. */
.wt25_d3rs_day_advice:empty {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

/* Required-field key ("* indicates a required field"). */
.wt25_d3rs_req_key {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: #4b5563;
}

/* Screen-reader-only: present in the accessibility tree, clipped from the visual layout.
   Used for the option-filter result count (a live status with no visible counterpart). */
.tec25-sr-only,
.wt25_d3rs_filter_status {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The outcome panel is focused after a POST re-render (tabindex=-1); keep a subtle ring. */
.wt25_d3rs_form_result:focus,
.wt25_d3rs_form_error:focus {
    outline: 3px solid #1f2937;
    outline-offset: 2px;
}

/* the three vocab checkbox columns */
.wt25_d3rs_checkgroups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.wt25_d3rs_checkgroup {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    min-width: 0;
}

.wt25_d3rs_checklist {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 0.6rem;
}

.wt25_d3rs_check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.2rem 0.1rem;
    font-weight: 400;
}

.wt25_d3rs_check input {
    margin-top: 0.2rem;
}

.wt25_d3rs_other_wrap {
    margin-top: 0.6rem;
}

.wt25_d3rs_other_wrap label span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.wt25_d3rs_radios {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    margin-bottom: 1.1rem;
}

.wt25_d3rs_radios label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.15rem 1.25rem 0.15rem 0;
    font-weight: 400;
}

.wt25_d3rs_numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}

.wt25_d3rs_people {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    margin-bottom: 1.1rem;
}

.wt25_d3rs_person_row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.wt25_d3rs_person_row label {
    flex: 1 1 220px;
    font-weight: 400;
}

.wt25_d3rs_person_row label span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* buttons — inline-safe colors, AA contrast on white text */
.wt25_d3rs_btn {
    display: inline-block;
    background: #6b7280;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.wt25_d3rs_btn:hover,
.wt25_d3rs_btn:focus {
    /* DARKEN on hover/focus, don't brighten: brightness(1.12) lightened the #6b7280 fill
       under the white text to ~3.97:1, below the 4.5:1 AA minimum (WCAG 1.4.3) in the
       persistent focus state. A darker grey keeps the text contrast climbing, not falling. */
    background: #565d68;
    color: #fff;
}

.wt25_d3rs_btn_primary {
    background: #3a5da3;
    padding: 0.8rem 1.9rem;
    font-size: 1rem;
}

.wt25_d3rs_btn_danger {
    background: #a02818;
}

.wt25_d3rs_delete_form {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed #d1d5db;
}

/* submit outcome panels (saved / pending / duplicate confirm / error) */
.wt25_d3rs_form_result {
    max-width: 860px;
    margin: 1.25rem auto;
    padding: 1.5rem 1.75rem;
    background: #f7f9fc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4a72c4;
    border-radius: 12px;
}

/* Refusal / validation banner shown above a pre-filled form on error_refill. */
.wt25_d3rs_form_error {
    max-width: 860px;
    margin: 1.25rem auto 0;
    padding: 0.85rem 1.1rem;
    background: #fbeaea;
    border: 1px solid #d98c8c;
    border-left: 4px solid #b42318;
    border-radius: 10px;
    color: #7a1c14;
}

.wt25_d3rs_form_error p {
    margin: 0;
    font-weight: 600;
}

.wt25_d3rs_form_result h3 {
    margin-top: 0;
}

.wt25_d3rs_dup_list {
    padding-left: 1.2rem;
}

.wt25_d3rs_dup_list li {
    margin: 0.3rem 0;
}

.wt25_d3rs_dup_form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

/* ---- form polish pass (v1.3.0 dev feedback): brand accents + softer chrome ---- */
.wt25_d3rs_entry_form input[type="checkbox"],
.wt25_d3rs_entry_form input[type="radio"] {
    accent-color: #3a5da3;
    width: 1.05rem;
    height: 1.05rem;
}

.wt25_d3rs_form_parish {
    padding: 0.9rem 1.1rem;
    background: #f7f9fc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4a72c4;
    border-radius: 12px;
}

.wt25_d3rs_checkgroup legend,
.wt25_d3rs_radios legend,
.wt25_d3rs_people legend {
    color: #3a5da3;
    font-size: 1.02rem;
    padding: 0 0.35rem;
}

.wt25_d3rs_field input[type="text"],
.wt25_d3rs_field input[type="date"],
.wt25_d3rs_field input[type="time"],
.wt25_d3rs_field input[type="number"],
.wt25_d3rs_field textarea,
.wt25_d3rs_filter,
.wt25_d3rs_other_wrap input[type="text"],
.wt25_d3rs_person_row input[type="text"] {
    /* #6b7280 = 4.83:1 against the white field/page, clearing WCAG 1.4.11 (3:1 for UI
       component boundaries). An earlier 'polish' softened this to #d1d5db (1.47:1), which
       left low-vision users unable to see where the fields were. */
    border-color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wt25_d3rs_entry_form input:focus,
.wt25_d3rs_entry_form textarea:focus {
    outline: 2px solid #3a5da3;
    outline-offset: 1px;
    border-color: #3a5da3;
}

.wt25_d3rs_check:hover {
    background: #f0f6ff;
    border-radius: 6px;
}

.wt25_d3rs_entry_form .wt25_d3rs_btn_primary {
    width: 100%;
    margin-top: 0.5rem;
}

/* ---- accessibility + conditional-field pass (v1.3.0 dev feedback, 2026-07-11) ---- */

/* the [hidden] attribute must always win — our display:flex/grid on these classes
   was overriding the UA's [hidden]{display:none}, which broke the option filters
   and the conditional fields */
.wt25_d3rs_check[hidden],
.wt25_d3rs_field[hidden],
.wt25_d3rs_day_advice[hidden],
.wt25_d3rs_other_wrap[hidden] {
    display: none !important;
}

/* anchor-styled buttons: theme link colors were washing the text below AA contrast */
a.wt25_d3rs_btn,
a.wt25_d3rs_btn:visited,
a.wt25_d3rs_btn:hover,
a.wt25_d3rs_btn:active {
    color: #fff !important;
    text-decoration: none !important;
}

/* keyboard users get a visible focus ring on every control */
.wt25_d3rs_btn:focus-visible,
.wt25_d3rs_check input:focus-visible,
.wt25_d3rs_radios input:focus-visible {
    outline: 3px solid #1f2937;
    outline-offset: 2px;
}

/* Anchors need a real focus RING, not just an underline (WCAG 2.4.7). The zero-touch menu
   links are injected into the Breakdance header, where themes routinely set
   a:focus{outline:none} — the !important reclaims a visible indicator for keyboard users. */
a.wt25_d3rs_btn:focus-visible,
.wt25_d3rs_blank_link:focus-visible,
.wt25_d3rs_prefill_list a:focus-visible,
.wt25-d3rs-menu-toggle:focus-visible,
.wt25-d3rs-menu-panel a:focus-visible {
    outline: 3px solid #1f2937 !important;
    outline-offset: 2px !important;
}

/* duplicate-confirm actions: two buttons + the blank-form escape hatch */
.wt25_d3rs_dup_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.wt25_d3rs_dup_actions .wt25_d3rs_dup_form {
    margin: 0;
}

.wt25_d3rs_blank_link {
    color: #3a5da3;
    font-weight: 600;
}

/* ---- prefill menu panel ([wt25_d3rs_prefill_links], RSA-parity menu dropdown) ---- */
.wt25_d3rs_prefill_menu h4 {
    margin: 0.75rem 0 0.35rem;
    font-size: 1rem;
    color: #1f2937;
}

.wt25_d3rs_prefill_menu h4:first-child {
    margin-top: 0;
}

.wt25_d3rs_prefill_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wt25_d3rs_prefill_list li {
    margin: 0.3rem 0;
}

.wt25_d3rs_prefill_list a {
    color: #3a5da3;
    font-weight: 600;
    text-decoration: none;
}

.wt25_d3rs_prefill_list a:hover,
.wt25_d3rs_prefill_list a:focus {
    text-decoration: underline;
}

.wt25_d3rs_prefill_none {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* ---- zero-touch header dropdown (menu-inject.js) ---- */
.wt25-d3rs-menu-item {
    position: relative;
}

.wt25-d3rs-menu-toggle {
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.wt25-d3rs-menu-toggle::after {
    content: "\25BE";
    margin-left: 0.35rem;
    font-size: 0.8em;
}

.wt25-d3rs-menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9999;
    min-width: 300px;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
    text-align: left;
}

.wt25-d3rs-menu-panel[hidden] {
    display: none !important;
}

.wt25-d3rs-menu-panel h4 {
    margin: 0.85rem 0 0.35rem;
    font-size: 0.95rem;
    color: #1f2937;
    text-transform: none;
}

.wt25-d3rs-menu-panel h4:first-child {
    margin-top: 0;
}

.wt25-d3rs-menu-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wt25-d3rs-menu-panel li {
    margin: 0.3rem 0;
}

.wt25-d3rs-menu-panel a {
    color: #3a5da3 !important;
    font-weight: 600;
    text-decoration: none;
    text-transform: none;
    font-size: 0.95rem;
}

.wt25-d3rs-menu-panel a:hover,
.wt25-d3rs-menu-panel a:focus {
    text-decoration: underline;
}

.wt25-d3rs-menu-toggle:focus-visible {
    outline: 3px solid #1f2937;
    outline-offset: 2px;
}

/* collapsed (mobile) menus: render in flow instead of floating */
@media (max-width: 1023px) {
    .wt25-d3rs-menu-panel {
        position: static;
        box-shadow: none;
        border: 0;
        padding: 0.5rem 0 0.5rem 1rem;
        min-width: 0;
    }
}

/* ---- quick-prefill bar above the form ---- */
.wt25_d3rs_prefill_bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 0 0 1.1rem;
    padding: 0.75rem 1rem;
    background: #f0f6ff;
    border: 1px solid #bfd3f2;
    border-radius: 10px;
}

.wt25_d3rs_prefill_bar label {
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.wt25_d3rs_prefill_select {
    flex: 1 1 260px;
    max-width: 420px;
    padding: 0.5rem 0.7rem;
    border: 1px solid #6b7280;
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
}

.wt25_d3rs_prefill_select:focus-visible {
    outline: 3px solid #1f2937;
    outline-offset: 2px;
}
