.rtba-wk-page {
    --rtba-wk-aside: 288px;
    --rtba-wk-card-bg: var(--wp--preset--color--schnee-light);
    --rtba-wk-nav-offset: 249px;
    padding-bottom: 120px;
}

.rtba-wk-hero {
    margin-bottom: 120px;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div {
    position: relative;
    margin-bottom: 96px;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child {
    margin-bottom: 48px;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > :not(h2),
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > :not(h2) {
    margin-left: var(--rtba-wk-aside);
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br {
    display: none;
}

.rtba-wk #uni-warenkorb-content h2 {
    margin: 0 0 32px;
    font-family: var(--wp--preset--font-family--author), serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.1;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk #uni-warenkorb-content .uni-warenkorb-headline {
    display: none !important;
}

/* Leer-Zustände: Text ist im Plugin fest, daher per CSS ersetzt */
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > label,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > label {
    display: block;
    width: auto;
    margin-top: 0;
    margin-bottom: 24px;
    padding: 32px;
    border: 1px solid var(--wp--preset--color--schnee-dark);
    font-size: 0;
    text-align: center;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > label::before,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > label::before {
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-size: 18px;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > label::before {
    content: "Du hast noch keinen Kurs im Warenkorb.";
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > label::before {
    content: "Du hast noch keinen Teilnehmer hinzugefügt.";
}

.rtba-wk #uni-warenkorb-content .btn-secondary,
.rtba-wk #uni-warenkorb-content .btn-secondary:hover,
.rtba-wk #uni-warenkorb-content .btn-secondary:focus,
.rtba-wk #uni-warenkorb-content .btn-secondary:active {
    gap: 8px;
    padding: 10px 20px;
    background: var(--wp--preset--color--karbon-40);
    border: none;
    color: var(--wp--preset--color--schnee-base);
    font-weight: 530;
    text-decoration: none;
}

.rtba-wk #uni-warenkorb-content .btn-primary:not(.btn--icon-only, .uni-warenkorb-participant .btn) {
    padding: 10px 20px;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > .row:not(.uni-warenkorb-headline) .btn,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > .row:not(.uni-warenkorb-headline) .btn:hover,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > .row .btn,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > .row .btn:hover {
    gap: 8px;
    padding: 10px 20px;
    background: var(--wp--preset--color--karbon-40);
    border: none !important;
    color: var(--wp--preset--color--schnee-base);
    font-weight: 530;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > .row:not(.uni-warenkorb-headline) .btn .fas {
    display: none;
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child > .row:not(.uni-warenkorb-headline) .btn::after,
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > br + div > .row .btn::after {
    content: "\f64d"; /* bi-plus-lg */
    font-family: bootstrap-icons !important;
    font-weight: 400;
}

/* "Weiter" / "Zur Bezahlung" */
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > .text-end {
    margin-left: var(--rtba-wk-aside);
    padding-top: 32px;
    border-top: 1px solid var(--wp--preset--color--schnee-dark);
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > .text-end > .btn-primary {
    background: var(--wp--preset--color--saphir-500);
    border-color: var(--wp--preset--color--saphir-500);
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > .text-end > .btn-primary:hover {
    background: var(--wp--preset--color--saphir-700);
    border-color: var(--wp--preset--color--saphir-700);
}

.rtba-wk #uni-warenkorb-content[data-page="list"] > div > .text-end > .btn-primary::after {
    content: "\f138"; /* bi-arrow-right */
    font-family: bootstrap-icons !important;
    font-weight: 400;
}

.rtba-wk .uni-warenkorb-items-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

/* Kein positionierter Vorfahr zwischen Karte und Abschnitt, sonst sitzt die Summe falsch */
.rtba-wk .uni-warenkorb-items-list,
.rtba-wk .uni-warenkorb-item,
.rtba-wk .uni-warenkorb-item > .row,
.rtba-wk .rtba-wk-kurs {
    position: static;
}

.rtba-wk .uni-warenkorb-item,
.rtba-wk .uni-warenkorb-item:nth-child(odd) {
    padding: 32px;
    background-color: var(--rtba-wk-card-bg);
    box-shadow: inset 0 0 0 1px var(--wp--preset--color--karbon-lighter);
}

.rtba-wk .uni-warenkorb-item > .row {
    margin: 0;
}

.rtba-wk .uni-warenkorb-item > .row > * {
    padding: 0;
}

.rtba-wk-kurs {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "head   actions"
        "bottom bottom";
    column-gap: 24px;
    row-gap: 38px;
}

.rtba-wk-kurs__head {
    grid-area: head;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rtba-wk-kurs__head > .rtba-wk-kurs__badges {
    min-height: 48px;
}

.rtba-wk-kurs__badges,
.rtba-wk-kurs__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.rtba-wk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 17px 5px;
    border-radius: 999px;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-badge--availability {
    padding-left: 9px;
    border: 1px solid var(--wp--preset--color--schnee-dark);
}

.rtba-wk-badge--date {
    border: 1px solid var(--wp--preset--color--schnee-dark);
    font-weight: 900;
    font-size: 12px;
}

.rtba-wk-badge--tag {
    background-color: var(--wp--preset--color--schnee-white);
    border: 1px solid var(--wp--preset--color--schnee-medium);
}

.rtba-wk-badge__icon {
    flex-shrink: 0;
}

.rtba-wk-badge__dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background-color: #4ABF40;
}

.rtba-wk-badge__dot--few {
    background-color: #FFBA08;
}

.rtba-wk-badge__dot--full {
    background-color: #E72A2A;
}

.rtba-wk-badge__dot--none {
    background-color: var(--wp--preset--color--karbon-3);
}

.rtba-wk-kurs__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--author), serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.15 !important; /* style.css setzt h3 mit !important */
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-kurs__title a {
    color: inherit;
    text-decoration: none;
}

.rtba-wk-kurs__title a:hover {
    text-decoration: underline;
}

.rtba-wk-kurs__bottom {
    grid-area: bottom;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rtba-wk-kurs__actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rtba-wk-kurs__action-label {
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wp--preset--color--karbon-40);
}

.rtba-wk-price {
    display: inline-block;
    padding: 4px 18px 6px;
    border-radius: 999px;
    background-color: var(--wp--preset--color--karbon);
    color: var(--wp--preset--color--schnee-base);
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
}

.rtba-wk-price--large {
    padding: 4px 18px;
    font-size: 18px;
}

/* Module: eigene Grid-Zeile nur wenn vorhanden, sonst doppelter row-gap */
.rtba-wk-kurs:not(.rtba-wk-kurs--summary):has(> .rtba-wk-kurs__modules) {
    grid-template-areas:
        "head    actions"
        "bottom  bottom"
        "modules modules";
}

.rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules {
    grid-area: modules;
    font-family: var(--wp--preset--font-family--satoshi), serif;
}

.rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .uni-warenkorb-modul {
    align-items: flex-start;
    margin-top: 12px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
}

.rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .uni-warenkorb-modul:first-child {
    margin-top: 0;
}

.rtba-wk-kurs__modules .rtba-wk-kurs__module-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: inherit;
}

.rtba-wk-kurs__module-price {
    flex-shrink: 0;
    white-space: nowrap;
}

.rtba-wk-group-prices {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: end;
    gap: 8px 16px;
    margin: 0;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-group-prices dt {
    font-weight: 500;
    text-align: right;
}

.rtba-wk-group-prices dd {
    justify-self: end;
    margin: 0;
}

.rtba-wk-group-prices--module {
    flex-shrink: 0;
    gap: 0 16px;
    font-size: inherit;
}

.rtba-wk-group-prices--module dt {
    font-weight: 400;
}

/* Pflichtmodule bzw. noch nicht wählbare Zusatzmodule */
.rtba-wk-check:has(.rtba-wk-check__input:disabled) {
    cursor: default;
}

.rtba-wk-check__input:disabled + .rtba-wk-check__box {
    opacity: 0.5;
}

/* Summe: hängt in der letzten Karte, sitzt aber unter "Kurse hinzufügen" */
.rtba-wk #uni-warenkorb-content[data-page="list"] > div > div:first-child:has(.rtba-wk-summe) {
    padding-bottom: 116px;
}

.rtba-wk-summe {
    position: absolute;
    left: var(--rtba-wk-aside);
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid var(--wp--preset--color--karbon-20);
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.5;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk .uni-warenkorb-participants-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.rtba-wk .uni-warenkorb-participant,
.rtba-wk .uni-warenkorb-participant:nth-child(odd) {
    padding: 32px;
    background-color: var(--rtba-wk-card-bg);
    box-shadow: inset 0 0 0 1px var(--wp--preset--color--karbon-lighter);
}

.rtba-wk .uni-warenkorb-participant > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk .uni-warenkorb-participant > .row > * {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(1),
.rtba-wk .uni-warenkorb-participant > .row > :nth-child(5) {
    display: none;
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(2) {
    order: 1;
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(4) {
    order: 2;
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(4)::before {
    content: "— ";
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(3) {
    order: 3;
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.rtba-wk .uni-warenkorb-participant > .row > :nth-child(2) br,
.rtba-wk .uni-warenkorb-participant > .row > :nth-child(4) br {
    display: none;
}

/* Gruppenpreise: Kurse je Teilnehmer und Teilnehmer-Summe aus dem Plugin.
   order-7/order-8 gibt es in Bootstrap 5 nicht; hinter den Buttons (order-lg-5, !important). */
.rtba-wk .uni-warenkorb-participant > .row > .order-7,
.rtba-wk .uni-warenkorb-participant > .row > .order-8 {
    flex: 0 0 100%;
    font-weight: 500;
    font-size: 14px;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 {
    order: 6;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--wp--preset--color--karbon-20);
}

.rtba-wk .uni-warenkorb-participant > .row > .order-8 {
    order: 7;
    margin-top: 8px;
    font-weight: 700;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .uni-warenkorb-items-list {
    gap: 8px;
    margin: 0;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .row > * {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .row > .col-1 {
    display: none;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .row > .text-end {
    flex: 0 0 auto;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .row > .col-12 {
    flex-basis: 100%;
}

.rtba-wk .uni-warenkorb-participant > .row > .order-7 .uni-warenkorb-modul .row > :first-child {
    padding-left: 16px;
    font-weight: 400;
}

.rtba-wk .uni-wk-participant-name {
    margin-right: 4px;
    font-family: var(--wp--preset--font-family--author), serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
}

.rtba-wk .uni-warenkorb-participant .btn {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 0 !important;
    padding: 0;
    justify-content: center;
    color: var(--wp--preset--color--schnee-base);
}

.rtba-wk .uni-warenkorb-participant .btn > span {
    display: none;
}

.rtba-wk .uni-warenkorb-participant .btn::before {
    font-family: bootstrap-icons !important;
    font-size: 20px;
    line-height: 1;
}

.rtba-wk .uni-warenkorb-participant .btn::after {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    color: var(--wp--preset--color--karbon-40);
}

.rtba-wk .uni-warenkorb-participant .btn-primary {
    background: var(--wp--preset--color--saphir-500);
    border-color: var(--wp--preset--color--saphir-500);
}

.rtba-wk .uni-warenkorb-participant .btn-primary:hover {
    background: var(--wp--preset--color--saphir-700);
    border-color: var(--wp--preset--color--saphir-700);
}

.rtba-wk .uni-warenkorb-participant .btn-primary::before {
    content: "\f4c9"; /* bi-pencil-fill */
}

.rtba-wk .uni-warenkorb-participant .btn-primary::after {
    content: "Bearbeiten";
}

.rtba-wk .uni-warenkorb-participant .btn-danger {
    background: var(--wp--preset--color--feuer-500);
    border-color: var(--wp--preset--color--feuer-500);
}

.rtba-wk .uni-warenkorb-participant .btn-danger:hover {
    background: var(--wp--preset--color--feuer-700);
    border-color: var(--wp--preset--color--feuer-700);
}

.rtba-wk .uni-warenkorb-participant .btn-danger::before {
    content: "\f659"; /* bi-x-lg */
}

.rtba-wk .uni-warenkorb-participant .btn-danger::after {
    content: "Löschen";
}

.rtba-wk-payment,
.rtba-wk-pform {
    --rtba-wk-payment-offset: max(0px, calc(100% - 768px));
    font-family: var(--wp--preset--font-family--satoshi), serif;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-payment__panel,
.rtba-wk-pform__panel {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-left: var(--rtba-wk-payment-offset);
    padding: 48px;
    background-color: var(--rtba-wk-card-bg);
}

.rtba-wk-payment__section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rtba-wk-payment__section:first-child {
    gap: 16px;
    padding: 16px 0;
}

.rtba-wk #uni-warenkorb-content .rtba-wk-payment__heading,
.rtba-wk #uni-warenkorb-content .rtba-wk-pform__heading {
    margin: 0;
    /* style.css setzt Überschriften mit !important */
    font-family: var(--wp--preset--font-family--satoshi), serif !important;
    font-weight: 900 !important;
    font-size: 20px;
    line-height: 1.5 !important;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-payment__text {
    margin: 0;
    font-size: 18px;
}

.rtba-wk-payment__hint {
    margin: 0;
    font-size: 14px;
}

.rtba-wk-payment__hint:empty {
    display: none;
}

.rtba-wk-payment__options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rtba-wk-radio,
.rtba-wk-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.rtba-wk-radio {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
}

.rtba-wk-radio__input,
.rtba-wk-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.rtba-wk-radio__mark {
    flex-shrink: 0;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border: 1px solid var(--wp--preset--color--karbon-20);
    border-radius: 999px;
    background-color: var(--wp--preset--color--schnee-white);
}

.rtba-wk-radio__input:checked + .rtba-wk-radio__mark {
    background-color: var(--wp--preset--color--schnee-white);
    box-shadow: inset 0 0 0 4px var(--wp--preset--color--saphir-500);
}

.rtba-wk-check {
    align-items: flex-start;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
}

.rtba-wk-payment .rtba-wk-check {
    font-weight: 700;
    font-size: 12px;
}

.rtba-wk-check__box {
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    margin-top: calc((1lh - 16px) / 2);
    border: 1px solid var(--wp--preset--color--karbon-20);
    background-color: var(--wp--preset--color--schnee-white);
}

.rtba-wk-check__input:checked + .rtba-wk-check__box {
    border-color: var(--wp--preset--color--saphir-500);
    background-color: var(--wp--preset--color--saphir-500);
}

.rtba-wk-check__input:checked + .rtba-wk-check__box::after {
    content: "\f633"; /* bi-check-lg */
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: bootstrap-icons !important;
    font-size: 12px;
    color: var(--wp--preset--color--schnee-white);
}

.rtba-wk-radio__input:focus-visible + .rtba-wk-radio__mark,
.rtba-wk-check__input:focus-visible + .rtba-wk-check__box {
    outline: 2px solid var(--wp--preset--color--saphir-500);
    outline-offset: 2px;
}

.rtba-wk-check.is-invalid .rtba-wk-check__box {
    border-color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-check.is-invalid .rtba-wk-check__text {
    color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-check__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rtba-wk-payment__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rtba-wk-field__input.form-control {
    height: 52px;
    border: 1px solid var(--wp--preset--color--schnee-dark);
    border-radius: 0;
    background-color: var(--wp--preset--color--schnee-white);
    font-size: 16px;
}

.rtba-wk-payment__footer,
.rtba-wk-pform__footer {
    display: flex;
    flex-direction: column;
}

.rtba-wk-payment__note,
.rtba-wk-pform__note {
    order: 2;
    margin: 0;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
}

.rtba-wk-payment__buttons,
.rtba-wk-pform__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 24px;
}

.rtba-wk .rtba-wk-payment__buttons .btn,
.rtba-wk .rtba-wk-pform__buttons .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--wp--preset--color--schnee-base);
}

.rtba-wk-payment__back,
.rtba-wk-pform__back {
    background: var(--wp--preset--color--feuer-500);
}

.rtba-wk-payment__back:hover,
.rtba-wk-payment__back:focus,
.rtba-wk-pform__back:hover,
.rtba-wk-pform__back:focus {
    background: var(--wp--preset--color--feuer-700);
    color: var(--wp--preset--color--schnee-base);
}

.rtba-wk-payment__next.btn-primary,
.rtba-wk-pform__save.btn-primary {
    background: var(--wp--preset--color--saphir-500);
}

.rtba-wk-payment__next.btn-primary:hover,
.rtba-wk-payment__next.btn-primary:focus,
.rtba-wk-pform__save.btn-primary:hover,
.rtba-wk-pform__save.btn-primary:focus {
    background: var(--wp--preset--color--saphir-700);
}

.rtba-wk-payment__error {
    margin: 0;
}

.rtba-wk-pform__eyebrow {
    margin: 0 0 16px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5;
    color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-pform__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rtba-wk-pform__fields > .rtba-wk-pform__heading,
.rtba-wk-pform__fields > .rtba-wk-field--full {
    grid-column: 1 / -1;
}

.rtba-wk #uni-warenkorb-content .rtba-wk-pform__fields > .rtba-wk-pform__heading:not(:first-child) {
    margin-top: 24px;
}

/* 'clear' aus der Felddefinition: nächstes Feld in neuer Zeile */
.rtba-wk-pform__clear {
    display: none;
}

.rtba-wk-pform__clear + * {
    grid-column-start: 1;
}

.rtba-wk-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rtba-wk-field__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rtba-wk-field__label,
.rtba-wk-pform .rtba-wk-field__label {
    margin: 0;
    padding: 0;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 18px;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-field__control {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--wp--preset--color--karbon-20);
    border-radius: 0;
    background-color: var(--wp--preset--color--schnee-white);
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-field__control::placeholder {
    color: rgba(34, 34, 34, 0.6);
    opacity: 1;
}

/* Leeres Datumsfeld grau wie ein Platzhalter */
.rtba-wk-field__control[type="date"]:invalid {
    color: rgba(34, 34, 34, 0.6);
}

.rtba-wk-field__control:focus {
    outline: 2px solid var(--wp--preset--color--saphir-500);
    outline-offset: -1px;
}

.rtba-wk-field__control:read-only:not(select),
.rtba-wk-field__control:disabled {
    background-color: var(--wp--preset--color--schnee-base);
}

.rtba-wk-field__control--select {
    padding-right: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.00071 8.26683L12.3008 2.9668L13.9507 4.61671L7.00071 11.5667L0.0507812 4.61671L1.7007 2.9668L7.00071 8.26683Z' fill='%23222222'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 17px center;
    background-size: 14px 14px;
    font-weight: 700;
    cursor: pointer;
}

.rtba-wk-field__control--textarea {
    height: 180px;
    resize: vertical;
}

.rtba-wk-field__desc {
    margin: 0;
    font-size: 12px;
    line-height: 18px;
}

.rtba-wk-field.is-invalid .rtba-wk-field__control {
    border-color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-field.is-invalid .rtba-wk-field__label {
    color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-field--radios {
    display: block;
    margin: 0;
    padding: 16px 0;
    border: 0;
}

/* float: sonst sitzt die legend im Rahmen und ignoriert das Padding des fieldset */
.rtba-wk-field--radios > .rtba-wk-field__label {
    float: left;
    width: 100%;
    margin-bottom: 16px;
}

.rtba-wk-field--radios > .rtba-wk-field__options {
    clear: left;
}

.rtba-wk-field__options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.rtba-wk-pform .rtba-wk-check {
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
}

.rtba-wk-pform .rtba-wk-check__text a {
    font-weight: 700;
}

/* "Warum brauchen wir das?" mit Bootstrap-Tooltip (init in assets/js/warenkorb.js) */
.rtba-wk-field__info {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 18px;
    color: var(--wp--preset--color--karbon-40);
    cursor: help;
}

.rtba-wk-field__info:hover,
.rtba-wk-field__info:focus-visible,
.rtba-wk-field__info[aria-describedby] {
    color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-tooltip.tooltip {
    padding: 7px 0;
}

.rtba-wk-tooltip.show {
    opacity: 1;
}

.rtba-wk-tooltip .tooltip-inner {
    width: 314px;
    max-width: calc(100vw - 32px);
    padding: 7px 16px 10px;
    border-radius: 4px;
    background-color: var(--wp--preset--color--karbon);
    color: var(--wp--preset--color--schnee-white);
    font-family: var(--wp--preset--font-family--satoshi), serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    text-align: left;
}

.rtba-wk-tooltip .tooltip-arrow {
    width: 14px;
    height: 7px;
}

.rtba-wk-tooltip.bs-tooltip-top .tooltip-arrow::before,
.rtba-wk-tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-width: 7px 7px 0;
    border-top-color: var(--wp--preset--color--karbon);
}

.rtba-wk-tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.rtba-wk-tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-width: 0 7px 7px;
    border-bottom-color: var(--wp--preset--color--karbon);
}

.rtba-wk-file {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 72px;
    margin: 0;
    padding: 12px;
    border: 1px dashed var(--wp--preset--color--karbon-40);
    background-color: var(--wp--preset--color--schnee-white);
    text-align: center;
    font-size: 16px;
    line-height: 24px;
    color: rgba(34, 34, 34, 0.8);
    cursor: pointer;
}

.rtba-wk-file__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rtba-wk-file__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rtba-wk-file:focus-within {
    outline: 2px solid var(--wp--preset--color--saphir-500);
    outline-offset: -1px;
}

.rtba-wk-file.is-selected {
    border-style: solid;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-file--filled {
    justify-content: space-between;
    gap: 12px;
    border-style: solid;
    cursor: default;
}

.rtba-wk-file--filled.is-invalid {
    border-color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-file__name {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-file__remove {
    flex-shrink: 0;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: var(--wp--preset--color--feuer-500);
    cursor: pointer;
}

.rtba-wk-checkout {
    font-family: var(--wp--preset--font-family--satoshi), serif;
    color: var(--wp--preset--color--karbon);
}

.rtba-wk-checkout__section + .rtba-wk-checkout__section {
    margin-top: 80px;
}

.rtba-wk #uni-warenkorb-content .rtba-wk-checkout__section > h2 {
    margin-bottom: 64px;
}

.rtba-wk-checkout__content {
    margin-left: var(--rtba-wk-aside);
}

.rtba-wk-checkout__empty {
    margin-top: 0;
    margin-bottom: 0;
    padding: 32px;
    border: 1px solid var(--wp--preset--color--schnee-dark);
    text-align: center;
    font-size: 18px;
}

/* Kurskarte ohne Löschen-Spalte */
.rtba-wk-kurs--summary {
    grid-template-columns: 1fr;
    grid-template-areas:
        "head"
        "bottom";
    row-gap: 24px;
}

.rtba-wk .uni-warenkorb-item.rtba-wk-kurs--summary {
    padding-top: 24px;
}

.rtba-wk-kurs--summary .rtba-wk-kurs__title {
    font-size: 24px;
    line-height: 1.3 !important;
}

.rtba-wk-kurs__modules {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rtba-wk-kurs__modules .uni-warenkorb-modul {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 0;
    font-size: 14px;
}

.rtba-wk-kurs__hint {
    margin: 0;
}

.rtba-wk .uni-warenkorb-participant.rtba-wk-person {
    padding: 32px;
}

.rtba-wk-person__line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5;
}

.rtba-wk-person .uni-wk-participant-name {
    margin-right: 0;
    font-size: 24px;
    line-height: 1.3;
}

.rtba-wk-person__invoice {
    margin: 12px 0 0;
    font-size: 14px;
}

.rtba-wk-person__costs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--wp--preset--color--karbon-20);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.rtba-wk-person__costs dd {
    justify-self: end;
    margin: 0;
    white-space: nowrap;
}

.rtba-wk-person__costs .rtba-wk-person__module {
    padding-left: 16px;
    font-weight: 400;
}

.rtba-wk-person__costs .rtba-wk-person__sum {
    align-self: center;
    font-weight: 700;
}

.rtba-wk-costs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    background-color: var(--rtba-wk-card-bg);
}

.rtba-wk-costs__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rtba-wk-costs__label {
    font-family: var(--wp--preset--font-family--author), serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
}

.rtba-wk-checkout__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--wp--preset--color--karbon-20);
}

.rtba-wk-checkout__actions .btn {
    padding: 10px 20px;
    border: none;
    color: var(--wp--preset--color--schnee-base);
}

.rtba-wk-checkout__back {
    background: var(--wp--preset--color--feuer-500);
    border-color: var(--wp--preset--color--feuer-500);
}

.rtba-wk-checkout__back:hover,
.rtba-wk-checkout__back:focus {
    background: var(--wp--preset--color--feuer-700);
    border-color: var(--wp--preset--color--feuer-700);
    color: var(--wp--preset--color--schnee-base);
}

.rtba-wk-checkout__submit.btn-primary {
    background: var(--wp--preset--color--saphir-500);
    border-color: var(--wp--preset--color--saphir-500);
}

.rtba-wk-checkout__submit.btn-primary:hover,
.rtba-wk-checkout__submit.btn-primary:focus {
    background: var(--wp--preset--color--saphir-700);
    border-color: var(--wp--preset--color--saphir-700);
}

/* Icon per CSS, weil checkoutButtonClicked() das innerHTML ersetzt */
.rtba-wk-checkout__submit::after {
    content: "\f6c0"; /* bi-send */
    font-family: bootstrap-icons !important;
    font-weight: 400;
    font-size: 18px;
}

.rtba-wk-checkout__submit.is-loading::after {
    display: none;
}

@media (max-width: 991.98px) {
    .rtba-wk-page {
        --rtba-wk-aside: 0px;
        --rtba-wk-nav-offset: 220px;
    }

    .rtba-wk-payment,
    .rtba-wk-pform {
        --rtba-wk-payment-offset: 0px;
    }

    .rtba-wk-payment__panel,
    .rtba-wk-pform__panel {
        padding: 32px 16px;
    }

    .rtba-wk-payment__buttons,
    .rtba-wk-pform__buttons {
        gap: 16px;
        width: 100%;
    }

    .rtba-wk .rtba-wk-payment__buttons .btn,
    .rtba-wk .rtba-wk-pform__buttons .btn {
        flex: 1 1 auto;
    }

    .rtba-wk-checkout__section + .rtba-wk-checkout__section {
        margin-top: 64px;
    }

    .rtba-wk .uni-warenkorb-participant.rtba-wk-person,
    .rtba-wk-costs {
        padding: 24px 16px;
    }

    .rtba-wk-checkout__actions {
        gap: 16px;
    }

    .rtba-wk-checkout__actions .btn {
        flex: 1 1 auto;
    }

    .rtba-wk-hero {
        margin-bottom: 48px;
    }

    .rtba-wk #uni-warenkorb-content h2 {
        margin-bottom: 24px;
        font-size: 36px;
    }

    .rtba-wk .uni-warenkorb-item,
    .rtba-wk .uni-warenkorb-item:nth-child(odd),
    .rtba-wk .uni-warenkorb-participant,
    .rtba-wk .uni-warenkorb-participant:nth-child(odd) {
        padding: 24px 16px 32px;
    }

    .rtba-wk-kurs__title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .rtba-wk-pform__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .uni-warenkorb-modul {
        flex-wrap: wrap;
        row-gap: 0;
        font-size: 14px;
    }

    .rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .rtba-wk-kurs__module-price {
        flex-basis: 100%;
        padding-left: 24px;
    }

    .rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .rtba-wk-group-prices--module {
        flex-basis: 100%;
        justify-content: start;
        padding-left: 24px;
    }

    .rtba-wk-kurs:not(.rtba-wk-kurs--summary) > .rtba-wk-kurs__modules .rtba-wk-group-prices--module .rtba-wk-kurs__module-price {
        padding-left: 0;
    }

    .rtba-wk-page {
        --rtba-wk-nav-offset: 160px;
    }
}
