/* ================================
   MID Tax Payment Plugin
================================ */

.mid-tax-payment {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: inherit;
    container-name: mid-tax-payment;
    container-type: inline-size;
}

.mid-tax-payment button,
.mid-tax-payment input,
.mid-tax-payment select,
.mid-tax-payment textarea {
    color: inherit;
    font-family: inherit;
}

.mid-tax-payment,
.mid-tax-payment *,
.mid-tax-payment *::before,
.mid-tax-payment *::after {
    box-sizing: border-box;
}

.mid-tax-payment [hidden] {
    display: none !important;
}

.mid-tax-payment.mid-tax-records-status {
    max-width: 640px;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid #d6dce2;
    border-radius: 6px;
    background: #fff;
}

.mid-tax-payment .mid-tax-records-status-value {
    margin: 10px 0 0;
    color: #263746;
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 700;
    overflow-wrap: anywhere;
}

    /* ================================
   Search Form
================================ */

.mid-tax-payment .mid-tax-search-form {
        width: 100%;
        max-width: none;
        margin: 0 0 42px 0;
        padding: 0;
    }

.mid-tax-payment .mid-tax-search-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: end;
}

.mid-tax-payment .mid-tax-search-form-single-mode {
    grid-template-columns: minmax(0, 1fr);
}

.mid-tax-payment .mid-tax-search-form > fieldset {
    grid-column: 1 / -1;
    min-width: 0;
}

.mid-tax-payment .mid-tax-mode-picker {
    max-width: 520px;
    margin-bottom: 24px;
}

.mid-tax-payment .mid-tax-mode-panels,
.mid-tax-payment .mid-tax-row,
.mid-tax-payment .mid-tax-field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.mid-tax-payment .mid-tax-mode-panels > .mid-tax-mode-panel {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.mid-tax-payment .mid-tax-mode-panel > .mid-tax-column {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.mid-tax-payment .mid-tax-mode-instructions {
    margin: 0;
    color: #3f4852;
}

.mid-tax-payment .mid-tax-legal-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    max-width: 640px;
}

.mid-tax-payment .mid-tax-legal-search {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.mid-tax-payment .mid-tax-combobox-field {
    position: relative;
}

.mid-tax-payment .mid-tax-combobox-control {
    position: relative;
    width: 100%;
    min-width: 0;
}

.mid-tax-payment .mid-tax-combobox-input {
    padding-right: 58px;
}

.mid-tax-payment .mid-tax-combobox-toggle {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid #cfd6df;
    border-radius: 0 4px 4px 0;
    color: #263746 !important;
    background: transparent;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.mid-tax-payment .mid-tax-combobox-toggle > span {
    font-size: 20px;
}

.mid-tax-payment .mid-tax-combobox-toggle:hover,
.mid-tax-payment .mid-tax-combobox-toggle:focus,
.mid-tax-payment .mid-tax-combobox-toggle:focus-visible {
    border: 0;
    border-left: 1px solid #cfd6df;
    background: rgba(0, 0, 0, 0.05);
    color: #263746 !important;
}

.mid-tax-payment .mid-tax-combobox-toggle:focus-visible,
.mid-tax-payment .mid-tax-combobox-input:focus-visible {
    position: relative;
    z-index: 2;
    outline: 3px solid #1f6f9f;
    outline-offset: 2px;
}

.mid-tax-payment .mid-tax-combobox-list {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: min(280px, 40vh);
    margin: 0;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #aeb8c3;
    border-radius: 4px;
    background: #fff;
    color: #1f2933;
    box-shadow: 0 8px 20px rgba(20, 32, 44, 0.18);
    list-style: none;
}

.mid-tax-payment .mid-tax-combobox-option,
.mid-tax-payment .mid-tax-combobox-empty {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 9px 12px;
    overflow-wrap: anywhere;
    border-radius: 3px;
    line-height: 1.35;
}

.mid-tax-payment .mid-tax-combobox-option {
    cursor: pointer;
}

.mid-tax-payment .mid-tax-combobox-option:hover,
.mid-tax-payment .mid-tax-combobox-option-active {
    background: #e8f2f8;
    color: #153f56;
}

.mid-tax-payment .mid-tax-combobox-empty {
    color: #5f6872;
}

.mid-tax-payment .mid-tax-legal-status {
    min-height: 24px;
    max-width: 640px;
    margin-top: 10px;
    color: #4d5863;
    font-size: 14px;
    line-height: 1.4;
}

.mid-tax-payment .mid-tax-legal-loading .mid-tax-combobox-control {
    opacity: 0.72;
}

.mid-tax-payment .mid-tax-optional {
    color: #4d5863;
    font-size: 0.9em;
    font-weight: 400;
}

    .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-search-heading,
    .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-field,
    .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-actions {
        grid-column: 1;
    }

.mid-tax-payment .mid-tax-search-heading {
    grid-column: 1 / -1;
    min-height: auto;
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

    .mid-tax-payment .mid-tax-search-heading strong {
        display: block;
    }

.mid-tax-payment .mid-tax-field {
    display: flex;
    flex-direction: column;
}

    .mid-tax-payment .mid-tax-field label {
        display: block;
        margin-bottom: 10px;
        font-size: 18px;
        font-weight: 600;
    }

    .mid-tax-payment .mid-tax-input,
    .mid-tax-payment .mid-tax-select {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 52px;
        padding: 10px 14px;
        border: 1px solid #cfd6df;
        border-radius: 4px;
        font-size: 18px;
        background: #fff;
    }

.mid-tax-payment .mid-tax-actions {
    grid-column: 1 / -1;
}

.mid-tax-payment fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.mid-tax-payment .mid-tax-search-title {
    margin-top: 0;
    margin-bottom: 32px;
    font-size: 42px;
    line-height: 1.2;
    font-weight: 500;
}

.mid-tax-payment .mid-tax-help {
    margin-top: 10px;
    color: #5f6872;
    font-size: 16px;
}

.mid-tax-payment .mid-tax-button-row,
.mid-tax-payment .mid-tax-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.mid-tax-payment .mid-tax-search-form .mid-tax-button-row {
    margin-top: 46px;
    justify-content: center;
}

.mid-tax-payment .mid-tax-search-form {
    padding: 0;
    margin: 0 0 42px;
}

.mid-tax-payment .mid-tax-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-left: 0;
    margin-right: 0;
}

.mid-tax-payment .mid-tax-optional-filters {
    margin-top: 24px;
}

.mid-tax-payment button,
.mid-tax-payment .mid-tax-button,
.mid-tax-payment .mid-tax-view-details {
    display: inline-block;
    min-width: 160px;
    min-height: 44px;
    padding: 12px 22px;
    border: 2px solid #8b0000;
    border-radius: 999px;
    background: #8b0000;
    color: #fff !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
}

    .mid-tax-payment button:hover,
    .mid-tax-payment button:focus,
    .mid-tax-payment .mid-tax-button:hover,
    .mid-tax-payment .mid-tax-button:focus,
    .mid-tax-payment .mid-tax-submit-button:hover,
    .mid-tax-payment .mid-tax-submit-button:focus,
    .mid-tax-payment .mid-tax-reset-button:hover,
    .mid-tax-payment .mid-tax-reset-button:focus,
    .mid-tax-payment .mid-tax-view-details:hover,
    .mid-tax-payment .mid-tax-view-details:focus {
        background: #6f0000;
        border-color: #6f0000;
        color: #fff !important;
        text-decoration: none !important;
    }

    .mid-tax-payment .mid-tax-button:visited,
    .mid-tax-payment .mid-tax-submit-button:visited,
    .mid-tax-payment .mid-tax-reset-button:visited,
    .mid-tax-payment .mid-tax-view-details:visited {
        color: #fff !important;
        text-decoration: none !important;
    }

/* ================================
   Help Text / Notes
================================ */

.mid-tax-format-hint {
    margin-top: 28px;
    color: #dc3545;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.mid-tax-payment .mid-tax-search-note {
    margin-top: 36px;
    padding: 22px 26px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    color: #5f6872;
    font-size: 20px;
    line-height: 1.5;
}

    .mid-tax-payment .mid-tax-search-note p {
        margin: 0 0 14px;
    }

        .mid-tax-payment .mid-tax-search-note p:last-child {
            margin-bottom: 0;
        }

/* ================================
   Error / Empty States
================================ */

.mid-tax-results-placeholder {
    margin-top: 20px;
    padding: 16px;
    border: 1px dashed #aaa;
    background: #fafafa;
}

.mid-tax-payment :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

.mid-tax-error {
    border: 1px solid #d9a5a5;
    border-left: 4px solid #8b0000;
    background: #fff7f7;
    color: #3d1717;
}

    .mid-tax-error p:last-child {
        margin-bottom: 0;
    }

/* ================================
   Search Results
================================ */

.mid-tax-results {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
}

.mid-tax-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

    .mid-tax-results-header h3 {
        margin: 0 0 4px;
    }

    .mid-tax-results-header p {
        margin: 0;
    }

.mid-tax-email-results,
.mid-tax-table-action,
.mid-tax-pagination a,
.mid-tax-pagination span {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.mid-tax-email-results {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 2px solid #8b0000;
    border-radius: 999px;
    color: #7a0000;
    font-weight: 700;
    text-decoration: none;
}

.mid-tax-email-results:hover,
.mid-tax-email-results:focus-visible {
    background: #8b0000;
    color: #fff;
}

.mid-tax-results-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
}

.mid-tax-new-search {
    justify-content: center;
    min-height: 44px;
    font-weight: 700;
    text-decoration: none;
}

.mid-tax-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.mid-tax-result-card {
    min-width: 0;
    border: 1px solid #ddd;
    background: #fff;
    padding: 18px;
    border-radius: 6px;
}

.mid-tax-result-card,
.mid-tax-detail-panel {
    overflow-wrap: anywhere;
}

.mid-tax-result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.mid-tax-result-card h4 {
    margin: 0;
    font-size: 20px;
}

.mid-tax-account {
    margin-top: 4px;
    color: #555;
    font-size: 14px;
}

.mid-tax-result-owner {
    font-weight: 700;
    margin-bottom: 14px;
}

.mid-tax-result-details {
    display: grid;
    gap: 8px;
    margin: 0;
}

    .mid-tax-result-details div {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 10px;
    }

    .mid-tax-result-details dt {
        font-weight: 700;
        color: #444;
    }

    .mid-tax-result-details dd {
        margin: 0;
    }

.mid-tax-result-actions {
    margin-top: 16px;
}

    .mid-tax-result-actions .mid-tax-view-details {
        min-width: 150px;
        padding: 14px 28px;
        font-size: 18px;
    }

.mid-tax-no-results {
    padding: 16px;
    border: 1px dashed #aaa;
    background: #fafafa;
}

/* ================================
   Status Badges
================================ */

.mid-tax-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #eee;
    color: #222;
    white-space: nowrap;
}

.mid-tax-status-paid {
    background: #e7f7eb;
    color: #17652f;
}

.mid-tax-status-partial {
    background: #fff5d9;
    color: #7a5200;
}

.mid-tax-status-due {
    background: #fde8e8;
    color: #8a1f1f;
}

.mid-tax-status-nopay,
.mid-tax-status-nopaypartial {
    background: #e8eefc;
    color: #264a96;
}

/* ================================
   Bill Detail
================================ */

.mid-tax-detail {
    margin-top: 24px;
}

.mid-tax-back-link {
    margin-bottom: 16px;
}

    .mid-tax-back-link a {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }

.mid-tax-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 18px;
}

    .mid-tax-detail-header h3 {
        margin: 0 0 4px;
    }

    .mid-tax-detail-header p {
        margin: 0;
    }

.mid-tax-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.mid-tax-detail-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
}

.mid-tax-detail-panel-full {
    grid-column: 1 / -1;
}

.mid-tax-detail-panel h4 {
    margin-top: 0;
}

.mid-tax-personal-property-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mid-tax-personal-property-list-single {
    grid-template-columns: minmax(0, 1fr);
}

.mid-tax-personal-property-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #d8dee6;
    border-radius: 4px;
    background: #f7f7f7;
}

.mid-tax-personal-property-name span,
.mid-tax-personal-property-values dt {
    display: block;
    color: #555;
    font-size: 13px;
    font-weight: 400;
}

.mid-tax-personal-property-name strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 18px;
    line-height: 1.4;
}

.mid-tax-personal-property-values {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin: 14px 0 0;
}

.mid-tax-personal-property-values div {
    min-width: 120px;
}

.mid-tax-personal-property-values dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.mid-tax-personal-property-total {
    margin: 16px 0 0;
    text-align: right;
}

.mid-tax-personal-property-message {
    margin-bottom: 0;
}

.mid-tax-totals-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

    .mid-tax-totals-grid div {
        padding: 12px;
        background: #f7f7f7;
        border-radius: 4px;
    }

    .mid-tax-totals-grid span {
        display: block;
        color: #555;
        font-size: 13px;
    }

    .mid-tax-totals-grid strong {
        display: block;
        margin-top: 4px;
        font-size: 18px;
    }

.mid-tax-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.mid-tax-results-table {
    min-width: 820px;
    table-layout: auto;
}

.mid-tax-results-table th,
.mid-tax-results-table td {
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.mid-tax-sort-link {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    gap: 4px;
    color: #661010;
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.mid-tax-table-action {
    font-weight: 700;
}

.mid-tax-primary-detail-link {
    color: inherit;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.mid-tax-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 22px;
}

.mid-tax-pagination a,
.mid-tax-pagination span {
    padding: 4px 8px;
}

.mid-tax-pagination [aria-disabled="true"] {
    color: #616b75;
}

.mid-tax-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

    .mid-tax-table-wrap:focus-visible {
        outline: 3px solid #8b0000;
        outline-offset: 2px;
    }

    .mid-tax-table th,
    .mid-tax-table td {
        padding: 9px;
        border-bottom: 1px solid #ddd;
        text-align: left;
        white-space: nowrap;
    }

    .mid-tax-table th:first-child,
    .mid-tax-table td:first-child {
        min-width: 160px;
        white-space: normal;
    }

    .mid-tax-table th {
        background: #f7f7f7;
    }

.mid-tax-results-table th:first-child,
.mid-tax-results-table td:first-child {
    min-width: 50px;
    text-align: center;
}

.mid-tax-results-table th:nth-child(2),
.mid-tax-results-table td:nth-child(2) {
    min-width: 150px;
}

.mid-tax-results-table th:nth-child(3),
.mid-tax-results-table td:nth-child(3) {
    width: 64px;
    min-width: 64px;
}

.mid-tax-results-table th:nth-child(4),
.mid-tax-results-table td:nth-child(4) {
    min-width: 86px;
}

.mid-tax-results-table th:nth-child(5),
.mid-tax-results-table td:nth-child(5),
.mid-tax-results-table th:nth-child(6),
.mid-tax-results-table td:nth-child(6) {
    min-width: 96px;
}

.mid-tax-results-table th:nth-child(7),
.mid-tax-results-table td:nth-child(7) {
    width: 100px;
    min-width: 100px;
}

.mid-tax-results-table th:nth-child(8),
.mid-tax-results-table td:nth-child(8) {
    min-width: 104px;
}

.mid-tax-results-table th:nth-child(9),
.mid-tax-results-table td:nth-child(9) {
    width: 86px;
    min-width: 86px;
    position: sticky;
    right: 0;
    z-index: 1;
    border-left: 1px solid #d6dce2;
    background: #fff;
    box-shadow: -8px 0 10px -12px #1f2933;
}

.mid-tax-results-table th:nth-child(9) {
    z-index: 2;
    background: #f7f7f7;
}

.mid-tax-results-table th,
.mid-tax-results-table td {
    white-space: normal;
}

.mid-tax-results-table .mid-tax-sort-link,
.mid-tax-results-table .mid-tax-table-action {
    white-space: nowrap;
}

.mid-tax-results-table th:nth-child(7),
.mid-tax-results-table td:nth-child(7),
.mid-tax-results-table th:nth-child(8),
.mid-tax-results-table td:nth-child(8) {
    white-space: nowrap;
}

.mid-tax-payment-checkbox {
    width: 24px;
    height: 24px;
    margin: 10px;
    accent-color: #8b0000;
    cursor: pointer;
}

.mid-tax-payment-checkbox:focus-visible,
.mid-tax-review-continue button:focus-visible,
.mid-tax-detail-payment button:focus-visible,
.mid-tax-selection-bar button:focus-visible {
    outline: 3px solid #174f80;
    outline-offset: 3px;
}

.mid-tax-payment button:disabled {
    border-color: #7a858f;
    background: #7a858f;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.72;
}

.mid-tax-payment button:disabled:hover,
.mid-tax-payment button:disabled:focus {
    border-color: #7a858f;
    background: #7a858f;
}

.mid-tax-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mid-tax-payment-reason-row td {
    background: #f6f8fa;
    color: #364451;
    font-size: 14px;
    padding: 10px 14px;
    white-space: normal;
}

.mid-tax-selection-bar,
.mid-tax-detail-payment,
.mid-tax-detail-payment-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.mid-tax-selection-bar {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #f8fafc;
}

.mid-tax-selection-bar p,
.mid-tax-payment-help,
.mid-tax-detail-payment p {
    margin: 0;
}

.mid-tax-payment-help {
    margin-top: 10px;
    color: #465666;
}

.mid-tax-detail-payment,
.mid-tax-payment-review {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #fff;
}

.mid-tax-detail-payment h4,
.mid-tax-payment-review h3,
.mid-tax-handoff-state h4 {
    margin-top: 0;
}

.mid-tax-detail-payment-action strong {
    font-size: 1.375rem;
}

.mid-tax-payment-unavailable {
    color: #781f1f;
}

.mid-tax-payment-message,
.mid-tax-required-explanation,
.mid-tax-handoff-state {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 5px;
}

.mid-tax-payment-message-ready,
.mid-tax-handoff-state {
    border: 1px solid #73a586;
    background: #eef8f1;
    color: #174d2b;
}

.mid-tax-payment-message-blocked {
    border: 1px solid #bd7a7a;
    background: #fff1f1;
    color: #702020;
}

.mid-tax-required-explanation {
    border-left: 4px solid #8b6400;
    background: #fff8df;
    color: #503d0b;
}

.mid-tax-payment-review-table {
    min-width: 680px;
}

.mid-tax-payment-review-table tfoot th,
.mid-tax-payment-review-table tfoot td {
    font-size: 18px;
    font-weight: 800;
    border-top: 2px solid #596978;
}

.mid-tax-review-continue {
    margin-top: 18px;
    text-align: right;
}

a.mid-tax-review-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
}

.mid-tax-provider-review {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #f8fafc;
}

.mid-tax-provider-review h4,
.mid-tax-provider-review p {
    margin-top: 0;
}

.mid-tax-provider-review p {
    margin-bottom: 0;
}

.mid-tax-provider-review dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 12px 0;
}

.mid-tax-provider-review dl div {
    min-width: 0;
}

.mid-tax-provider-review dt {
    color: #465666;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.mid-tax-provider-review dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.mid-tax-external-payment-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-left: 4px solid #326d8c;
    background: #edf7fc;
    color: #173f54;
}

/* ================================
   Responsive
================================ */

@media (max-width: 900px) {
    .mid-tax-payment .mid-tax-row,
    .mid-tax-payment .mid-tax-legal-fields {
        grid-template-columns: 1fr;
    }

    .mid-tax-results-grid,
    .mid-tax-detail-grid,
    .mid-tax-totals-grid,
    .mid-tax-personal-property-list {
        grid-template-columns: 1fr;
    }

    .mid-tax-result-details div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@container mid-tax-payment (max-width: 900px) {
    .mid-tax-results-grid,
    .mid-tax-detail-grid,
    .mid-tax-totals-grid,
    .mid-tax-personal-property-list {
        grid-template-columns: 1fr;
    }

    .mid-tax-result-details div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@container mid-tax-payment (max-width: 760px) {
    .mid-tax-payment .mid-tax-row,
    .mid-tax-payment .mid-tax-legal-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .mid-tax-payment .mid-tax-search-form,
    .mid-tax-payment .mid-tax-search-form-single-mode {
        grid-template-columns: 1fr;
    }

    .mid-tax-payment .mid-tax-row {
        grid-template-columns: 1fr;
    }

        .mid-tax-payment .mid-tax-search-heading,
        .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-search-heading,
        .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-field,
        .mid-tax-payment .mid-tax-search-form-single-mode .mid-tax-actions {
            grid-column: 1;
        }

    .mid-tax-payment .mid-tax-search-title {
        font-size: 34px;
    }

    .mid-tax-payment button,
    .mid-tax-payment .mid-tax-button,
    .mid-tax-payment .mid-tax-view-details {
        width: 100%;
    }

    .mid-tax-payment .mid-tax-button-row,
    .mid-tax-payment .mid-tax-actions {
        flex-direction: column;
    }

    .mid-tax-result-card-header,
    .mid-tax-detail-header {
        flex-direction: column;
    }

    .mid-tax-personal-property-total {
        text-align: left;
    }

    .mid-tax-selection-bar,
    .mid-tax-detail-payment,
    .mid-tax-detail-payment-action {
        align-items: stretch;
        flex-direction: column;
    }

    .mid-tax-provider-review dl {
        grid-template-columns: 1fr;
    }
}

@container mid-tax-payment (max-width: 700px) {
    .mid-tax-payment .mid-tax-search-form,
    .mid-tax-payment .mid-tax-search-form-single-mode,
    .mid-tax-payment .mid-tax-row {
        grid-template-columns: 1fr;
    }

    .mid-tax-payment .mid-tax-search-title {
        font-size: 34px;
    }

    .mid-tax-payment button,
    .mid-tax-payment .mid-tax-button,
    .mid-tax-payment .mid-tax-view-details {
        width: 100%;
    }

    .mid-tax-payment .mid-tax-button-row,
    .mid-tax-payment .mid-tax-actions,
    .mid-tax-results-header,
    .mid-tax-result-card-header,
    .mid-tax-detail-header {
        flex-direction: column;
    }

    .mid-tax-email-results {
        width: 100%;
        justify-content: center;
    }

    .mid-tax-results-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .mid-tax-personal-property-total {
        text-align: left;
    }

    .mid-tax-selection-bar,
    .mid-tax-detail-payment,
    .mid-tax-detail-payment-action {
        align-items: stretch;
        flex-direction: column;
    }

    .mid-tax-provider-review dl {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Taxpayer workflow cards
================================ */

.mid-tax-payment .mid-tax-result-list,
.mid-tax-payment .mid-tax-review-bill-list {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.mid-tax-payment .mid-tax-result-sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.mid-tax-payment .mid-tax-result-sort > span {
    font-weight: 700;
}

.mid-tax-payment .mid-tax-result-sort a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #6f0000;
    font-weight: 600;
    text-underline-offset: 3px;
}

.mid-tax-payment .mid-tax-result-sort a[aria-current="true"] {
    font-weight: 800;
}

.mid-tax-payment .mid-tax-result-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #cbd2d9;
    border-radius: 7px;
    background: #fff;
    color: inherit;
}

.mid-tax-payment .mid-tax-result-main,
.mid-tax-payment .mid-tax-result-identity,
.mid-tax-payment .mid-tax-result-identity > div,
.mid-tax-payment .mid-tax-result-payment > div {
    min-width: 0;
}

.mid-tax-payment .mid-tax-result-identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mid-tax-payment .mid-tax-result-select {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
}

.mid-tax-payment .mid-tax-payment-checkbox {
    width: 24px;
    height: 24px;
    margin: 4px;
}

.mid-tax-payment .mid-tax-result-name {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.mid-tax-payment .mid-tax-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 5px;
    color: #46515c;
    font-size: 0.92rem;
    line-height: 1.45;
}

.mid-tax-payment .mid-tax-result-payment {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) minmax(110px, auto);
    align-items: end;
    gap: 12px 24px;
    padding-top: 13px;
    border-top: 1px solid #e1e5e9;
}

.mid-tax-payment .mid-tax-result-amount,
.mid-tax-payment .mid-tax-result-status,
.mid-tax-payment .mid-tax-result-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin: 0;
}

.mid-tax-payment .mid-tax-result-label {
    color: #4b5660;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
}

.mid-tax-payment .mid-tax-result-amount strong {
    font-size: 1.2rem;
    line-height: 1.2;
}

.mid-tax-payment .mid-tax-view-bill,
.mid-tax-payment .mid-tax-back-results {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #6f0000;
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.mid-tax-payment .mid-tax-primary-detail-link:focus-visible,
.mid-tax-payment .mid-tax-view-bill:focus-visible,
.mid-tax-payment .mid-tax-back-results:focus-visible,
.mid-tax-payment .mid-tax-email-results:focus-visible,
.mid-tax-payment .mid-tax-new-search:focus-visible,
.mid-tax-payment .mid-tax-pagination a:focus-visible {
    outline: 3px solid #174f80;
    outline-offset: 3px;
}

.mid-tax-payment .mid-tax-selection-bar[data-selection-state="empty"] {
    margin-top: 12px;
    padding: 8px 0;
    border: 0;
    background: transparent;
}

.mid-tax-payment .mid-tax-selection-bar[data-selection-state="selected"] {
    margin-top: 16px;
    padding: 14px 16px;
}

.mid-tax-payment .mid-tax-selection-bar[data-selection-state="selected"] p {
    font-weight: 700;
}

.mid-tax-payment .mid-tax-workflow-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.mid-tax-payment .mid-tax-workflow-header h3 {
    margin: 0;
}

.mid-tax-payment .mid-tax-workflow-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 18px;
}

.mid-tax-payment .mid-tax-workflow-header .mid-tax-workflow-actions {
    justify-content: flex-end;
    margin-bottom: 0;
}

.mid-tax-payment .mid-tax-review-bills h4 {
    margin: 20px 0 10px;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mid-tax-payment .mid-tax-review-bill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #d6dce2;
    border-radius: 6px;
}

.mid-tax-payment .mid-tax-review-bill > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    min-width: 0;
}

.mid-tax-payment .mid-tax-review-bill-kind {
    flex-basis: 100%;
}

.mid-tax-payment .mid-tax-review-bill-amount,
.mid-tax-payment .mid-tax-review-total strong {
    font-size: 1.25rem;
}

.mid-tax-payment .mid-tax-review-bill-reason {
    grid-column: 1 / -1;
    margin: 0;
}

.mid-tax-payment .mid-tax-review-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 16px;
    border-top: 2px solid #596978;
    font-weight: 800;
    text-transform: uppercase;
}

@container mid-tax-payment (max-width: 620px) {
    .mid-tax-payment .mid-tax-result-payment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mid-tax-payment .mid-tax-result-actions {
        grid-column: 1 / -1;
    }

    .mid-tax-payment .mid-tax-workflow-header {
        flex-direction: column;
    }

    .mid-tax-payment .mid-tax-workflow-header .mid-tax-workflow-actions,
    .mid-tax-payment .mid-tax-workflow-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .mid-tax-payment .mid-tax-workflow-actions > a,
    .mid-tax-payment .mid-tax-result-actions > a {
        justify-content: center;
    }
}

@container mid-tax-payment (max-width: 420px) {
    .mid-tax-payment .mid-tax-result-card {
        padding: 16px;
    }

    .mid-tax-payment .mid-tax-result-meta,
    .mid-tax-payment .mid-tax-result-payment {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .mid-tax-payment .mid-tax-result-meta span {
        width: 100%;
    }

    .mid-tax-payment .mid-tax-result-actions {
        grid-column: auto;
    }

    .mid-tax-payment .mid-tax-review-bill {
        grid-template-columns: 1fr;
    }

    .mid-tax-payment .mid-tax-review-bill-amount {
        justify-self: start;
    }
}
