/* static/css/styles.css build e */
:root {
    --dark-button-color: #7A288A;
    --button-border-color: #7A288A;
    --light-button-color: #FFFFFF;
    --header-background: #7D3F98;
}

body {
    margin: 50px;
    font-weight: 400;
    font-family: 'CVS Health Sans', sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.label-text {
    font-weight: 500;
}

body.modal-open {
    overflow: hidden; /* Prevent body scrolling when modal is open */
}
.hidden {
    display: none !important;
}

.not-hidden {
    display: flex;
}

/* common page elements */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: start;
}

.logo {
    height: 45px;
    aspect-ratio: 55.80/31.00;
    margin-right: 10px;
}

.logo-text {
    margin-top: 2px;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer {
    background-color: var(--header-background);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 20px -50px 0 -50px;
    padding: 20px 50px;
    width: calc(100% + 100px);
    box-sizing: border-box;
}

.footer-left {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.footer-link {
    color: #fff;
    text-decoration: underline;
    margin-right: 10px;
}

.footer-link-divider {
    margin-right: 10px;
}

.copyright-notice {
    font-size: 14px;
}

.footer-logo-container {
    display: flex;
    padding-right: 80px;
}

.footer-logo {
    height: 20px;
    width: auto;
}

.resend-link {
    color: #7D3F98;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.divider {
    border: 0;
    height: 1px;
    background-color: gray;
    margin: 0 0 15px 0; /* Remove negative margins */
    width: 100%; /* Use 100% instead of calc */
}

.email-address {
    color: var(--header-background);
    font-weight: 500;
}

/* home page */

.order-text {
    font-weight: bold;
}

.in-home-kits-text {
    font-weight: normal;
}

.right-icons {
    display: flex;
    align-items: flex-start;
}

.help-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    cursor: pointer;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
}

.user-container {
    display: flex;
    align-items: center;
}

.user-icon {
    width: 30px;
    height: 30px;
    margin-right: 5px;
}

.user-name {
    font-size: 16px;
}

.exit-text {
    font-size: 14px;
    color: #7A288A;
    cursor: pointer;
}

.help-container {
    display: flex;
    align-items: center;
    margin-right: 50px;
    background: none; /* Ensure no background */
    border: none; /* Remove default button border */
    padding: 0; /* Remove default button padding */
    cursor: pointer; /* Change cursor to pointer */
}

.exit-text {
    font-size: 14px;
    color: #7A288A;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0; /* Remove padding to make it look like text */
    text-align: left;
    text-decoration: underline;
}

.exit-text:focus {
    outline: 3px solid #000000; /* Focus outline */
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white; /* Optional: add a shadow for better visibility */
}


/* campaign info in header */

.campaign-info {
    display: flex;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

.campaign-info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #FCF6FF;
    border-radius: 8px;
    padding: 10px 16px;
}

.campaign-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.campaign-title {
    font-size: 18px;
    font-weight: 700;
    min-width: 150px;
}

.campaign-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    min-width: 200px;
}

.campaign-calendar-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.campaign-description-row {
    display: flex;
    align-items: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: visible;
    margin-top: 2px;
    position: relative;
}

.campaign-description-text {
    font-size: 14px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.campaign-description-more-btn {
    background: none;
    border: none;
    padding: 0 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-button-color);
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.campaign-description-more-btn:hover {
    text-decoration: underline;
}

.campaign-description-more-btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.campaign-description-full-text {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background: #fff;
    padding: 10px 14px;
    font-size: 14px;
    color: #555;
    white-space: normal;
    word-wrap: break-word;
    min-width: 300px;
    max-width: min(800px, calc(100vw - 250px));
    width: max-content;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.campaign-description-full-text p {
    margin: 0;
    padding: 0;
}

.campaign-blurb-container {
    margin-top: 40px;
    padding: 20px 40px;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.campaign-blurb-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
}

.campaign-blurb-box {
    border: 1px solid #919191;
    border-radius: 12px;
    padding: 24px 28px;
    background: #fff;
}

.campaign-blurb-box p {
    margin: 0 0 12px 0;
}

.campaign-blurb-box p:last-child {
    margin-bottom: 0;
}

.members-list-container {
    margin-top: 20px;
}

.members-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.members-list-text {
    font-size: 20px;
    font-weight: 400;
}

.action-buttons {
    display: flex;
    align-items: center;
}

.order-home-kits-button {
    background-color: var(--dark-button-color);
    color: var(--light-button-color);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 40px;
}

.opt-out-button {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
}

.order-home-kits-button:disabled,
.opt-out-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e0e0e0;
    border-color: #cccccc;
}

.order-home-kits-button:disabled {
    color: #888888;
}

.opt-out-button:disabled {
    color: #888888;
    border-color: #cccccc;
}

.count-badge-container {
    display: none; /* setting a count will change this */
    margin-left: 10px;
}

.count-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    padding-left: 3px;
    padding-right: 3px;
}

.order-home-kits-button .count-badge {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
}

.opt-out-button .count-badge {
    background-color: var(--dark-button-color);
    color: var(--light-button-color);
}

.sub-header {
    margin-top: 20px;
    background-color: #f7f7f7;
    padding: 10px 0;
}

.sub-header-links {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
}

.active-link {
    font-weight: bold;
    color: #000;
    border-bottom: 6px solid var(--dark-button-color);
    padding-bottom: 10px;
    margin-right: 20px;
}

.inactive-link {
    color: #000;
    text-decoration: none;
    padding-bottom: 16px; /* account for the border on the active link */
    margin-right: 20px;
}

.inactive-link:hover {
    border-bottom: 3px solid var(--dark-button-color);
    padding-bottom: 13px; /* account for the difference in borders between inactive and inactive */
}

/* Filter dropdown */
.filter-dropdown-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 20px;
}

.filter-dropdown-button {
    background-color: var(--header-background);
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    border-radius: 5px;
    font-family: inherit;
    margin-bottom: 10px;
}

.filter-dropdown-button:hover {
    background-color: #6a3580;
}

.filter-dropdown-button:focus-visible {
    background-color: #6a3580;
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}

.filter-dropdown-icon {
    width: 16px;
    height: 16px;
}

.filter-dropdown-chevron {
    transition: transform 0.2s ease;
}

.filter-dropdown-button[aria-expanded="true"] .filter-dropdown-chevron {
    transform: rotate(180deg);
}

.filter-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 60vw;
    max-width: 800px;
    min-width: 280px;
}

.filter-dropdown-panel[hidden] {
    display: none;
}

.filter-dropdown-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 150px;
    min-width: 130px;
}

.filter-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-input, .filter-select {
    width: 100%;
    height: 30px;
    padding: 5px;
    border: 1px solid #919191;
    border-radius: 5px;
    box-sizing: border-box;
}

.filter-dropdown-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.filter-apply-button {
    background-color: var(--dark-button-color);
    color: #fff;
    border: none;
    padding: 6px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.filter-apply-button:hover {
    background-color: #5e1e6b;
}

.filter-apply-button:focus-visible {
    background-color: #5e1e6b;
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}

.filter-reset-button {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 6px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.filter-reset-button:hover,
.filter-reset-button:focus-visible {
    background-color: #f3e8f5;
}

.filter-cancel-button {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 6px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.filter-cancel-button:hover {
    background-color: #f3e8f5;
}

.filter-cancel-button:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}


/* Legacy filter styles (used by status page) */
.filter-container {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid black;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.filter-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-element {
    flex: 1 1 150px;
    max-width: 150px;
}

.filter-button-container {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-end;
}

.filter-button {
    background-color: var(--dark-button-color);
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    min-width: 100px;
    border-radius: 5px;
}

.filter-button span {
    margin-left: 3px;
    margin-right: 5px;
    font-size: 14px;
}

.filter-icon {
    width: 17px;
    height: 17px;
    padding: 6px;
}

/* Filter bar: inline layout for filter button + chips + clear */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0 12px;
}

.filter-chips-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-top: 20px;
    gap: 8px;
    padding-bottom: 10px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #F4F6F6;
    border: 1px solid #d5d8d8;
    border-radius: 6px;
    padding: 4px 8px 4px 12px;
    font-size: 13px;
    white-space: nowrap;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
}

.filter-chip:hover,
.filter-chip:focus-visible {
    background-color: #e8ebeb;
    border-color: #000;
    outline: 2px solid #000;
    outline-offset: 1px;
}

.filter-chip-label {
    font-weight: 500;
    color: #555;
}

.filter-chip-value {
    color: #222;
}

.filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #000;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    pointer-events: none;
}

.filter-chip:hover .filter-chip-remove,
.filter-chip:focus-visible .filter-chip-remove {
    background-color: #333;
}

.clear-filter-button-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.clear-filter-button {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 5px 14px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.clear-filter-button:hover,
.clear-filter-button:focus-visible {
    background-color: #f3e8f5;
    border-color: var(--dark-button-color);
    outline: 2px solid var(--dark-button-color);
    outline-offset: 1px;
}

/* round all buttons */
.filter-button, .clear-filter-button, .order-home-kits-button, .opt-out-button {
    border-radius: 5px;
}

.member-list-headings {
    background-color: var(--header-background);
    color: #fff;
    padding: 10px;
    padding-left: 20px;
}

.member-list-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr 0.5fr;
    width: 100%;
}

.member-list-heading {
    padding: 10px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 5px;
}

.order-checkbox {
    padding-top: 20px;
    padding-left: 7px;
}

.optout-checkbox {
    padding-top: 20px;
    padding-left: 5px;
}

.loading-indicator {
    padding: 20px;
}

.error-message {
    padding: 20px;
    color: red;
}

.no-members-message {
    padding: 20px;
}

.member-list {
    border: 1px solid black;
    border-top: none; /* Remove the top border */
    border-bottom-left-radius: 10px; /* Add a rounded border to the bottom left */
    border-bottom-right-radius: 10px; /* Add a rounded border to the bottom right */
}

.member-data-rowgroup {
    border: 1px solid black;
    border-top: none; /* Remove the top border to connect with headers */
    border-bottom-left-radius: 10px; /* Add a rounded border to the bottom left */
    border-bottom-right-radius: 10px; /* Add a rounded border to the bottom right */
}

.member-row {
    display: contents;
}

.member-row.with-status {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr 0.5fr;
}

.member-row.with-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr 0.5fr;
}

.member-info {
    padding: 20px;
}

.attributed-provider {
    padding: 20px;
}

.status-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.status-cell {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.status-line {
    margin-bottom: 5px;
}

.member-row:not(:last-child) .member-info, 
.member-row:not(:last-child) .attributed-provider, 
.member-row:not(:last-child) .status-container, 
.member-row:not(:last-child) .status-cell, 
.member-row:not(:last-child) .checkbox-container {
    border-bottom: 1px solid black;
}

.pagination-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.display-per-page-container {
    grid-column: 1;
    display: flex;
    align-items: center;
    padding-bottom: 40px;
}

.page-select-container {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-container span {
    margin-right: 10px;
    font-weight: 300;
}

#items-per-page {
    margin-right: 10px;
    margin-left: 5px;
    height: 30px;
    padding: 5px;
    border: 1px solid var(--dark-button-color);
    border-radius: 5px;
    box-sizing: border-box;
    color: var(--dark-button-color);
}

#page-select {
    height: 30px;
    padding: 5px;
    border: 1px solid var(--dark-button-color);
    border-radius: 5px;
    box-sizing: border-box;
    color: var(--dark-button-color);
}

.arrow-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0 10px;
}

.arrow-button svg {
    display: block;
}

.arrow-button:disabled {
    cursor: not-allowed;
}

.arrow-button:disabled svg path {
    stroke: grey;
}

/* order page */

.order-header {
    margin-top: 5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.back-button {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 7px 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.back-button svg {
    margin-right: 5px;
}

.order-header-text {
    font-size: 20px;
    margin-left: 20px;
    font-weight: 500;
}

.section-heading {
    margin-top: 0;
    font-size: 20px;
    font-weight: 500;
}

.attest-checkbox {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    margin-right: 18px;
    accent-color: black; /* This makes the checkbox black when checked */
    cursor: pointer;
}

.confirm-order-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.attest-name-container {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid black;
    border-bottom: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.attest-confirm-container {
    padding: 20px;
    border: 1px solid black;
    border-bottom: none;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.attest-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.attest-checkbox {
    display: flex;
    align-items: flex-start;
    margin-top: 2px;
    min-width: 24px;
    min-height: 24px;
}

.attest-main-text {
    font-size: 15px;
    color: #222;
    line-height: 1.5;
    font-weight: 400;
    max-width: 900px;
}

.attest-name-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.attest-your-name-label {
    font-size: 15px;
    color: #222;
    font-weight: 400;
    margin-right: 8px;
}

.attest-your-name-box {
    display: inline-block;
    background: #fff;
    border: 1.5px solid #bbb;
    border-radius: 6px;
    padding: 7px 18px 7px 18px;
    font-size: 15px;
    font-weight: 400;
    color: #222;
    min-width: 120px;
    min-height: 24px;
    box-sizing: border-box;
}

.attest-buttons-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
}

.confirm-order-btn {
    background: #7A288A;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-order-btn:hover {
    background: #5d206b;
}

.cancel-order-btn {
    background: #fff;
    color: #7A288A;
    border: 2px solid #7A288A;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cancel-order-btn:hover {
    background: #f7eafd;
    color: #5d206b;
}

.order-members-container {
    padding: 20px;
    margin-bottom: 50px;
    border: 1px solid black;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* modal */
.modal-overlay {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(100, 100, 100, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    padding: 36px 40px 32px 40px;
    min-width: 350px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
    color: #222;
}

.modal-message {
    font-size: 16px;
    color: #222;
    margin-bottom: 28px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    width: 100%;
}

.modal-yes-btn {
    background: #B80000;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-yes-btn:hover {
    background: #900000;
}

.modal-no-btn {
    background: #fff;
    color: #222;
    border: 1.5px solid #888;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.modal-no-btn:hover {
    background: #f3f3f3;
    color: #7A288A;
    border-color: #7A288A;
}

/* order members page */

.order-members-container {
    padding: 32px 32px 40px 32px;
    margin-bottom: 50px;
    border: 1px solid black;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    background: #fff;
    position: relative;
}

.order-members-heading {
    font-weight: 700;
}

.order-members-inner-box {
    border: 1px solid black;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0;
}

.order-members-headings {
    display: grid;
    background: #7D3F98;
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: none;
    padding: 18px 28px 18px 28px;
    /* grid-template-columns is set inline for flexibility */
}

.order-members-heading {
    padding-right: 10px;
}

.order-members-container .section-heading {
    margin-bottom: 20px;
}

.order-members-row {
    display: grid;
    /* grid-template-columns is set inline for flexibility */
    background: #fff;
    font-size: 15px;
    color: #222;
    padding: 28px 28px 28px 28px;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.order-members-remove {
    background: none;
    color: #7A288A;
    font-weight: 500;
    font-size: 15px;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    outline: none;
    border-radius: 4px;
    transition: background 0.15s;
    text-decoration: underline;
}

.order-members-remove:hover {
    background: #f7eafd;
}

.order-members-remove:focus {
    outline: 2px solid #7A288A;
    outline-offset: 2px;
    background: #f7eafd;
}

/* optout page */

.optout-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 36px;
    margin-bottom: 30px;
    gap: 24px;
}

.optout-header-title {
    font-size: 28px;
    font-weight: 500;
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.optout-header-actions {
    display: flex;
    gap: 18px;
}

.optout-btn {
    background-color: #7A288A;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}

.optout-btn:hover {
    background: #5d206b;
}

.optout-cancel-btn {
    background: #fff;
    color: #7A288A;
    border: 2px solid #7A288A;
    border-radius: 7px;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.optout-cancel-btn:hover {
    background: #f7eafd;
    color: #5d206b;
    border-color: #5d206b;
}

.optout-members-container {
    border: 1px solid black;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.optout-members-headings {
    display: grid;
    grid-template-columns: 2.2fr 2fr 1fr 1.5fr;
    background: #7D3F98;
    color: #fff;
    font-weight: 500;
    font-size: 18px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    padding: 18px 28px 18px 28px;
}

.optout-members-heading {
    padding-right: 10px;
    display: flex;
    align-items: center;
}

.optout-members-row {
    display: grid;
    grid-template-columns: 2.2fr 2fr 1fr 1.5fr;
    font-size: 16px;
    color: #222;
    padding: 28px 28px 28px 28px;
    border-bottom: 1px solid #d2d2d2;
    background: #fff;
}

.optout-members-row:last-child {
    border-bottom: none;
}

.optout-member-info, .optout-attributed-provider {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.optout-request-date {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 400;
}

.optout-checkbox-cell {
    display: flex;
    align-items: center;
    height: 100%;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #222;
    border-radius: 5px;
    background: #fff;
    display: inline-block;
    position: relative;
    margin-right: 10px;
    transition: border 0.2s, background 0.2s;
}

.custom-checkbox-label input[type="checkbox"]:checked + .custom-checkbox {
    background: #111;
    border-color: #111;
}

.custom-checkbox-label input[type="checkbox"]:checked + .custom-checkbox:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 7px;
    height: 13px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    display: block;
}

.checkbox-label-text {
    font-size: 17px;
    color: #222;
    font-weight: 400;
    margin-left: 2px;
}

/* status page */
.status-header {
    display: grid;
    grid-template-columns: 20% 20% auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Status page - campaign status cells */
.campaign-status-cell {
    padding: 15px 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

/* Divider between campaign rows within a member */
.campaign-row-divider {
    border-bottom: 1px solid #d2d2d2;
}

/* Border between member rows for campaign status cells */
.member-row:not(:last-child) .campaign-status-cell:not(.campaign-row-divider) {
    border-bottom: 1px solid black;
}

/* Remove All / Remove Opt Out checkbox labels in status page */
.remove-all-label,
.remove-optout-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.remove-all-label input[type="checkbox"],
.remove-optout-label input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.status-text {
    font-size: 20px;
    font-weight: 400;
}

.status-selector {
    display: flex;
    justify-content: center;
}

.selector-btn {
    padding: 8px 16px;
    border: 1px solid #7A288A;
    background: transparent;
    color: #7A288A;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0;
    transition: background-color 0.2s, color 0.2s;
}

.selector-btn:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.selector-btn:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-left: none;
}

.selector-btn.selected {
    background: #7A288A;
    color: white;
}

.selector-btn:hover:not(.selected) {
    background: rgba(122, 40, 138, 0.1);
}

.selector-btn:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}

.download-excel-btn {
    background: transparent;
    border: 1px solid #118738;
    color: #118738;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.status-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-right: 50px;
}

.download-excel-btn:hover {
    background: rgba(17, 135, 56, 0.1);
}

.download-excel-btn:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}

.remove-optout-btn {
    background-color: var(--light-button-color);
    color: var(--dark-button-color);
    border: 1px solid var(--button-border-color);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-optout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e0e0e0;
    border-color: #cccccc;
    color: #888888;
}

.remove-optout-btn:disabled:hover {
    background-color: #e0e0e0;
}

.remove-optout-btn .count-badge {
    background-color: var(--dark-button-color);
    color: var(--light-button-color);
}

.remove-optout-btn:focus {
    outline: 2px solid #7A288A;
    outline-offset: 2px;
}

.download-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

#cases-filter:disabled {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* error page */
.error-container {
    padding: 20px;
    margin-bottom: 50px;
    border: 1px solid black;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.error-container h2 {
    font-size: 24px;
    font-weight: 500;
    margin-top: 0;
}

.error-container p {
    font-size: 18px;
    color: #666;
}

/* logout and timeout pages */
.logout-container {
    padding: 20px;
    margin-bottom: 50px;
    margin-left: 20px;
    border: 1px solid gray;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.logout-container h2 {
    font-size: 20px;
    font-weight: 400;
    margin-top: 0;
}

.logout-container h3 {
    font-size: 18px;
    font-weight: 400;
    margin-top: 0;
}

.logout-container p {
    font-size: 18px;
    color: #666;
}

/* accessibility */

.sr-only {  /* anything with this class is only visible to screen readers */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Disabled state for modal buttons */
.modal-yes-btn:disabled,
.modal-no-btn:disabled,
#submit-optout-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    border-color: #bbbbbb;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Specifically for the Submit Opt Out button when disabled */
#submit-optout-btn:disabled {
    background: #cccccc;
    color: #666666;
    border: none;
}

/* Disabled state for the Add Reason & Submit button */
.optout-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Ensure hover effects don't apply to disabled buttons */
.modal-yes-btn:disabled:hover,
.modal-no-btn:disabled:hover,
#submit-optout-btn:disabled:hover,
.optout-btn:disabled:hover {
    background-color: #cccccc;
    color: #666666;
    border-color: #bbbbbb;
}

/* Improved focus styles for buttons */
.order-home-kits-button:focus,
.opt-out-button:focus,
.confirm-order-btn:focus,
.cancel-order-btn:focus,
.optout-btn:focus,
.optout-cancel-btn:focus,
.back-button:focus,
.modal-yes-btn:focus,
.modal-no-btn:focus,
#modal-ok-btn:focus {
    outline: 3px solid #000000;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
    position: relative;
    z-index: 1;
}

/* Ensure the focus state is visible in high contrast mode */
@media (forced-colors: active) {
    .order-home-kits-button,
    .opt-out-button,
    .confirm-order-btn:focus,
    .cancel-order-btn:focus,
    .back-button:focus,
    .modal-yes-btn:focus,
    .modal-no-btn:focus,
    #modal-ok-btn:focus {
        outline: 3px solid CanvasText;
    }
}

@media (max-width: 1100px) {
    .optout-members-headings,
    .optout-members-row {
        grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr;
        font-size: 15px;
        padding: 18px 10px 18px 10px;
    }
}

/* Filterable Dropdown Styles */
.combobox-list {
    position: relative;
    width: 100%;
  }
  
  .combobox .group {
    display: inline-flex;
    width: 100%;
    cursor: pointer;
  }
  
  .combobox input,
  .combobox button {
    background-color: white;
    color: black;
    box-sizing: border-box;
    height: 30px;
    padding: 0;
    margin: 0;
    vertical-align: bottom;
    border: 1px solid #919191;
    position: relative;
    cursor: pointer;
  }
  
  .combobox input {
    width: calc(100% - 19px);
    border-right: none;
    outline: none;
    font-size: 14px;
    padding: 5px;
    border-radius: 5px 0 0 5px;
  }
  
  .combobox button {
    background: transparent;
    border-left: none;
    outline: none;
    color: #222;
    width: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 5px 5px 0;
    padding: 0;
    margin: 0;
    height: 30px;
  }
  
  .combobox input {
    border-radius: 5px 0 0 5px;
  }

  ul[role="listbox"] {
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    top: 30px;
    list-style: none;
    background-color: white;
    display: none;
    box-sizing: border-box;
    border: 1px solid #919191;
    max-height: 250px;
    width: 100%;
    overflow: auto;
    z-index: 1000;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0 0 5px 5px;
  }
  
  ul[role="listbox"] li[role="option"] {
    margin: 0;
    display: block;
    padding: 5px;
  }

  ul[role="listbox"] li[role="option"][aria-selected="true"] {
    background-color: #E8D5ED;
    outline: 2px solid #7A288A;
    outline-offset: -2px;
  }

  .combobox .group.focus polygon,
  .combobox .group:hover polygon {
    fill-opacity: 1;
  }

  .combobox .group.focus input,
  .combobox .group.focus button,
  .combobox .group input:hover,
  .combobox .group button:hover {
    background-color: transparent;
  }

  .combobox .group {
    border-radius: 5px;
    background: transparent;
  }
  
  #pbg-filter:focus {
    border: 2px solid #000;
    background: transparent;
  }

.warning-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #FFEBEE;
    border: 2px solid #B71C1C;
    border-radius: 5px;
    font-weight: 500;
    color: #B71C1C;
    text-align: center;
    font-size: 16px;
}

/* Medium screen - stack campaign info below logo row */
@media (max-width: 1200px) {
    .header {
        flex-wrap: wrap;
    }

    .campaign-info {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        padding: 0;
        margin-top: 12px;
        margin-bottom: 8px;
    }
}

/* Mobile Responsive Design - 320px and up */
@media (max-width: 480px) {
    /* Base body adjustments */
    body {
        margin: 10px;
        font-size: 14px;
    }

    /* Header adjustments */
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .logo-container {
        align-self: center;
    }

    .right-icons {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }

    .help-container {
        margin-right: 0;
    }

    .user-info {
        align-items: flex-end;
        margin-right: 0;
    }

    /* Footer adjustments */
    .footer {
        flex-direction: column;
        gap: 15px;
        margin: 20px -10px 0;
        width: calc(100% + 20px);
        padding: 15px;
    }

    .footer-left {
        padding-left: 0;
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-link-divider {
        display: none;
    }

    .footer-logo-container {
        align-self: center;
        padding-right: 0;
    }

    /* Members list header */
    .members-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .members-list-text {
        font-size: 18px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .order-home-kits-button,
    .opt-out-button {
        width: 100%;
        margin-right: 0;
        padding: 12px 15px;
        font-size: 16px;
        text-align: center;
    }

    /* Filter dropdown - mobile */
    .filter-dropdown-panel {
        width: calc(100vw - 40px);
        min-width: 0;
        max-width: none;
    }

    .filter-field {
        flex: 1 1 100%;
    }

    /* Legacy filter - mobile */
    .filter-container {
        padding: 15px;
    }

    .filter-elements {
        gap: 15px;
    }

    .filter-element {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .filter-button-container {
        flex: 1 1 100%;
        justify-content: center;
    }

    .filter-button {
        width: 100%;
        max-width: 200px;
        padding: 10px;
        font-size: 16px;
    }

    /* Filter chips - mobile */
    .filter-bar {
        flex-direction: column;
    }

    .filter-chips-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 0;
    }

    .filter-chips {
        gap: 6px;
    }

    .clear-filter-button-container {
        align-self: flex-end;
    }

    .clear-filter-button {
        padding: 8px 15px;
    }

    /* Member list table */
    .member-list-headings {
        padding: 15px;
        padding-left: 15px;
    }

    .member-list-row {
        display: block;
        width: 100%;
    }

    .member-list-heading {
        padding: 8px;
        font-size: 14px;
    }

    /* Member rows - stack vertically on mobile */
    .member-row.with-status,
    .member-row.with-checkboxes {
        display: block;
        grid-template-columns: none;
    }

    .member-info,
    .attributed-provider,
    .status-container,
    .status-cell,
    .checkbox-container {
        width: 100%;
        border-bottom: 1px solid #ddd !important;
        padding: 15px !important;
    }

    .member-info:last-child,
    .attributed-provider:last-child,
    .status-container:last-child,
    .status-cell:last-child,
    .checkbox-container:last-child {
        border-bottom: none !important;
    }

    /* Add labels for better mobile readability */
    .member-info::before {
        content: "Member Information";
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: var(--header-background);
    }

    .attributed-provider::before {
        content: "Attributed Provider";
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: var(--header-background);
    }

    .status-container::before {
        content: "Status";
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: var(--header-background);
    }

    .order-checkbox::before {
        content: "Order Action";
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: var(--header-background);
    }

    .optout-checkbox::before {
        content: "Opt Out Action";
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: var(--header-background);
    }

    .order-checkbox,
    .optout-checkbox {
        padding-top: 15px;
        padding-left: 15px;
    }

    /* Pagination */
    .pagination-container {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .display-per-page-container {
        grid-column: 1;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-select-container {
        grid-column: 1;
    }

    #items-per-page,
    #page-select {
        min-width: 80px;
    }

    /* Sub-header */
    .sub-header-links {
        font-size: 16px;
        flex-wrap: wrap;
    }

    .active-link,
    .inactive-link {
        margin-right: 15px;
        margin-bottom: 5px;
    }

    /* Order page adjustments */
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .order-header-text {
        margin-left: 0;
        font-size: 18px;
    }

    .attest-name-container,
    .attest-confirm-container,
    .order-members-container {
        padding: 15px;
    }

    .attest-name-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .attest-your-name-box {
        width: 100%;
        min-width: auto;
    }

    .attest-buttons-row {
        flex-direction: column;
        gap: 12px;
    }

    .confirm-order-btn,
    .cancel-order-btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    /* Opt-out page adjustments */
    .optout-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .optout-header-title {
        font-size: 24px;
        margin-left: 0;
        text-align: center;
        width: 100%;
    }

    .optout-header-actions {
        width: 100%;
        flex-direction: column;
    }

    .optout-btn,
    .optout-cancel-btn {
        width: 100%;
        margin-right: 0;
        padding: 12px;
        font-size: 16px;
    }

    .optout-members-headings,
    .optout-members-row {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 10px;
    }

    .optout-members-heading {
        padding-right: 0;
        font-size: 16px;
    }

    .optout-member-info::before {
        content: "Member Information";
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: var(--header-background);
    }

    .optout-attributed-provider::before {
        content: "Attributed Provider";
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: var(--header-background);
    }

    .optout-request-date::before {
        content: "Request Date";
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: var(--header-background);
    }

    .optout-checkbox-cell::before {
        content: "Action";
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: var(--header-background);
    }

    /* Status page adjustments */
    .status-header {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .status-text {
        font-size: 18px;
    }

    .download-excel-btn {
        margin-right: 0;
        width: 100%;
        max-width: 200px;
    }

    .status-header-actions {
        justify-content: center;
        flex-wrap: wrap;
        margin-right: 0;
    }

    .remove-optout-btn {
        width: 100%;
        max-width: 200px;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
        padding: 20px;
        min-width: 280px;
        max-width: calc(100vw - 20px);
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-message {
        font-size: 14px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }

    .modal-yes-btn,
    .modal-no-btn {
        width: 100%;
        padding: 12px;
    }

    /* Warning message */
    .warning-message {
        margin-top: 15px;
        padding: 12px;
        font-size: 14px;
    }

    /* Ensure all tables can scroll horizontally if needed */
    .member-list-table {
        overflow-x: auto;
    }

    /* Make sure dropdown works on mobile */
    .combobox-list {
        width: 100%;
    }

    ul[role="listbox"] {
        max-width: 100%;
        left: 0;
        right: 0;
    }

    /* Back button adjustments */
    .back-button {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Ensure no elements cause horizontal overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hide table headers on mobile since we're stacking */
    .member-list-headings {
        display: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) and (min-width: 481px) {
    body {
        margin: 20px;
    }

    .header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .campaign-info {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        padding: 0;
        margin-bottom: 8px;
    }

    .right-icons {
        gap: 20px;
    }

    .members-list-header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .action-buttons {
        gap: 15px;
    }

    .filter-dropdown-panel {
        width: 80vw;
    }

    /* Legacy filter - tablet */
    .filter-elements {
        gap: 15px;
    }

    .filter-element {
        flex: 1 1 calc(50% - 7.5px);
        max-width: calc(50% - 7.5px);
    }

    .filter-button-container {
        flex: 1 1 100%;
    }

    .pagination-container {
        gap: 15px;
    }

    .member-list-row {
        grid-template-columns: 1fr 1fr;
    }

    .member-row.with-status {
        grid-template-columns: 1fr 1fr 0.5fr 0.5fr;
    }

    .member-row.with-checkboxes {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}
