﻿/* Shared collapsible form sections. */
.section-hdr {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
    color: white;
    padding: .5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    gap: 8px;
    min-width: 0;
}

.section-hdr:hover {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
}

.section-hdr:focus-visible {
    outline: 3px solid #fef3c7;
    outline-offset: 3px;
}

.sec-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #DCFCE7;
    color: #166534;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
}

.sec-badge--required {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.section-body {
    transition: max-height 0.35s ease, opacity 0.3s ease;
    overflow: hidden;
}

.section-body.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

.section-body:not(.collapsed) {
    overflow: visible;
}

.chevron {
    transition: transform 0.3s ease;
}

.chevron.open {
    transform: rotate(180deg);
}

/* Shared form typography and controls. */
.form-section-title {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    color: #374151;
}

.form-option-label {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    color: #374151;
}

.form-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    cursor: pointer;
}

.form-choice-control {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: #16a34a;
}

.form-choice-control:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

.form-option:has(.form-choice-control:disabled) {
    cursor: not-allowed;
}

.form-readonly-input {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.form-body-text {
    font-size: 1rem;
    line-height: 1.5rem;
    color: #374151;
}

.form-helper-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    color: #6b7280;
}

.form-error-text {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    color: #991b1b;
}

.form-validation-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    color: #dc2626;
}

.search-mode-pill {
    border-radius: 9999px;
    padding: .4rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.search-mode-pill--specific {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.search-mode-pill--seeall {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

.search-filter-group-title {
    font-size: medium;
    font-weight: 700;
    letter-spacing: .04em; /*  text-transform: uppercase;  */
    color: #4b5563;
    margin-bottom: .35rem;
}

.search-filter-group {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    padding: .85rem;
    background: #f9fafb;
}

.portal-field-label {
    display: block;
    margin-bottom: .45rem;
    color: #374151;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
}

.portal-field-required {
    margin-left: .15rem;
    color: #ef4444;
    font-weight: 700;
}
/* Shared portal components for consistent form and button styling */
.portal-control-input,
.portal-control-select {
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    background: #fff;
    color: #111827;
    font-size: .875rem;
    line-height: 1.25rem;
    padding: .65rem .9rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .portal-control-input::placeholder {
        color: #6b7280;
    }

    .portal-control-input:focus,
    .portal-control-select:focus {
        outline: none;
        border-color: #15803d;
        box-shadow: 0 0 0 2px rgba(21, 128, 61, .2);
    }

.portal-control-input--search {
    padding-left: 2.75rem;
    padding-right: 1rem;
}

.portal-control-select--compact {
    height: 2.25rem;
    padding-top: .3rem;
    padding-bottom: .3rem;
}

.portal-control-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23374151' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 1rem 1rem;
}

    .portal-control-select::-ms-expand {
        display: none;
    }

    .portal-control-input.input-validation-error,
    .portal-control-select.input-validation-error,
    .portal-control-input.input-error,
    .portal-control-select.input-error {
        box-shadow: 0 0 0 2px #dc2626 !important;
        border-color: #dc3545 !important;
        background-color: #f5e9ea !important;
    }

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid transparent;
    border-radius: .5rem;
    padding: .5rem 1.5rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

    .portal-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px rgba(21, 128, 61, .25);
    }

.portal-btn--primary {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

    .portal-btn--primary:hover:not(:disabled):not(.is-disabled) {
        background: #166534;
        border-color: #166534;
        color: #fff;
    }

.portal-btn--primary-sec {
    background: #2563EB;
    border-color: #2563EB;
    color: #fff;
}

    .portal-btn--primary-sec:hover:not(:disabled):not(.is-disabled) {
        background: #1D4ED8;
        border-color: #1D4ED8;
        color: #fff;
    }

.portal-btn--secondary {
    background: #475569;
    border-color: #475569;
    color: #ffffff;
}

    .portal-btn--secondary:hover:not(:disabled):not(.is-disabled) {
        background: #334155;
        border-color: #334155;
        color: #fff;
    }

.portal-btn--primary-outline {
    background: #fff;
    border-color: #15803d;
    color: #15803d;
}

    .portal-btn--primary-outline:hover:not(:disabled):not(.is-disabled) {
        background: #166534;
        border-color: #166534;
        color: #fff;
    }

.portal-btn:disabled,
.portal-btn[disabled],
.portal-btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.bulk-upload-zone {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8faf9 0%, #f3f4f6 100%);
    padding: 1.25rem;
}

    .bulk-upload-zone.is-disabled {
        opacity: .72;
        background: #f3f4f6;
    }

.bulk-upload-zone__meta {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
}

.bulk-upload-zone__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    background: #ecfdf5;
    color: #15803d;
}

.bulk-upload-zone.is-disabled .bulk-upload-zone__icon {
    background: #e5e7eb;
    color: #6b7280;
}

.bulk-upload-zone__title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
}

.bulk-upload-zone__hint {
    margin: .2rem 0 0;
    font-size: .8rem;
    color: #6b7280;
}

.bulk-upload-zone__file {
    margin-top: .55rem;
    font-size: .875rem;
    font-weight: 500;
    color: #374151;
    word-break: break-word;
}

    .bulk-upload-zone__file.has-file {
        color: #166534;
    }

.bulk-upload-zone__actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

@media (min-width: 640px) {
    .bulk-upload-zone__actions {
        flex-direction: row;
        align-items: center;
    }
}

.portal-btn--neutral {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #334155;
}

    .portal-btn--neutral:hover {
        background: #cbd5e1;
        border-color: #cbd5e1;
        color: #1e293b;
    }

.portal-btn--icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    padding: 0;
}

.portal-inline-link {
    color: #1d4ed8;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

    .portal-inline-link:hover {
        text-decoration: none;
    }

.portal-card-button {
    width: 100%;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    background: #fff;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .portal-card-button:hover {
        border-color: #15803d;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
        background: #f9fff9;
    }

.portal-control-input:disabled,
.portal-control-select:disabled,
.portal-control-input[readonly],
.portal-control-select[readonly] {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed !important;
    opacity: 1;
}

.portal-control-select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%239ca3af' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ─────────────────────────────────────────────────────────────────────────────
   Floating Label Components
   Reusable floating label inputs and selects for modern form styling.

   Usage:
   <div class="floating-label-group">
       <input type="text" id="myInput" class="floating-label-input" placeholder=" " />
       <label for="myInput" class="floating-label">Label Text</label>
       <span class="floating-label-error">Error message</span>
   </div>

   For select:
   <div class="floating-label-group">
       <select id="mySelect" class="floating-label-select">...</select>
       <label for="mySelect" class="floating-label floating-label--select">Label</label>
   </div>
   ───────────────────────────────────────────────────────────────────────────── */

.floating-label-group {
    position: relative;
    width: 100%;
}

.floating-label-input,
.floating-label-select {
    display: block;
    width: 100%;
    height: 3.5rem;
    padding: 1.5rem .875rem .5rem;
    font-size: .9375rem;
    font-weight: 400;
    line-height: 1.25;
    color: #111827;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .floating-label-input::placeholder {
        color: transparent;
    }

    .floating-label-input:focus,
    .floating-label-select:focus {
        outline: none;
        border-color: #15803d;
        /*box-shadow: 0 0 0 3px rgba(21, 128, 61, .15);*/
        box-shadow: 0 0 0 2px #15803dcf;
    }

.floating-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem .875rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    color: #6b7280;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

/* Float the label when input is focused or has value */
.floating-label-input:focus ~ .floating-label,
.floating-label-input:not(:placeholder-shown) ~ .floating-label {
    /*opacity: .85;*/
    font-weight: 700;
    transform: scale(.8) translateY(-.5rem) translateX(.15rem);
    color: #374151;
}

/* For selects - always float since they always have a value displayed */
.floating-label--select {
    /*opacity: .85;*/
    font-weight: 700;
    transform: scale(.8) translateY(-.5rem) translateX(.15rem);
    color: #374151;
    /* Keep truncated text clear of the dropdown chevron */
    padding-right: 2.5rem;
}

/* Select specific styling */
.floating-label-select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23374151' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .875rem center;
    background-size: 1rem 1rem;
    cursor: pointer;
}

    .floating-label-select::-ms-expand {
        display: none;
    }

/* Date input specific - always show floated label */
.floating-label-input[type="date"] ~ .floating-label,
.floating-label-input[type="datetime-local"] ~ .floating-label,
.floating-label-input[type="time"] ~ .floating-label,
.floating-label-input[type="month"] ~ .floating-label,
.floating-label-input[type="week"] ~ .floating-label {
    opacity: .85;
    transform: scale(.8) translateY(-.5rem) translateX(.15rem);
    color: #374151;
}

/* Focused state label color */
.floating-label-input:focus ~ .floating-label,
.floating-label-select:focus ~ .floating-label {
    color: #15803d;
}

/* Error state */
.floating-label-input.input-validation-error,
.floating-label-input.input-error,
.floating-label-select.input-validation-error,
.floating-label-select.input-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px #dc2626;
    background-color: #fef2f2;
}

    .floating-label-input.input-validation-error ~ .floating-label,
    .floating-label-input.input-error ~ .floating-label,
    .floating-label-select.input-validation-error ~ .floating-label--select,
    .floating-label-select.input-error ~ .floating-label--select {
        color: #dc2626;
    }

.floating-label-error {
    display: block;
    margin-top: .25rem;
    font-size: .75rem;
    color: #dc2626;
    min-height: 1rem;
}

    .floating-label-error:empty {
        display: none;
        min-height: 0;
        margin-top: 0;
    }

/* Disabled state — align with Tailwind disabled:bg-gray-100 / disabled:text-gray-500 */
.floating-label-input:disabled,
.floating-label-select:disabled {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

    .floating-label-input:disabled ~ .floating-label,
    .floating-label-select:disabled ~ .floating-label {
        color: #6b7280;
    }

.floating-label-select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Required field indicator */
.floating-label-required::after {
    content: ' *';
    color: #dc2626;
    font-weight: 700;
}

.floating-label-group--icon .floating-label-icon {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #9ca3af;
}

.floating-label-group--icon .floating-label-input {
    padding-left: 2.75rem;
}

.floating-label-group--icon .floating-label {
    padding-left: 2.75rem;
}

/* Compact variant for tighter layouts */
.floating-label-group--compact .floating-label-input,
.floating-label-group--compact .floating-label-select {
    height: 3rem;
    padding: 1.25rem .75rem .375rem;
    font-size: .875rem;
}

.floating-label-group--compact .floating-label {
    padding: .75rem .75rem;
    font-size: .875rem;
}

.floating-label-group--compact .floating-label-input:focus ~ .floating-label,
.floating-label-group--compact .floating-label-input:not(:placeholder-shown) ~ .floating-label,
.floating-label-group--compact .floating-label--select {
    transform: scale(.75) translateY(-.4rem) translateX(.1rem);
}

.floating-label-button-group .floating-label-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Smarty Streets Address Autocomplete Dropdown
   Rendered by addressFields.js when data-addr-smarty-enabled="true".
   ───────────────────────────────────────────────────────────────────────────── */

.addr-smarty-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    overflow: hidden;
    max-height: 14rem;
    overflow-y: auto;
}

    .addr-smarty-suggestions:empty {
        display: none;
    }

.addr-smarty-suggestion {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem .875rem;
    font-size: .875rem;
    color: #111827;
    cursor: pointer;
    transition: background-color .12s ease;
    border-bottom: 1px solid #f3f4f6;
    line-height: 1.35;
}

    .addr-smarty-suggestion:last-child {
        border-bottom: none;
    }

    .addr-smarty-suggestion:hover,
    .addr-smarty-suggestion.addr-smarty-suggestion--active {
        background-color: #f0fdf4;
        color: #166534;
    }

.addr-smarty-suggestion__icon {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: .8rem;
}

.addr-smarty-suggestion:hover .addr-smarty-suggestion__icon,
.addr-smarty-suggestion.addr-smarty-suggestion--active .addr-smarty-suggestion__icon {
    color: #16a34a;
}

.addr-smarty-suggestion__primary {
    font-weight: 600;
}

.addr-smarty-suggestion__secondary {
    font-size: .8rem;
    color: #6b7280;
}

.addr-smarty-suggestion__text {
    flex: 1 1 auto;
    min-width: 0;
}

/* "+ N addresses ›" on multi-unit buildings; expands to the unit list (Smarty "selected" lookup) */
.addr-smarty-suggestion__more {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: #2563eb;
    white-space: nowrap;
}

    .addr-smarty-suggestion__more i {
        font-size: .65rem;
    }

.addr-smarty-suggestion:hover .addr-smarty-suggestion__more,
.addr-smarty-suggestion.addr-smarty-suggestion--active .addr-smarty-suggestion__more {
    color: #1d4ed8;
    text-decoration: underline;
}

.addr-smarty-suggestion--validated {
    border-left: 3px solid #16a34a;
}

/* Badge shown on the Address Line 1 input when Smarty confirms the address */
.addr-smarty-badge {
    position: absolute;
    right: .625rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .7rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 9999px;
    padding: .15rem .5rem;
    pointer-events: none;
    white-space: nowrap;
}

.addr-smarty-badge--invalid {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Save-time "use suggested address?" dialog (addressFields.js → showAddressSuggestionReview) */
.addr-review-popup {
    width: min(36rem, 94vw);
}

.addr-review__intro {
    margin: 0 0 1rem;
    font-size: .9rem;
    color: #374151;
    text-align: left;
}

.addr-review {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
    text-align: left;
}

.addr-review__label {
    margin-bottom: .5rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #4b5563;
}

.addr-review__option {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    margin-bottom: .5rem;
    padding: .75rem .875rem;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}

    .addr-review__option:has(input:checked) {
        border-color: #16a34a;
        background-color: #f0fdf4;
    }

    .addr-review__option input {
        margin-top: .2rem;
        accent-color: #15803d;
    }

.addr-review__option-title {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #111827;
}

.addr-review__lines {
    display: block;
    margin-top: .2rem;
    font-size: .875rem;
    line-height: 1.4;
    color: #374151;
}

.addr-review__changed {
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    border-radius: .2rem;
    padding: 0 .15rem;
}

/* ── Claimant identity banner ───────────────────────────────────── */
.wk-claimant-banner {
    --wk-banner-ink: #0f172a;
    --wk-banner-label: #334155;
    --wk-banner-muted: #64748b;
    --wk-banner-line: #e2e8f0;
    --wk-banner-accent: #059669;
    --wk-banner-accent-soft: #ecfdf5;
    --wk-banner-label-col: 12.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wk-claimant-banner__identity {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    padding: 0.7rem 1rem 0.7rem 1.15rem;
    background: linear-gradient(90deg, var(--wk-banner-accent-soft) 0%, #fff 48%, #f8fafc 100%);
    border-bottom: 1px solid var(--wk-banner-line);
}

    .wk-claimant-banner__identity::before {
        content: '';
        position: absolute;
        inset: 0 auto 0 0;
        width: 0.25rem;
        background: linear-gradient(180deg, #10b981 0%, #047857 100%);
    }

.wk-claimant-banner__id {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-right: 1.1rem;
    border-right: 1px solid #d1d5db;
}

.wk-claimant-banner__id-label,
.wk-claimant-banner__name-label {
    margin: 0;
    color: var(--wk-banner-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wk-claimant-banner__id-value {
    margin: 0;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    background: #064e3b;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.wk-claimant-banner__name {
    flex: 1 1 12rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wk-claimant-banner__name-value {
    margin: 0;
    color: var(--wk-banner-ink);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wk-claimant-banner__body {
    padding: 0.75rem 1rem 0.9rem;
    background: #fff;
}

.wk-claimant-banner__section + .wk-claimant-banner__section {
    margin-top: 0.75rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--wk-banner-line);
}

.wk-claimant-banner__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.wk-claimant-banner__section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: #065f46;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

    .wk-claimant-banner__section-title::before {
        content: '';
        width: 0.2rem;
        height: 0.75rem;
        border-radius: 999px;
        background: var(--wk-banner-accent);
        flex-shrink: 0;
    }

/* Two explicit columns keep left/right pairings stable when extras collapse */
.wk-claimant-banner__cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.75rem;
}

@media (min-width: 768px) {
    .wk-claimant-banner__cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wk-claimant-banner__col {
    margin: 0;
    min-width: 0;
}

.wk-claimant-banner__field {
    display: grid;
    grid-template-columns: var(--wk-banner-label-col) minmax(0, 1fr);
    gap: 0.15rem 0.65rem;
    align-items: center;
    margin: 0;
    padding: 0.22rem 0;
    background: transparent;
}

.wk-claimant-banner.is-collapsed .wk-claimant-banner__field--extra {
    display: none;
}

.wk-claimant-banner__field dt {
    margin: 0;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.wk-claimant-banner__field dd {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 1.45rem;
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

    /* Keep status/type pills vertically centered with the label */
    .wk-claimant-banner__field dd > span,
    .wk-claimant-banner__field dd > a {
        display: inline-flex;
        align-items: center;
        max-width: 100%;
    }

    .wk-claimant-banner__field dd .badge,
    .wk-claimant-banner__field dd [class*="rounded-full"],
    .wk-claimant-banner__field dd [class*="rounded-pill"],
    .wk-claimant-banner__field dd [class*="inline-flex"] {
        margin-top: 0;
        margin-bottom: 0;
        vertical-align: middle;
    }

.wk-claimant-banner__value-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

    .wk-claimant-banner__value-row > span:first-child {
        min-width: 0;
    }

.wk-claimant-banner__checks {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
}

.wk-claimant-banner__field--checks {
    grid-template-columns: minmax(0, 1fr);
}

    .wk-claimant-banner__field--checks dd {
        width: 100%;
        min-width: 0;
    }

.wk-claimant-banner__check-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
    flex: 0 0 auto;
}

.wk-claimant-banner__check {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    accent-color: #047857;
    cursor: default;
    flex-shrink: 0;
}

.wk-claimant-banner__toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.wk-claimant-banner__toggle {
    border: 1px solid #a7f3d0;
    border-radius: 0.5rem;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

    .wk-claimant-banner__toggle:hover,
    .wk-claimant-banner__toggle:focus-visible {
        color: #065f46;
        background: #d1fae5;
        border-color: #6ee7b7;
        outline: none;
    }

    .wk-claimant-banner__toggle:focus-visible {
        outline: 2px solid #99f6e4;
        outline-offset: 2px;
    }

.wk-claimant-banner__help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border: 0;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 0.55rem;
    line-height: 1;
    cursor: help;
    padding: 0;
}

    .wk-claimant-banner__help:hover,
    .wk-claimant-banner__help:focus-visible {
        background: #115e59;
        outline: 2px solid #99f6e4;
        outline-offset: 2px;
    }

    .wk-claimant-banner__help[data-tooltip]::before {
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.03em;
        font-weight: 600;
    }

.wk-claimant-banner__empty {
    color: #94a3b8;
    font-weight: 500;
}

.wk-claimant-banner .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 639px) {
    .wk-claimant-banner {
        --wk-banner-label-col: 8.5rem;
    }

    .wk-claimant-banner__id {
        border-right: 0;
        padding-right: 0;
        width: 100%;
    }

    .wk-claimant-banner__field {
        grid-template-columns: 7.5rem minmax(0, 1fr);
    }

        .wk-claimant-banner__field dt {
            font-size: 0.8125rem;
        }
}

.wk-claimant-banner__edit {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

    .wk-claimant-banner__edit:hover {
        color: #1d4ed8;
        background-color: #eff6ff;
    }

    .wk-claimant-banner__edit:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .wk-claimant-banner__edit:active {
        transform: scale(0.95);
    }

/* ── Detail page layout: one vertical rhythm for every stacked card ── */
.wk-page-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

    .wk-page-stack .wk-claimant-banner {
        margin-bottom: 0;
    }

.wk-section-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wk-section-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.wk-section-card__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
}

.wk-section-card__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 1rem;
}

.wk-section-card__icon--blue {
    background: #eff6ff;
    color: #2563eb;
}

.wk-section-card__icon--violet {
    background: #f5f3ff;
    color: #7c3aed;
}

.wk-section-card__body {
    padding: 1.5rem;
}

/* ── Inline notices ── */
.wk-notice-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wk-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.875rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.625rem;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
}

.wk-notice__icon {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: #2563eb;
}

.wk-notice__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ── Action bar: full-width stacked on phones, right-aligned row from sm up ── */
.wk-action-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

    .wk-action-bar .portal-btn {
        text-align: center;
    }

@media (min-width: 640px) {
    .wk-action-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
    }
}

/* ── Forms & Submissions ── */
.wk-forms-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

    /* Forms only carry hidden inputs/handlers; their visible children join the panel's rhythm */
    .wk-forms-panel > form {
        display: contents;
    }

.wk-form-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wk-form-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 1.125rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .wk-form-card:hover,
    .wk-form-card:focus-within {
        border-color: #cbd5e1;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    }

.wk-form-card__icon {
    display: flex;
    align-self: start;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #ecfdf5;
    color: #047857;
    font-size: 1.125rem;
}

.wk-form-card__main {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.wk-form-card__title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.wk-form-card__desc {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.wk-form-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.375rem;
}

/* Status markup comes from the backend; normalize layout only, keep its colours */
.wk-form-card__status {
    display: inline-flex;
    align-items: center;
}

    .wk-form-card__status > * {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        margin: 0 !important;
        white-space: nowrap;
    }

.wk-form-card__date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.wk-form-card__note {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.25rem 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

    .wk-form-card__note > i {
        margin-top: 0.15rem;
        color: #64748b;
    }

.wk-form-card__actions {
    grid-column: 1 / -1;
}

    .wk-form-card__actions form,
    .wk-form-card__actions .portal-btn {
        width: 100%;
    }

@media (min-width: 768px) {
    .wk-form-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        padding: 1.25rem 1.5rem;
    }

    .wk-form-card__actions {
        grid-column: auto;
    }

        .wk-form-card__actions form,
        .wk-form-card__actions .portal-btn {
            width: auto;
        }

        .wk-form-card__actions .portal-btn {
            min-width: 8.5rem;
        }
}

/* ── SweetAlert2 / overlay polish (this page) ──────────────────────────────── */

.wk-custom-overlay {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.wk-custom-wait-card {
    width: 100%;
    max-width: 22rem;
    padding: 2rem 1.75rem;
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.wk-custom-wait-card__spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    border: 3px solid #d1fae5;
    border-top-color: #15803d;
    animation: wk-custom-spin 0.8s linear infinite;
}

.wk-custom-wait-card__text {
    margin: 0;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 600;
}

@keyframes wk-custom-spin {
    to {
        transform: rotate(360deg);
    }
}

.wk-custom-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 18rem;
    max-width: 24rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #15803d;
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    animation: slide-in-right 0.3s ease-out;
}

/* Shared toast transition. */
.animate-slide-in-right {
    animation: slide-in-right 0.3s ease-out;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wk-custom-toast__icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #15803d;
    font-size: 1.25rem;
}

.wk-custom-toast__message {
    margin: 0;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.swal2-popup.wk-custom-swal {
    width: min(28rem, calc(100vw - 2rem)) !important;
    padding: 1.75rem 1.5rem 1.35rem !important;
    border-radius: 1rem !important;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2) !important;
}

    .swal2-popup.wk-custom-swal .swal2-icon {
        margin: 0.25rem auto 0.85rem !important;
        /*  width: 3.25rem !important;
    height: 3.25rem !important;*/
        border-width: 0.2em !important;
    }

        .swal2-popup.wk-custom-swal .swal2-icon .swal2-icon-content {
            font-size: 1.75rem !important;
        }

    .swal2-popup.wk-custom-swal .wk-custom-swal__title {
        margin: 0 0 0.65rem !important;
        padding: 0 !important;
        color: #111827 !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
    }

    .swal2-popup.wk-custom-swal .wk-custom-swal__html {
        margin: 0 !important;
        padding: 0 !important;
        color: #374151 !important;
        font-size: 0.9375rem !important;
        line-height: 1.55 !important;
        text-align: left !important;
    }

        .swal2-popup.wk-custom-swal .wk-custom-swal__html p {
            margin: 0 0 0.75rem;
        }

            .swal2-popup.wk-custom-swal .wk-custom-swal__html p:last-child {
                margin-bottom: 0;
            }

    .swal2-popup.wk-custom-swal .wk-custom-swal__actions {
        margin: 1.25rem 0 0 !important;
        width: 100%;
        gap: 0.75rem;
    }

    .swal2-popup.wk-custom-swal .wk-custom-swal__confirm,
    .swal2-popup.wk-custom-swal .wk-custom-swal__cancel {
        min-width: auto;
        margin: 0 !important;
        box-shadow: none !important;
    }

.swal2-container.wk-custom-swal-container {
    backdrop-filter: blur(2px);
}

.portal-document-link {
    color: #2563eb; /* Tailwind text-blue-600 */
    transition-property: color;
    transition-duration: 200ms;
    transition-timing-function: ease;
}

    .portal-document-link:hover {
        color: #1e40af; /* Tailwind hover:text-blue-800 */
        text-decoration: underline;
    }

/* Glossary terms rendered by GlossaryTerms.Render + wwwroot/js/shared/glossary-popover.js */
.wk-glossary-term {
    display: inline;
}

.wk-glossary-term__trigger {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0 0.25rem;
    padding: 0;
    border: 0;
    background: none;
    color: #15803d;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    vertical-align: baseline;
    border-radius: 999px;
}

    .wk-glossary-term__trigger:hover,
    .wk-glossary-term__trigger[aria-expanded="true"] {
        color: #166534;
    }

    .wk-glossary-term__trigger:focus-visible {
        outline: 2px solid #15803d;
        outline-offset: 2px;
    }

    /*Floating labels use pointer-events: none so clicks reach the input; re-enable for the icon*/
.floating-label .wk-glossary-term__trigger {
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* Green section headers: keep the info icon light so it stays visible on the green bar. */
.section-hdr .wk-glossary-term__trigger {
    color: #fff;
    opacity: 0.92;
}

    .section-hdr .wk-glossary-term__trigger:hover,
    .section-hdr .wk-glossary-term__trigger[aria-expanded="true"] {
        color: #fff;
        opacity: 1;
    }

    .section-hdr .wk-glossary-term__trigger:focus-visible {
        outline: 2px solid #fef3c7;
        outline-offset: 2px;
    }

.wk-glossary-popover {
    position: fixed;
    z-index: 1080;
    width: max-content;
    max-width: 380px;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
    font-size: 0.875rem;
    line-height: 1.55;
    color: #334155;
    text-align: left;
}

    .wk-glossary-popover[hidden] {
        display: none;
    }

.wk-glossary-popover__title {
    margin-bottom: 0.375rem;
    font-weight: 700;
    color: #166534;
}

.wk-glossary-popover__arrow {
    position: absolute;
    left: var(--wk-glossary-arrow-left, 50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    transform: translateX(-50%) rotate(45deg);
}

.wk-glossary-popover[data-placement="bottom"] .wk-glossary-popover__arrow {
    top: -6px;
    border-right: 0;
    border-bottom: 0;
}

.wk-glossary-popover[data-placement="top"] .wk-glossary-popover__arrow {
    bottom: -6px;
    border-left: 0;
    border-top: 0;
}