.qlc-participants {
    color: var(--qlc-participant-text, #25282b);
    width: 100%;
    margin: 18px 0 20px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 14px;
    background: var(--qlc-participant-background, #fff);
    box-sizing: border-box;
}
.qlc-participants-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.qlc-participants-heading > div { display: flex; flex-direction: column; gap: 3px; }
.qlc-participants-heading strong { font-size: 18px; line-height: 1.25; }
.qlc-participants-heading > div > span { font-size: 13px; opacity: .68; }
.qlc-participant-progress {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--qlc-participant-surface, #f5f5f2);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}
.qlc-participant-progress.is-complete { background: rgba(72,214,41,.12); color: var(--qlc-participant-success, #267a20); }
.qlc-participant-table-wrap { width: 100%; overflow-x: auto; }
.qlc-participant-table { min-width: 760px; }
.qlc-participant-table.has-personal-id { min-width: 930px; }
.qlc-participant-table-head,
.qlc-participant {
    display: grid;
    grid-template-columns: 42px minmax(120px, .85fr) minmax(120px, .85fr) minmax(190px, 1.35fr) 36px;
    gap: 9px;
    align-items: center;
}
.qlc-participant-table.has-personal-id .qlc-participant-table-head,
.qlc-participant-table.has-personal-id .qlc-participant {
    grid-template-columns: 42px minmax(115px, .8fr) minmax(115px, .8fr) minmax(180px, 1.25fr) minmax(145px, .9fr) 36px;
}
.qlc-participant-table-head {
    padding: 0 8px 7px;
    border-bottom: 1px solid rgba(0,0,0,.10);
    font-size: 11px;
    font-weight: 700;
    color: rgba(0,0,0,.58);
    text-transform: uppercase;
    letter-spacing: .035em;
}
.qlc-participant {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(0,0,0,.075);
    background: var(--qlc-participant-background, #fff);
}
.qlc-participant:last-child { border-bottom: 0; }
.qlc-participant-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--qlc-participant-surface, #faf0e2);
    color: var(--qlc-participant-text, #7a4400);
    font-size: 12px;
    font-weight: 750;
}
.qlc-participant label { margin: 0; min-width: 0; }
.qlc-participant input {
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 7px;
    background: var(--qlc-participant-background, #fff);
    box-sizing: border-box;
    font-size: 13px;
}
.qlc-participant input:focus,
.qlc-booking-information textarea:focus {
    border-color: var(--qlc-participant-primary, #fb9209);
    outline: 2px solid rgba(251,146,9,.15);
    outline-offset: 0;
}
.qlc-mobile-label { display: none; }
.qlc-participant-state {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
}
.qlc-participant-state > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d6d6d2;
    box-shadow: 0 0 0 4px rgba(0,0,0,.035);
}
.qlc-participant-state.is-complete > span {
    background: var(--qlc-participant-success, #48D629);
    box-shadow: 0 0 0 4px rgba(72,214,41,.12);
}
.qlc-participant-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.qlc-participant-pager[hidden] { display: none !important; }
.qlc-participant-pager > span { min-width: 86px; text-align: center; font-size: 12px; font-weight: 650; }
.qlc-participant-pager .button { min-height: 34px; padding: 4px 10px; }
.qlc-booking-information {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,.09);
}
.qlc-booking-information > span { font-size: 13px; font-weight: 700; }
.qlc-booking-information > span small { margin-left: 4px; font-size: 11px; font-weight: 500; opacity: .55; }
.qlc-booking-information textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 10px 11px;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 8px;
    box-sizing: border-box;
}
.qlc-participant-validation { margin: 12px 0 0; font-size: 12px; color: var(--qlc-participant-danger, #9b2c2c); }
.qlc-participant-validation.is-valid { color: var(--qlc-participant-success, #267a20); }
.qlc-cart-editor .qlc-participant-validation.is-quantity-adjustment {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(216,48,52,.24);
    border-left: 4px solid var(--qlc-participant-danger, #d83034);
    border-radius: 9px;
    background: rgba(216,48,52,.06);
    color: var(--qlc-participant-danger, #d83034);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
}
.qlc-cart-editor .qlc-participant-validation.is-incomplete,
.qlc-cart-editor .qlc-participant-validation.is-conflict {
    font-size: 14px;
    line-height: 1.5;
}
.single_add_to_cart_button.qlc-add-disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 760px) {
    .qlc-participants { padding: 15px; }
    .qlc-participants-heading { flex-direction: column; gap: 8px; }
    .qlc-participant-table-wrap { overflow: visible; }
    .qlc-participant-table,
    .qlc-participant-table.has-personal-id { min-width: 0; }
    .qlc-participant-table-head { display: none; }
    .qlc-participant,
    .qlc-participant-table.has-personal-id .qlc-participant {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
        padding: 12px 12px 12px 48px;
        border: 1px solid rgba(0,0,0,.09);
        border-left: 3px solid var(--qlc-participant-primary, #fb9209);
        border-radius: 9px;
        background: var(--qlc-participant-surface, #fafaf8);
    }
    .qlc-participant-number { position: absolute; left: 10px; top: 12px; }
    .qlc-participant-state { position: absolute; right: 8px; top: 8px; }
    .qlc-participant label { display: flex; flex-direction: column; gap: 4px; }
    .qlc-mobile-label { display: block; font-size: 11px; font-weight: 700; opacity: .68; }
    .qlc-participant-pager { justify-content: space-between; }
}

/* 1.0.11: keep participant pagination state stable and status heading on one line. */
.qlc-participant[hidden] { display: none !important; }
.qlc-participant-table-head > span:last-child {
    white-space: nowrap;
    text-align: center;
}
.qlc-participant-state { justify-self: center; }
.qlc-participant-pager .qlc-pager-button {
    appearance: none;
    min-height: 34px;
    padding: 4px 12px;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 7px;
    background: var(--qlc-participant-background, #fff);
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
}
.qlc-participant-pager .qlc-pager-button:hover:not(:disabled) {
    border-color: var(--qlc-participant-primary, #fb9209);
}
.qlc-participant-pager .qlc-pager-button:focus-visible {
    border-color: var(--qlc-participant-primary, #fb9209);
    outline: 2px solid rgba(251,146,9,.15);
    outline-offset: 1px;
}
.qlc-participant-pager .qlc-pager-button:disabled {
    opacity: .45;
    cursor: default;
}

@media (min-width: 761px) {
    .qlc-participant-table { min-width: 790px; }
    .qlc-participant-table.has-personal-id { min-width: 960px; }
    .qlc-participant-table-head,
    .qlc-participant {
        grid-template-columns: 42px minmax(120px, .85fr) minmax(120px, .85fr) minmax(190px, 1.35fr) 64px;
    }
    .qlc-participant-table.has-personal-id .qlc-participant-table-head,
    .qlc-participant-table.has-personal-id .qlc-participant {
        grid-template-columns: 42px minmax(115px, .8fr) minmax(115px, .8fr) minmax(180px, 1.25fr) minmax(145px, .9fr) 64px;
    }
}

/* 1.0.20: editable participant list in the WooCommerce cart. */
.qlc-cart-participant-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 7px;
    padding: 0;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 7px;
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-text, #222);
    vertical-align: middle;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.qlc-cart-participant-edit:hover {
    border-color: var(--qlc-participant-primary, #fb9209);
    background: #fff8ee;
    transform: translateY(-1px);
}
.qlc-cart-participant-edit:focus-visible {
    border-color: var(--qlc-participant-primary, #fb9209);
    outline: 2px solid rgba(251,146,9,.18);
    outline-offset: 1px;
}
.qlc-cart-participant-edit svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.qlc-cart-editor[hidden] { display: none !important; }
.qlc-cart-editor {
    color: var(--qlc-participant-text, #25282b);
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.qlc-cart-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14,17,20,.52);
    backdrop-filter: blur(2px);
}
.qlc-cart-editor-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 30px 32px 26px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 18px;
    background: var(--qlc-participant-background, #fff);
    box-shadow: 0 26px 70px rgba(0,0,0,.22);
    box-sizing: border-box;
    outline: none;
}
.qlc-cart-editor-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(100deg, var(--qlc-participant-primary, #fb9209) 0%, var(--qlc-participant-primary, #fb9209) 45%, var(--qlc-participant-success, #48d629) 55%, var(--qlc-participant-success, #48d629) 100%);
}
.qlc-cart-editor-close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 50%;
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-text, #25282b);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.qlc-cart-editor-close:hover { border-color: var(--qlc-participant-primary, #fb9209); }
.qlc-cart-editor-header {
    padding-right: 46px;
    margin-bottom: 20px;
}
.qlc-cart-editor-header > span {
    display: block;
    margin-bottom: 8px;
    color: var(--qlc-participant-danger, #d83034);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.qlc-cart-editor-header h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}
.qlc-cart-editor-header p {
    margin: 8px 0 0;
    color: var(--qlc-participant-text, #25282b);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}
.qlc-cart-editor-loading {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border: 1px solid rgba(0,0,0,.09);
    border-radius: 12px;
    background: var(--qlc-participant-surface, #fafaf8);
    color: rgba(0,0,0,.65);
    text-align: center;
    box-sizing: border-box;
}
.qlc-cart-editor-loading[hidden],
.qlc-cart-editor-content[hidden] { display: none !important; }
.qlc-cart-editor-loading.is-error { color: var(--qlc-participant-danger, #9b2c2c); background: #fff8f8; }
.qlc-cart-editor-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.qlc-cart-editor .qlc-participant-table-wrap {
    border: 1px solid rgba(0,0,0,.09);
    border-radius: 11px;
    overflow-x: auto;
}
.qlc-cart-editor .qlc-participant-table-head { padding-top: 10px; }
.qlc-cart-editor .qlc-participant:last-child { border-bottom: 0; }
.qlc-cart-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.09);
}
.qlc-cart-editor-secondary,
.qlc-cart-editor-save {
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.qlc-cart-editor-secondary {
    border: 1px solid rgba(0,0,0,.15);
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-text, #25282b);
}
.qlc-cart-editor-save {
    border: 1px solid var(--qlc-participant-primary, #fb9209);
    background: var(--qlc-participant-primary, #fb9209);
    color: #1d160d;
}
.qlc-cart-editor-save:disabled {
    opacity: .48;
    cursor: not-allowed;
}
.qlc-cart-editor-save.is-loading { cursor: wait; }
body.qlc-cart-editor-open { overflow: hidden; }

@media (max-width: 760px) {
    .qlc-cart-editor { padding: 10px; }
    .qlc-cart-editor-dialog {
        max-height: calc(100vh - 20px);
        padding: 24px 15px 18px;
        border-radius: 13px;
    }
    .qlc-cart-editor-accent { border-radius: 13px 13px 0 0; }
    .qlc-cart-editor-header { padding-right: 38px; }
    .qlc-cart-editor-header h2 { font-size: 22px; }
    .qlc-cart-editor .qlc-participant-table-wrap { overflow: visible; border: 0; }
    .qlc-cart-editor-actions { position: sticky; bottom: -18px; margin-left: -15px; margin-right: -15px; padding: 14px 15px 18px; background: var(--qlc-participant-background, #fff); }
    .qlc-cart-editor-secondary,
    .qlc-cart-editor-save { flex: 1 1 0; }
}

/* 1.0.21: WooCommerce Blocks cart participant editor. */
.qlc-cart-participant-edit {
    width: auto;
    min-width: 30px;
    height: 32px;
    gap: 6px;
    padding: 0 9px;
    border-radius: 7px;
    line-height: 1;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.qlc-cart-participant-edit-label {
    display: inline-block;
    white-space: nowrap;
}
.qlc-cart-participant-edit-block {
    margin: 6px 0 2px 0;
}
.qlc-cart-editor-summary {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.qlc-cart-editor-add {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 7px;
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-text, #25282b);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.qlc-cart-editor-add:hover,
.qlc-cart-editor-add:focus-visible {
    border-color: var(--qlc-participant-primary, #fb9209);
    background: #fff8ee;
}
.qlc-cart-editor-add:disabled {
    opacity: .48;
    cursor: not-allowed;
    border-color: rgba(0,0,0,.12);
    background: var(--qlc-participant-surface, #fafaf8);
}
.qlc-cart-editor-capacity-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(216, 48, 52, .24);
    border-left: 3px solid var(--qlc-participant-danger, #d83034);
    border-radius: 8px;
    background: rgba(216, 48, 52, .06);
    color: var(--qlc-participant-danger, #d83034);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.qlc-cart-editor-capacity-notice[hidden] { display: none !important; }
.qlc-cart-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--qlc-participant-danger, #d83034);
    border-radius: 7px;
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-danger, #9b2c2c);
    cursor: pointer;
    justify-self: center;
}
.qlc-cart-editor-remove:hover:not(:disabled),
.qlc-cart-editor-remove:focus-visible:not(:disabled) {
    border-color: var(--qlc-participant-danger, #d83034);
    background: var(--qlc-participant-surface, #fff5f5);
}
.qlc-cart-editor-remove:disabled {
    opacity: .28;
    cursor: default;
}
.qlc-cart-editor-remove svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.qlc-cart-editor-other[hidden] { display: none !important; }

@media (min-width: 761px) {
    .qlc-cart-editor .qlc-participant-table { min-width: 870px; }
    .qlc-cart-editor .qlc-participant-table.has-personal-id { min-width: 1040px; }
    .qlc-cart-editor .qlc-participant-table-head,
    .qlc-cart-editor .qlc-participant {
        grid-template-columns: 42px minmax(120px,.85fr) minmax(120px,.85fr) minmax(190px,1.35fr) 64px 64px;
    }
    .qlc-cart-editor .qlc-participant-table.has-personal-id .qlc-participant-table-head,
    .qlc-cart-editor .qlc-participant-table.has-personal-id .qlc-participant {
        grid-template-columns: 42px minmax(115px,.8fr) minmax(115px,.8fr) minmax(180px,1.25fr) minmax(145px,.9fr) 64px 64px;
    }
    .qlc-cart-editor .qlc-participant-table-head > span:nth-last-child(-n+2) {
        white-space: nowrap;
        text-align: center;
    }
}

@media (max-width: 760px) {
    .qlc-cart-participant-edit-label { display: inline-block; }
    .qlc-cart-editor-summary {
        align-items: stretch;
        flex-direction: column-reverse;
    }
    .qlc-cart-editor-add { align-self: flex-start; }
    .qlc-cart-editor .qlc-cart-editor-row {
        padding-right: 12px;
        padding-bottom: 54px;
    }
    .qlc-cart-editor .qlc-participant-state {
        top: 2px;
        right: 8px;
    }
    .qlc-cart-editor-remove {
        position: absolute;
        left: 10px;
        right: auto;
        bottom: 10px;
    }
}

/* 1.0.23: participant editing is available from both Cart and Checkout blocks. */
.qlc-checkout-participant-edit-block {
    margin: 7px 0 2px;
}
.wc-block-components-order-summary-item .qlc-cart-participant-edit {
    display: inline-flex;
    width: auto;
}

/* 1.0.26: choose participants explicitly when reducing product-page quantity. */
.qlc-product-reduction-editor .qlc-cart-editor-header p { max-width: 760px; }
.qlc-product-reduction-editor .qlc-participant-table-wrap { border: 1px solid rgba(0,0,0,.09); border-radius: 11px; overflow-x: auto; }
.qlc-product-reduction-editor .qlc-participant-table-head { padding-top: 10px; }
.qlc-product-reduction-editor .qlc-participant:last-child { border-bottom: 0; }
.qlc-product-reduction-editor .qlc-participant-validation { min-height: 18px; }
@media (min-width: 761px) {
    .qlc-product-reduction-editor .qlc-participant-table { min-width: 870px; }
    .qlc-product-reduction-editor .qlc-participant-table.has-personal-id { min-width: 1040px; }
    .qlc-product-reduction-editor .qlc-participant-table-head,
    .qlc-product-reduction-editor .qlc-participant { grid-template-columns: 42px minmax(120px,.85fr) minmax(120px,.85fr) minmax(190px,1.35fr) 64px 64px; }
    .qlc-product-reduction-editor .qlc-participant-table.has-personal-id .qlc-participant-table-head,
    .qlc-product-reduction-editor .qlc-participant-table.has-personal-id .qlc-participant { grid-template-columns: 42px minmax(115px,.8fr) minmax(115px,.8fr) minmax(180px,1.25fr) minmax(145px,.9fr) 64px 64px; }
}
@media (max-width: 760px) {
    .qlc-product-reduction-editor .qlc-participant-table-wrap { overflow: visible; border: 0; }
    .qlc-product-reduction-editor .qlc-participant { padding-right: 48px; }
    .qlc-product-reduction-editor .qlc-cart-editor-remove { position: absolute; right: 8px; bottom: 10px; }
}

/* Teacher-led course opportunity filter */
.qlc-course-filter {
    color: var(--qlc-participant-text, #25282b);
    width: 100%;
    margin: 18px 0 20px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 14px;
    background: var(--qlc-participant-background, #fff);
    box-sizing: border-box;
}
.qlc-course-filter-heading { margin-bottom: 16px; }
.qlc-course-filter-heading > div { display: flex; flex-direction: column; gap: 4px; }
.qlc-course-filter-heading strong { font-size: 17px; line-height: 1.3; }
.qlc-course-filter-heading span { font-size: 13px; opacity: .72; }
.qlc-course-filter-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}
.qlc-course-filter-fields label { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.qlc-course-filter-fields label > span { font-size: 13px; font-weight: 650; }
.qlc-course-filter-fields select {
    width: 100%;
    min-height: 44px;
    margin: 0;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 9px;
    background: var(--qlc-participant-background, #fff);
    color: var(--qlc-participant-text, #25282b);
    box-sizing: border-box;
}
.qlc-course-filter-fields select:focus {
    border-color: var(--qlc-participant-primary, #fb9209);
    outline: 2px solid rgba(251, 146, 9, .18);
    outline-offset: 1px;
}
.qlc-course-filter-fields select:disabled { opacity: .58; cursor: not-allowed; }
.qlc-course-schedule {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: var(--qlc-participant-surface, #fafaf8);
}
.qlc-course-schedule-heading { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.qlc-course-schedule-list { display: flex; flex-direction: column; }
.qlc-course-schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(95px, .7fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,.08);
    font-size: 13px;
}
.qlc-course-schedule-row:first-child { border-top: 0; padding-top: 2px; }
.qlc-course-schedule-date { font-weight: 600; }
.qlc-course-schedule-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qlc-course-schedule-location { opacity: .74; text-align: right; }
.qlc-course-filter-validation,
.qlc-course-filter-empty {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.45;
}
.qlc-course-filter-validation { color: var(--qlc-participant-danger, #d83034); }
.qlc-course-filter-validation.is-valid { color: var(--qlc-participant-success, #48d629); }
.qlc-course-filter-empty { color: var(--qlc-participant-danger, #d83034); }

/* Keep vacancy validation below the quantity/add-to-cart controls.
   The message is rendered after the WooCommerce button and JS mirrors the
   controls' flex/grid order so themes cannot pull it back up beside stock. */
.qlc-course-quantity-validation {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    margin: 8px 0 10px !important;
    padding: 0 !important;
    text-align: left !important;
    color: var(--qlc-participant-danger, #d83034) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}
.qlc-course-quantity-validation[hidden] { display: none !important; }

form.cart input.qty.qlc-quantity-invalid,
.woocommerce div.product form.cart input.qty.qlc-quantity-invalid,
.woocommerce-page div.product form.cart input.qty.qlc-quantity-invalid {
    border-color: var(--qlc-participant-danger, #d83034) !important;
}

@media (max-width: 760px) {
    .qlc-course-filter { padding: 16px; }
    .qlc-course-filter-fields { grid-template-columns: 1fr; gap: 12px; }
    .qlc-course-schedule-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
    .qlc-course-schedule-location { grid-column: 1 / -1; text-align: left; }
}


/* 1.0.54: keep QL cart/editor controls on the configured plugin palette. */
.qlc-has-cart-items .wc-block-components-quantity-selector__button,
.qlc-has-cart-items .wc-block-cart-item__remove-link,
.qlc-has-cart-items .wc-block-cart__submit-button,
.qlc-has-cart-items .wc-block-components-checkout-place-order-button,
.qlc-has-cart-items a.checkout-button {
    transition: filter .15s ease, opacity .15s ease;
}
.qlc-has-cart-items .wc-block-components-quantity-selector__button {
    background: var(--qlc-participant-primary, #fb9209) !important;
    color: #1d160d !important;
    border-color: var(--qlc-participant-primary, #fb9209) !important;
}
.qlc-has-cart-items .wc-block-cart-item__remove-link {
    color: var(--qlc-participant-danger, #d83034) !important;
}
.qlc-has-cart-items .wc-block-cart__submit-button,
.qlc-has-cart-items .wc-block-components-checkout-place-order-button,
.qlc-has-cart-items a.checkout-button {
    background: var(--qlc-participant-primary, #fb9209) !important;
    border-color: var(--qlc-participant-primary, #fb9209) !important;
    color: #1d160d !important;
}
.qlc-has-cart-items .wc-block-cart__submit-button:hover,
.qlc-has-cart-items .wc-block-components-checkout-place-order-button:hover,
.qlc-has-cart-items a.checkout-button:hover,
.qlc-has-cart-items .wc-block-components-quantity-selector__button:hover {
    filter: brightness(.96);
}
.qlc-cart-editor .qlc-cart-editor-save,
.qlc-product-reduction-editor .qlc-cart-editor-save {
    background: var(--qlc-participant-primary, #fb9209) !important;
    border-color: var(--qlc-participant-primary, #fb9209) !important;
    color: #1d160d !important;
}
.qlc-cart-editor .qlc-cart-editor-secondary,
.qlc-cart-editor .qlc-cart-editor-add,
.qlc-cart-editor .qlc-cart-editor-close,
.qlc-cart-editor .qlc-pager-button {
    background: var(--qlc-participant-background, #fff) !important;
    color: var(--qlc-participant-text, #25282b) !important;
}
.qlc-cart-editor .qlc-cart-editor-remove {
    background: var(--qlc-participant-background, #fff) !important;
    color: var(--qlc-participant-danger, #d83034) !important;
    border-color: var(--qlc-participant-danger, #d83034) !important;
}
.qlc-block-cart-opportunity-count {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(0,0,0,.1);
    font-size: .875em;
}
.qlc-block-cart-opportunity-count .wc-block-components-totals-item__label,
.qlc-block-cart-opportunity-count .wc-block-components-totals-item__value {
    font-weight: 600;
}

/* 1.0.55: make the product-page participant form adapt to the actual content width.
 * Some themes render the product summary in a narrow column even on desktop.
 * In those layouts the previous fixed table min-width caused a horizontal scrollbar.
 */
.qlc-participants {
    container-type: inline-size;
    container-name: qlc-participants-layout;
}

@container qlc-participants-layout (max-width: 940px) {
    .qlc-participant-table-wrap {
        overflow: visible;
    }

    .qlc-participant-table,
    .qlc-participant-table.has-personal-id {
        min-width: 0;
        width: 100%;
    }

    .qlc-participant-table-head {
        display: none;
    }

    .qlc-participant,
    .qlc-participant-table.has-personal-id .qlc-participant {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-bottom: 10px;
        padding: 12px 42px 12px 48px;
        border: 1px solid rgba(0,0,0,.09);
        border-left: 3px solid var(--qlc-participant-primary, #fb9209);
        border-radius: 9px;
        background: var(--qlc-participant-surface, #fafaf8);
    }

    .qlc-participant-number {
        position: absolute;
        left: 10px;
        top: 12px;
    }

    .qlc-participant-state {
        position: absolute;
        right: 10px;
        top: 10px;
    }

    .qlc-participant label {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
    }

    .qlc-participant input {
        min-width: 0;
        max-width: 100%;
    }

    .qlc-mobile-label {
        display: block;
        font-size: 11px;
        font-weight: 700;
        opacity: .68;
    }
}

/* Fallback for browsers/themes where container queries are unavailable. */
@media (max-width: 1000px) {
    .qlc-participants .qlc-participant-table-wrap {
        overflow: visible;
    }

    .qlc-participants .qlc-participant-table,
    .qlc-participants .qlc-participant-table.has-personal-id {
        min-width: 0;
        width: 100%;
    }

    .qlc-participants .qlc-participant-table-head {
        display: none;
    }

    .qlc-participants .qlc-participant,
    .qlc-participants .qlc-participant-table.has-personal-id .qlc-participant {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-bottom: 10px;
        padding: 12px 42px 12px 48px;
        border: 1px solid rgba(0,0,0,.09);
        border-left: 3px solid var(--qlc-participant-primary, #fb9209);
        border-radius: 9px;
        background: var(--qlc-participant-surface, #fafaf8);
    }

    .qlc-participants .qlc-participant-number {
        position: absolute;
        left: 10px;
        top: 12px;
    }

    .qlc-participants .qlc-participant-state {
        position: absolute;
        right: 10px;
        top: 10px;
    }

    .qlc-participants .qlc-participant label {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
    }

    .qlc-participants .qlc-participant input {
        min-width: 0;
        max-width: 100%;
    }

    .qlc-participants .qlc-mobile-label {
        display: block;
        font-size: 11px;
        font-weight: 700;
        opacity: .68;
    }
}

/* 1.0.63: keep the product-page participant fields compact on wide layouts. */
@container qlc-participants-layout (min-width: 941px) {
    .qlc-participants > .qlc-participant-table-wrap {
        overflow-x: visible;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table {
        width: min(100%, 700px);
        min-width: 0;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id {
        width: min(100%, 835px);
        min-width: 0;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table-head,
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant {
        grid-template-columns: 34px minmax(105px, 135px) minmax(105px, 135px) minmax(175px, 230px) 32px;
        gap: 7px;
        justify-content: start;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant-table-head,
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant {
        grid-template-columns: 34px minmax(105px, 130px) minmax(105px, 130px) minmax(175px, 220px) minmax(135px, 165px) 32px;
        gap: 7px;
        justify-content: start;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant {
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant input {
        height: 36px;
        min-height: 36px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Fallback for browsers without container-query support. */
@supports not (container-type: inline-size) {
    @media (min-width: 1001px) {
        .qlc-participants > .qlc-participant-table-wrap { overflow-x: visible; }
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table { width: min(100%, 700px); min-width: 0; }
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id { width: min(100%, 835px); min-width: 0; }
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table-head,
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant { grid-template-columns: 34px minmax(105px, 135px) minmax(105px, 135px) minmax(175px, 230px) 32px; gap: 7px; justify-content: start; }
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant-table-head,
        .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant { grid-template-columns: 34px minmax(105px, 130px) minmax(105px, 130px) minmax(175px, 220px) minmax(135px, 165px) 32px; gap: 7px; justify-content: start; }
    }
}

/* 1.0.66: tighten the stacked participant cards on narrow product layouts.
 * Theme form styles often add margins around labels and inputs; reset those here
 * so the four participant fields stay compact without sacrificing readability.
 */
@container qlc-participants-layout (max-width: 940px) {
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant,
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant {
        gap: 5px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-participant label {
        gap: 2px;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-mobile-label {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-participant input {
        height: 34px;
        min-height: 34px;
        margin: 0 !important;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

@media (max-width: 1000px) {
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant,
    .qlc-participants > .qlc-participant-table-wrap .qlc-participant-table.has-personal-id .qlc-participant {
        gap: 5px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-participant label {
        gap: 2px;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-mobile-label {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2;
    }

    .qlc-participants > .qlc-participant-table-wrap .qlc-participant input {
        height: 34px;
        min-height: 34px;
        margin: 0 !important;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

/* 1.0.67: keep theme quantity controls outside the course-opportunity card. */
form.cart > .qlc-course-filter,
.woocommerce div.product form.cart > .qlc-course-filter,
.woocommerce-page div.product form.cart > .qlc-course-filter {
    display: block;
    float: none !important;
    clear: both !important;
    position: relative;
    width: 100% !important;
    max-width: 100%;
    overflow: visible;
}
form.cart > .qlc-course-filter::before,
form.cart > .qlc-course-filter::after {
    content: "";
    display: table;
    clear: both;
}
/* Quantity belongs to WooCommerce's purchase controls, never visually inside the QL card. */
.qlc-course-filter .quantity,
.qlc-course-filter > .quantity {
    float: none !important;
}


/* 1.0.70: isolate the cart participant action from aggressive theme button styles. */
.qlc-cart-participant-edit-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    float: none !important;
    position: static !important;
    margin: 7px 0 4px !important;
    padding: 0 !important;
    line-height: 1 !important;
}

button.qlc-cart-participant-edit,
.woocommerce button.qlc-cart-participant-edit,
.woocommerce-page button.qlc-cart-participant-edit,
.wc-block-cart button.qlc-cart-participant-edit,
.wc-block-components-order-summary button.qlc-cart-participant-edit {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    inset: auto !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    gap: 7px !important;
    border: 1px solid var(--qlc-participant-primary, #fb9209) !important;
    border-radius: 8px !important;
    background: var(--qlc-participant-background, #fff) !important;
    background-image: none !important;
    color: var(--qlc-participant-text, #25282b) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    overflow: visible !important;
    transform: none !important;
}

button.qlc-cart-participant-edit:hover,
button.qlc-cart-participant-edit:focus,
button.qlc-cart-participant-edit:focus-visible,
.woocommerce button.qlc-cart-participant-edit:hover,
.woocommerce button.qlc-cart-participant-edit:focus,
.woocommerce-page button.qlc-cart-participant-edit:hover,
.woocommerce-page button.qlc-cart-participant-edit:focus {
    border-color: var(--qlc-participant-primary, #fb9209) !important;
    background: color-mix(in srgb, var(--qlc-participant-primary, #fb9209) 9%, #fff) !important;
    color: var(--qlc-participant-text, #25282b) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
}

button.qlc-cart-participant-edit:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--qlc-participant-primary, #fb9209) 30%, transparent) !important;
    outline-offset: 2px !important;
}

button.qlc-cart-participant-edit svg {
    display: block !important;
    flex: 0 0 15px !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
}

button.qlc-cart-participant-edit .qlc-cart-participant-edit-label {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font: inherit !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

@media (max-width: 480px) {
    button.qlc-cart-participant-edit,
    .woocommerce button.qlc-cart-participant-edit,
    .woocommerce-page button.qlc-cart-participant-edit {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
}

/* Mandatory participant validation notice shown when checkout cannot continue. */
.qlc-participant-gate-notice {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 16px;
    padding: 13px 15px;
    border: 1px solid color-mix(in srgb, var(--qlc-participant-danger, #d83034) 38%, transparent);
    border-left: 4px solid var(--qlc-participant-danger, #d83034);
    border-radius: 8px;
    background: color-mix(in srgb, var(--qlc-participant-danger, #d83034) 7%, #fff);
    color: var(--qlc-participant-text, #25282b);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
}


/* Checkout participant gate: calm success state after all participants are complete. */
.qlc-participant-gate-notice.is-success {
    border-color: color-mix(in srgb, var(--qlc-participant-success, #48d629) 34%, #aeb9b1);
    border-left-color: color-mix(in srgb, var(--qlc-participant-success, #48d629) 56%, #3f6f50);
    background: color-mix(in srgb, var(--qlc-participant-success, #48d629) 9%, #ffffff);
    color: color-mix(in srgb, var(--qlc-participant-text, #25282b) 82%, #2f6b43);
}
