.abtr-calendar,
.abtr-training,
.abtr-calendar *,
.abtr-training * {
    box-sizing: border-box;
}

.abtr-calendar,
.abtr-training {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    color: #20282d;
}

/* Tiefenstruktur der A&B-Familie: versetzte harte Ebene statt weichem Schatten.
   Auf Theme-Seiten gewinnt das Theme: einklassige Selektoren, und der Schatten
   wird nur im Kontrastmodus zurückgenommen. */
.abtr-calendar,
.abtr-training {
    --abtr-depth-outline: #1d2327;
    --abtr-depth-shadow: 7px 7px 0 rgba(29, 35, 39, 0.18);
    --abtr-depth-shadow-hover: 11px 11px 0 rgba(29, 35, 39, 0.18);
    --abtr-depth-lift: translate(-2px, -2px);
}

/* Sichtbarer Fokusrahmen auf allen fokussierbaren Elementen (Familienstandard).
   Nur :focus-visible: so erscheint der Rahmen bei Tastaturbedienung, bleibt aber
   nach einem Mausklick oder einem per JavaScript gesetzten Fokus nicht stehen.
   Die :focus-Regeln als Rückfallebene stehen am Dateiende im @supports-Block. */
.abtr-calendar a:focus-visible,
.abtr-calendar button:focus-visible,
.abtr-calendar input:focus-visible,
.abtr-calendar select:focus-visible,
.abtr-calendar textarea:focus-visible,
.abtr-calendar [tabindex]:focus-visible,
.abtr-training a:focus-visible,
.abtr-training button:focus-visible,
.abtr-training input:focus-visible,
.abtr-training select:focus-visible,
.abtr-training textarea:focus-visible,
.abtr-training [tabindex]:focus-visible,
.abtr-button:focus-visible,
.abtr-icon-button:focus-visible,
.abtr-participant__remove:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.abtr-calendar__header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.abtr-calendar__header h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0;
}

.abtr-icon-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 4px;
    font-size: 28px;
    line-height: 1;
    white-space: normal;
    text-decoration: none;
}

.abtr-icon-button:hover,
.abtr-icon-button:focus {
    color: #fff;
    background: #135e96;
}

.abtr-calendar__back {
    margin: 0 0 14px;
}

.abtr-calendar__back a {
    font-weight: 700;
}

.abtr-calendar-search {
    margin: 0 0 24px;
    padding: 14px;
    background: #f1f4f4;
    border: 1px solid #c9d0d3;
    border-radius: 8px;
}

.abtr-calendar-search > label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.abtr-calendar-search__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: stretch;
}

/* Optionale Filter der Übersicht (nur sichtbar, wenn im Admin aktiviert) */
.abtr-calendar-search__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-top: 14px;
}

.abtr-calendar-search__filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 180px;
}

.abtr-calendar-search__filter > label {
    font-weight: 700;
}

.abtr-calendar-search__filter select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    color: #20282d;
    background: #fff;
    border: 1px solid #77858b;
    border-radius: 4px;
    font: inherit;
}

.abtr-calendar-search__filter--check {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.abtr-calendar-search__filter--check .abtr-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
}

.abtr-calendar-search__filter--check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .abtr-calendar-search__filter {
        flex-basis: 100%;
    }
}

.abtr-calendar-search input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 11px;
    color: #20282d;
    background: #fff;
    border: 1px solid #77858b;
    border-radius: 4px;
    font: inherit;
}

/* Die Rahmenfarbe wechselt bei jedem Fokus, der Rahmen nur bei der Tastatur. */
.abtr-calendar-search input[type="search"]:focus {
    border-color: #2271b1;
}

.abtr-calendar-search input[type="search"]:focus-visible {
    border-color: #2271b1;
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.abtr-calendar-search__clear {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    font-weight: 700;
}

/* Abstand so gewählt, dass der versetzte Schatten (bis 11px im Hover) nicht
   unter der Nachbarkachel verschwindet: eigenständige Kanten statt geteilter. */
.abtr-year__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.abtr-year__month {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 220px;
    padding: 14px;
    color: #20282d;
    background: #fff;
    border: 2px solid var(--abtr-depth-outline);
    border-top: 5px solid #2271b1;
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
    text-decoration: none;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease;
}

/* Tastaturbedienung hebt die Kachel genauso an wie die Maus - aber nur die
   Tastatur: nach einem Mausklick bliebe die Kachel sonst angehoben stehen. */
.abtr-year__month:focus-visible {
    color: #135e96;
    background: #f0f6fc;
    border-color: #2271b1;
    box-shadow: var(--abtr-depth-shadow-hover);
    transform: var(--abtr-depth-lift);
}

@media (hover: hover) {
    .abtr-year__month:hover {
        color: #135e96;
        background: #f0f6fc;
        border-color: #2271b1;
        box-shadow: var(--abtr-depth-shadow-hover);
        transform: var(--abtr-depth-lift);
    }
}

.abtr-year__month-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #d7dcde;
}

.abtr-year__month-heading strong {
    font-size: 1.12rem;
    line-height: 1.25;
}

.abtr-year__count {
    color: #546269;
    font-size: 0.78rem;
    font-weight: 700;
}

.abtr-year__previews {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.abtr-year__previews li {
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid #e6e9ea;
    line-height: 1.3;
}

.abtr-year__previews time,
.abtr-year__previews span {
    display: block;
}

.abtr-year__previews time {
    color: #2271b1;
    font-size: 0.75rem;
    font-weight: 700;
}

.abtr-year__previews span {
    margin-top: 2px;
    overflow-wrap: break-word;
}

.abtr-year__more,
.abtr-year__empty {
    display: block;
    margin-top: auto;
    padding-top: 10px;
    color: #5d696f;
    font-size: 0.82rem;
    font-weight: 700;
}

.abtr-search-results {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #c9d0d3;
}

.abtr-search-results h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    line-height: 1.3;
    letter-spacing: 0;
}

.abtr-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #c9d0d3;
    border-left: 1px solid #c9d0d3;
}

.abtr-calendar__weekday {
    padding: 9px 6px;
    background: #f1f4f4;
    border-right: 1px solid #c9d0d3;
    border-bottom: 1px solid #c9d0d3;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.abtr-calendar__day {
    position: relative;
    min-width: 0;
    min-height: 130px;
    padding: 30px 6px 7px;
    background: #fff;
    border-right: 1px solid #c9d0d3;
    border-bottom: 1px solid #c9d0d3;
}

.abtr-calendar__day.is-outside {
    background: #f7f8f8;
    color: #7b8388;
}

.abtr-calendar__day.is-today {
    box-shadow: inset 0 0 0 2px #2271b1;
}

.abtr-calendar__number {
    position: absolute;
    top: 5px;
    right: 7px;
    font-size: 0.82rem;
    font-weight: 700;
}

.abtr-calendar__event {
    display: block;
    min-width: 0;
    margin: 0 0 5px;
    padding: 6px;
    color: #135e96;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: break-word;
}

.abtr-calendar__event span,
.abtr-calendar__event strong {
    display: block;
}

.abtr-calendar__event:hover,
.abtr-calendar__event:focus {
    color: #0a4b78;
    background: #dcebf7;
}

.abtr-calendar__list {
    display: none;
}

/* Verlinkte Schulungskarte: gleiche Tiefenebene wie die Monatskacheln. */
.abtr-event-card {
    margin: 0 0 24px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid var(--abtr-depth-outline);
    border-top: 5px solid #2271b1;
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease;
}

.abtr-event-card:focus-within {
    border-color: #2271b1;
    box-shadow: var(--abtr-depth-shadow-hover);
    transform: var(--abtr-depth-lift);
}

/* Wo der Browser es kann, hebt sich die Karte nur bei Tastaturbedienung an.
   Nach einem Mausklick auf den Titel bliebe sie sonst angehoben stehen. */
@supports selector(:has(:focus-visible)) {
    .abtr-event-card:focus-within {
        border-color: var(--abtr-depth-outline);
        border-top-color: #2271b1;
        box-shadow: var(--abtr-depth-shadow);
        transform: none;
    }

    .abtr-event-card:has(:focus-visible) {
        border-color: #2271b1;
        box-shadow: var(--abtr-depth-shadow-hover);
        transform: var(--abtr-depth-lift);
    }
}

@media (hover: hover) {
    .abtr-event-card:hover {
        border-color: #2271b1;
        box-shadow: var(--abtr-depth-shadow-hover);
        transform: var(--abtr-depth-lift);
    }

    .abtr-event-card:hover h3 a {
        color: #135e96;
    }
}

.abtr-event-card h3 {
    margin: 4px 0;
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: 0;
}

.abtr-event-card time {
    color: #2271b1;
    font-weight: 700;
}

.abtr-event-card p {
    margin: 4px 0 0;
}

.abtr-training__media {
    width: 100%;
    max-height: 340px;
    margin: 0 0 28px;
    overflow: hidden;
}

.abtr-training__image {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
}

.abtr-training__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    gap: 40px;
    align-items: start;
}

.abtr-training__summary {
    margin-top: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.55;
}

.abtr-training__description > :first-child {
    margin-top: 0;
}

/* Faktenbox: Tiefenebene ohne Anheben - sie ist Information, kein Ziel. */
.abtr-training__facts {
    padding: 18px 20px;
    background: #fff;
    border: 2px solid var(--abtr-depth-outline);
    border-top: 5px solid #2271b1;
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
}

.abtr-training__facts dl {
    margin: 0;
}

.abtr-training__facts dt {
    margin-top: 16px;
    color: #46545a;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.abtr-training__facts dt:first-child {
    margin-top: 0;
}

.abtr-training__facts dd {
    margin: 3px 0 0;
    overflow-wrap: break-word;
}

/* Anmeldeformular-Karte: Tiefenebene, aber kein Anheben beim Ausfüllen. */
.abtr-registration {
    margin-top: 48px;
    padding: 24px;
    background: #fff;
    border: 2px solid var(--abtr-depth-outline);
    border-top: 5px solid #2271b1;
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
}

.abtr-registration h2 {
    margin-top: 0;
    font-size: 1.55rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.abtr-form {
    max-width: 820px;
}

.abtr-form fieldset {
    min-width: 0;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.abtr-form legend {
    width: 100%;
    margin-bottom: 14px;
    padding-bottom: 7px;
    border-bottom: 1px solid #d7dcde;
    font-size: 1.08rem;
    font-weight: 700;
}

.abtr-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.abtr-form label,
.abtr-form__choices > span {
    display: block;
    font-weight: 600;
}

.abtr-form input[type="text"],
.abtr-form input[type="email"],
.abtr-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    padding: 10px 11px;
    color: #20282d;
    background: #fff;
    border: 1px solid #77858b;
    border-radius: 4px;
    font: inherit;
}

.abtr-form input:focus,
.abtr-form select:focus,
.abtr-form textarea:focus {
    border-color: #2271b1;
}

.abtr-form input:focus-visible,
.abtr-form select:focus-visible,
.abtr-form textarea:focus-visible {
    border-color: #2271b1;
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.abtr-form__full {
    grid-column: 1 / -1;
}

.abtr-form__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    margin-top: 16px;
}

.abtr-form__choices > span {
    flex-basis: 100%;
}

.abtr-form__choices label {
    display: flex;
    gap: 7px;
    align-items: center;
    font-weight: 400;
}

.abtr-form__choices .abtr-form__other {
    display: block;
    flex: 1 1 260px;
    font-weight: 600;
}

.abtr-form__consent {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin: 0 0 20px;
}

.abtr-button {
    min-height: 44px;
    padding: 10px 18px;
    color: #fff;
    background: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 4px;
    font: inherit;
    font-weight: 700;
    white-space: normal;
    cursor: pointer;
}

.abtr-button:hover,
.abtr-button:focus {
    background: #135e96;
}

/* Schaltflächen greifen die versetzte Ebene in kleiner Form auf. */
.abtr-button,
.abtr-icon-button {
    box-shadow: 3px 3px 0 rgba(29, 35, 39, 0.28);
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease;
}

.abtr-button:focus-visible,
.abtr-icon-button:focus-visible {
    box-shadow: 5px 5px 0 rgba(29, 35, 39, 0.24);
    transform: translate(-1px, -1px);
}

@media (hover: hover) {
    .abtr-button:hover,
    .abtr-icon-button:hover {
        box-shadow: 5px 5px 0 rgba(29, 35, 39, 0.24);
        transform: translate(-1px, -1px);
    }
}

.abtr-button--secondary {
    color: #2271b1;
    background: #fff;
}

.abtr-button--secondary:hover,
.abtr-button--secondary:focus {
    color: #fff;
}

/* Teilnehmerblock: Tiefenebene ohne Anheben, damit die Eingabe ruhig bleibt. */
.abtr-participant {
    margin: 0 0 24px;
    padding: 14px 16px;
    background: #f1f4f4;
    border: 2px solid var(--abtr-depth-outline);
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
}

.abtr-participant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}

.abtr-participant__title {
    margin: 0;
    font-size: 1.05em;
}

.abtr-participant__remove {
    min-height: 44px;
    padding: 4px 10px;
    color: #b32d2e;
    background: none;
    border: 1px solid #b32d2e;
    border-radius: 4px;
    font: inherit;
    white-space: normal;
    cursor: pointer;
}

.abtr-participant__remove:hover,
.abtr-participant__remove:focus {
    color: #fff;
    background: #b32d2e;
}

/* Die Entfernen-Schaltfläche folgt derselben kleinen Ebene wie die übrigen. */
.abtr-participant__remove {
    box-shadow: 3px 3px 0 rgba(29, 35, 39, 0.28);
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease;
}

.abtr-participant__remove:focus-visible {
    box-shadow: 5px 5px 0 rgba(29, 35, 39, 0.24);
    transform: translate(-1px, -1px);
}

@media (hover: hover) {
    .abtr-participant__remove:hover {
        box-shadow: 5px 5px 0 rgba(29, 35, 39, 0.24);
        transform: translate(-1px, -1px);
    }
}

.abtr-participants__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.abtr-button--danger {
    background: #b32d2e;
    border-color: #b32d2e;
}

.abtr-button--danger:hover,
.abtr-button--danger:focus {
    background: #8f2223;
}

/* Storno-Box: Tiefenebene ohne Anheben, der Warnton bleibt über die Fläche. */
.abtr-cancel-box {
    margin: 0 0 22px;
    padding: 16px;
    color: #7a4b00;
    background: #fff7e6;
    border: 2px solid var(--abtr-depth-outline);
    border-left: 6px solid #7a4b00;
    border-radius: 4px;
    box-shadow: var(--abtr-depth-shadow);
}

.abtr-cancel-box h2 {
    margin-top: 0;
}

.abtr-cancel-box form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.abtr-cancel-box .abtr-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.abtr-training__ics {
    margin: 14px 0 0;
}

.abtr-training__ics .abtr-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.abtr-notice,
.abtr-confirmation-text {
    margin: 0 0 22px;
    padding: 12px 14px;
    color: #1d2327;
    background: #eef2f5;
    border: 1px solid #1d2327;
    border-left-width: 4px;
    border-radius: 8px;
}

.abtr-notice > :first-child,
.abtr-confirmation-text > :first-child {
    margin-top: 0;
}

.abtr-notice > :last-child,
.abtr-confirmation-text > :last-child {
    margin-bottom: 0;
}

.abtr-notice--success,
.abtr-confirmation-text {
    color: #0a6b22;
    background: #edfaef;
    border-color: #0a6b22;
}

.abtr-notice--waitlist,
.abtr-notice--warning {
    color: #7a4b00;
    background: #fff7e6;
    border-color: #7a4b00;
}

.abtr-notice--error {
    color: #b32d2e;
    background: #fcf0f1;
    border-color: #b32d2e;
}

.abtr-notice--info {
    color: #1d2327;
    background: #eef2f5;
    border-color: #1d2327;
}

.abtr-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 760px) {
    .abtr-year__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .abtr-calendar__grid {
        display: none;
    }

    .abtr-calendar__list {
        display: block;
    }

    .abtr-training__layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .abtr-training__facts {
        padding: 16px 18px;
    }

    .abtr-training__media,
    .abtr-training__image {
        height: auto;
        max-height: none;
    }
}

@media (max-width: 520px) {
    .abtr-calendar__header h2 {
        font-size: 1.35rem;
    }

    .abtr-calendar-search__controls {
        grid-template-columns: 1fr;
    }

    .abtr-calendar-search__clear {
        justify-content: center;
    }

    .abtr-year__grid {
        grid-template-columns: 1fr;
    }

    .abtr-year__month {
        min-height: 0;
    }

    .abtr-form__grid {
        grid-template-columns: 1fr;
    }

    .abtr-form__full {
        grid-column: auto;
    }
}

/* Auf schmalen Displays fällt die Ebene flacher aus, damit sie nicht drückt. */
@media (max-width: 700px) {
    .abtr-calendar,
    .abtr-training {
        --abtr-depth-shadow: 5px 5px 0 rgba(29, 35, 39, 0.18);
        --abtr-depth-shadow-hover: 7px 7px 0 rgba(29, 35, 39, 0.18);
    }
}

/* Nutzereinstellung "weniger Bewegung": keine Übergänge, kein Anheben. */
@media (prefers-reduced-motion: reduce) {
    .abtr-year__month,
    .abtr-year__month:hover,
    .abtr-year__month:focus-visible,
    .abtr-event-card,
    .abtr-event-card:hover,
    .abtr-event-card:focus-within,
    .abtr-button,
    .abtr-button:hover,
    .abtr-button:focus-visible,
    .abtr-icon-button,
    .abtr-icon-button:hover,
    .abtr-icon-button:focus-visible,
    .abtr-participant__remove,
    .abtr-participant__remove:hover,
    .abtr-participant__remove:focus-visible {
        transition: none;
        transform: none;
    }
}

/* Kontrastmodus: die Kontur trägt die Tiefe, nicht der Schatten. */
@media (forced-colors: active) {
    .abtr-year__month,
    .abtr-year__month:hover,
    .abtr-year__month:focus-visible,
    .abtr-event-card,
    .abtr-event-card:hover,
    .abtr-event-card:focus-within,
    .abtr-training__facts,
    .abtr-registration,
    .abtr-participant,
    .abtr-cancel-box,
    .abtr-button,
    .abtr-button:hover,
    .abtr-button:focus-visible,
    .abtr-icon-button,
    .abtr-icon-button:hover,
    .abtr-icon-button:focus-visible,
    .abtr-participant__remove,
    .abtr-participant__remove:hover,
    .abtr-participant__remove:focus-visible {
        box-shadow: none;
    }

    .abtr-year__month,
    .abtr-event-card,
    .abtr-training__facts,
    .abtr-registration,
    .abtr-participant,
    .abtr-cancel-box {
        border: 2px solid CanvasText;
    }

    .abtr-year__month:hover,
    .abtr-year__month:focus-visible,
    .abtr-event-card:hover,
    .abtr-event-card:focus-within {
        border-color: Highlight;
    }
}

/* Rückfallebene für Browser ohne :focus-visible: dort trägt :focus den Rahmen.
   Aktuelle Browser überspringen diesen Block, deshalb bleibt der Rahmen dort
   nach einem Mausklick oder einem per Skript gesetzten Fokus unsichtbar. */
@supports not selector(:focus-visible) {
    .abtr-calendar a:focus,
    .abtr-calendar button:focus,
    .abtr-calendar input:focus,
    .abtr-calendar select:focus,
    .abtr-calendar textarea:focus,
    .abtr-calendar [tabindex]:focus,
    .abtr-training a:focus,
    .abtr-training button:focus,
    .abtr-training input:focus,
    .abtr-training select:focus,
    .abtr-training textarea:focus,
    .abtr-training [tabindex]:focus,
    .abtr-button:focus,
    .abtr-icon-button:focus,
    .abtr-participant__remove:focus {
        outline: 3px solid #005fcc;
        outline-offset: 2px;
    }

    .abtr-calendar-search input[type="search"]:focus,
    .abtr-form input:focus,
    .abtr-form select:focus,
    .abtr-form textarea:focus {
        border-color: #2271b1;
        outline: 3px solid #005fcc;
        outline-offset: 2px;
    }

    .abtr-year__month:focus {
        color: #135e96;
        background: #f0f6fc;
        border-color: #2271b1;
        box-shadow: var(--abtr-depth-shadow-hover);
        transform: var(--abtr-depth-lift);
    }
}

/* Dunkles Design: das Plugin bringt eigene dunkle Flächen mit, damit es auch
   ohne das Theme lesbar bleibt. Alle Regeln bleiben einklassig, damit das
   Theme sie mit ".site-main .abtr-..." weiterhin zuverlässig überschreibt. */
@media (prefers-color-scheme: dark) {
    .abtr-calendar,
    .abtr-training {
        color: #dbe9eb;
        background: #0b1c21;
    }

    /* Auf dunklem Grund trägt eine hellere Kontur die Tiefe, nicht der Schatten. */
    .abtr-calendar,
    .abtr-training {
        --abtr-depth-outline: #274a52;
        --abtr-depth-shadow: 7px 7px 0 rgba(0, 0, 0, 0.55);
        --abtr-depth-shadow-hover: 11px 11px 0 rgba(0, 0, 0, 0.55);
    }

    .abtr-calendar-search {
        background: #16343b;
        border-color: #274a52;
    }

    /* Eingabefelder: hellere Feldkante (4,4:1 gegen die Fläche) statt #77858b. */
    .abtr-calendar-search input[type="search"],
    .abtr-calendar-search__filter select,
    .abtr-form input[type="text"],
    .abtr-form input[type="email"],
    .abtr-form textarea {
        color: #dbe9eb;
        background: #11282e;
        border-color: #6f8f97;
    }

    .abtr-calendar-search input[type="search"]:focus,
    .abtr-calendar-search input[type="search"]:focus-visible,
    .abtr-form input:focus,
    .abtr-form select:focus,
    .abtr-form textarea:focus,
    .abtr-form input:focus-visible,
    .abtr-form select:focus-visible,
    .abtr-form textarea:focus-visible {
        border-color: #72aee6;
    }

    .abtr-year__month {
        color: #dbe9eb;
        background: #11282e;
        border-top-color: #72aee6;
    }

    .abtr-year__month:focus-visible {
        color: #dbe9eb;
        background: #16343b;
        border-color: #72aee6;
    }

    .abtr-year__month-heading {
        border-bottom-color: #274a52;
    }

    .abtr-year__previews li {
        border-bottom-color: #274a52;
    }

    .abtr-year__previews time {
        color: #72aee6;
    }

    .abtr-year__count,
    .abtr-year__more,
    .abtr-year__empty {
        color: #a8c4c9;
    }

    .abtr-search-results {
        border-top-color: #274a52;
    }

    .abtr-calendar__grid {
        border-top-color: #274a52;
        border-left-color: #274a52;
    }

    .abtr-calendar__weekday {
        background: #16343b;
        border-right-color: #274a52;
        border-bottom-color: #274a52;
    }

    .abtr-calendar__day {
        background: #11282e;
        border-right-color: #274a52;
        border-bottom-color: #274a52;
    }

    .abtr-calendar__day.is-outside {
        color: #a8c4c9;
        background: #16343b;
    }

    .abtr-calendar__day.is-today {
        box-shadow: inset 0 0 0 2px #72aee6;
    }

    .abtr-calendar__event {
        color: #72aee6;
        background: #16343b;
        border-left-color: #72aee6;
    }

    .abtr-calendar__event:hover,
    .abtr-calendar__event:focus {
        color: #dbe9eb;
        background: #274a52;
    }

    .abtr-event-card {
        background: #11282e;
        border-top-color: #72aee6;
    }

    .abtr-event-card time {
        color: #72aee6;
    }

    .abtr-training__facts,
    .abtr-registration {
        background: #11282e;
        border-top-color: #72aee6;
    }

    .abtr-training__facts dt {
        color: #a8c4c9;
    }

    .abtr-form legend {
        border-bottom-color: #274a52;
    }

    .abtr-participant {
        background: #16343b;
    }

    /* Die Schaltflächenfläche #2271b1 trägt weiße Schrift mit 5,2:1 - sie bleibt. */
    .abtr-button--secondary {
        color: #72aee6;
        background: #11282e;
    }

    .abtr-participant__remove {
        color: #ff9b9b;
        border-color: #ff9b9b;
    }

    .abtr-participant__remove:hover,
    .abtr-participant__remove:focus {
        color: #11282e;
        background: #ff9b9b;
    }

    .abtr-cancel-box {
        color: #f0c674;
        background: #33280f;
        border-left-color: #f0c674;
    }

    /* Statusfarben des Themes, damit Plugin und Theme zusammenpassen. */
    .abtr-notice,
    .abtr-confirmation-text {
        color: #dbe9eb;
        background: #16343b;
        border-color: #6f8f97;
    }

    .abtr-notice--success,
    .abtr-confirmation-text {
        color: #7ddba8;
        background: #12301f;
        border-color: #7ddba8;
    }

    .abtr-notice--waitlist,
    .abtr-notice--warning {
        color: #f0c674;
        background: #33280f;
        border-color: #f0c674;
    }

    .abtr-notice--error {
        color: #ff9b9b;
        background: #3a1a1a;
        border-color: #ff9b9b;
    }

    .abtr-notice--info {
        color: #dbe9eb;
        background: #16343b;
        border-color: #6f8f97;
    }
}

/* Im dunklen Design folgt der Mauszeiger denselben Flächen wie die Tastatur. */
@media (prefers-color-scheme: dark) and (hover: hover) {
    .abtr-year__month:hover {
        color: #dbe9eb;
        background: #16343b;
        border-color: #72aee6;
    }
}
