:root {
    --rkn-green: #227908;
    --rkn-green-hover: #1a6006;
    --rkn-white: #ffffff;
    --rkn-text: #252525;
    --rkn-muted: #686868;
    --rkn-border: #dedede;
    --rkn-background: #f7f8f6;
    --rkn-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.rkn-trainingsplan-wrap {
    width: 100%;
    color: var(--rkn-text);
}

.rkn-times-section {
    margin-top: 32px;
}

/* Typografie des Seitenmoduls nach dem RKN-Website-Standard. */
.rkn-times-intro h2,
.rkn-times-heading h2,
.rkn-times-note h2 {
    margin-top: 0;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
}

.rkn-times-intro p,
.rkn-times-heading p,
.rkn-times-note p {
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

.rkn-times-intro .rkn-kicker,
.rkn-times-heading .rkn-kicker {
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
}

.rkn-trainingsplan-title {
    margin: 0 0 18px;
    color: var(--rkn-green);
}

.rkn-trainingsplan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
}

.rkn-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 9px;
    border: 1px solid rgba(34, 121, 8, 0.35);
    border-radius: 6px;
    background: #f4f8f2;
    color: var(--rkn-green);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    opacity: 0.88;
    transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.rkn-season-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--rkn-green);
    border-radius: 5px;
    background: var(--rkn-green);
    color: var(--rkn-white) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background 150ms ease, border-color 150ms ease;
}

.rkn-season-switch:hover,
.rkn-season-switch:focus-visible {
    border-color: var(--rkn-green-hover);
    background: var(--rkn-green-hover);
    color: var(--rkn-white) !important;
    outline: none;
}

.rkn-print-button__icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.rkn-print-button:hover,
.rkn-print-button:focus-visible {
    border-color: var(--rkn-green);
    background: #edf5e9;
    opacity: 1;
    outline: none;
}

.rkn-trainingsplan {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.rkn-day {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rkn-border);
    border-radius: 3px;
    background: var(--rkn-white);
}

.rkn-day-title {
    margin: 0;
    padding: 12px 8px;
    background: var(--rkn-green);
    color: var(--rkn-white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.rkn-day-content {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.rkn-empty {
    margin: 8px 0;
    color: var(--rkn-muted);
    font-size: 0.9rem;
    text-align: center;
}

.rkn-training-card {
    --rkn-training-color: var(--rkn-green);
    display: grid;
    gap: 5px;
    width: 100%;
    min-width: 0;
    padding: 12px 11px;
    border: 1px solid var(--rkn-border);
    border-left: 5px solid var(--rkn-training-color);
    border-radius: 3px;
    background: var(--rkn-white);
    color: var(--rkn-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.rkn-training-card:hover,
.rkn-training-card:focus-visible {
    border-color: var(--rkn-green);
    box-shadow: 0 6px 18px rgba(34, 121, 8, 0.16);
    transform: translateY(-1px);
    outline: none;
}

.rkn-training-time {
    color: var(--rkn-green);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}

.rkn-training-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.rkn-training-location {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    min-width: 0;
    color: var(--rkn-muted);
    font-size: 13px;
    line-height: 1.35;
}

.rkn-training-location > span:last-child {
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.rkn-modal[hidden] {
    display: none;
}

.rkn-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.rkn-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.rkn-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(86vh, 850px);
    overflow: auto;
    padding: 28px;
    border-top: 7px solid var(--rkn-green);
    border-radius: 12px;
    background: var(--rkn-white);
    box-shadow: var(--rkn-shadow);
}

.rkn-modal-dialog h2 {
    margin: 0 42px 18px 0;
    color: var(--rkn-green);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.rkn-modal-description,
.rkn-modal-description p {
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

.rkn-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rkn-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.rkn-modal-description {
    margin: 20px 0;
}

.rkn-modal-description img {
    max-width: 100%;
    height: auto;
}

.rkn-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.rkn-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 1px solid var(--rkn-green);
    border-radius: 5px;
    background: var(--rkn-green);
    color: var(--rkn-white) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.rkn-button:hover,
.rkn-button:focus-visible {
    border-color: #28623d;
    background: #28623d;
    color: var(--rkn-white) !important;
    outline: none;
}

.rkn-contact-actions {
    align-items: center;
    width: 100%;
}

.rkn-attendance-link {
    margin-left: auto;
}

.rkn-button-secondary {
    background: var(--rkn-white);
    color: var(--rkn-green) !important;
}

body.rkn-modal-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .rkn-trainingsplan {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

@media (max-width: 520px) {
    .rkn-times-intro h2,
    .rkn-times-heading h2,
    .rkn-times-note h2 {
        font-size: 24px;
    }

    .rkn-trainingsplan {
        grid-template-columns: 1fr;
    }

    .rkn-day-title {
        text-align: left;
    }

    .rkn-modal {
        align-items: end;
        padding: 10px;
    }

    .rkn-modal-dialog {
        width: 100%;
        max-height: 90vh;
        padding: 22px 18px;
        border-radius: 12px 12px 8px 8px;
    }

    .rkn-modal-actions {
        display: grid;
    }

    .rkn-button {
        width: 100%;
    }
}

.rkn-layout-compact .rkn-day-content { gap: 6px; padding: 7px; }
.rkn-layout-compact .rkn-training-card { gap: 3px; padding: 8px 7px; }
.rkn-layout-compact .rkn-training-name { font-size: 14px; }
.rkn-layout-compact .rkn-training-location { font-size: 13px; }
