/* ══════════════════════════════════════════════════════════
   Radio Tell Formationen – Frontend CSS
   v0.1.0 · OnAir2-kompatibel
   ══════════════════════════════════════════════════════════ */

:root {
    --rtf-primary: #C8102E;
    --rtf-header-bg: #1A1A2E;
    --rtf-card-bg: #FFFFFF;
    --rtf-card-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --rtf-font-size: 0.9rem;
    --rtf-border-radius: 4px;
    --rtf-gallery-gap: 8px;
    --rtf-row-alt: #F2F4F8;
    --rtf-badge-bg: #C8102E;
    --rtf-badge-text: #FFFFFF;
}

/*
 * OnAir2 Theme: Grossen Seiten-Header auf Formations-Detailseiten ausblenden.
 * Die body-Klasse "rtf-formation-detail" wird automatisch gesetzt.
 * Folgende Selektoren decken gängige OnAir2-Header-Elemente ab.
 * Falls Anpassungen nötig: passenden Selektor im Browser-Inspector finden.
 */
.rtf-formation-detail .qt-pageheader,
.rtf-formation-detail .qt-header-bg,
.rtf-formation-detail .is-hero-header,
.rtf-formation-detail .qt-titlebar,
.rtf-formation-detail .onair2-header-image {
    display: none !important;
}

/*
 * OnAir2 Theme: Grossen Seiten-Header auf Personen-Detailseiten ausblenden.
 */
.rtf-person-detail .qt-pageheader,
.rtf-person-detail .qt-header-bg,
.rtf-person-detail .is-hero-header,
.rtf-person-detail .qt-titlebar,
.rtf-person-detail .onair2-header-image {
    display: none !important;
}

/* ── Formation Einzelseite ─────────────────────────────── */

.rtf-formation-content-wrap {
    max-width: 960px;
    margin: 0 auto;
    background: #fff !important;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.rtf-formation {
    font-size: var(--rtf-font-size);
    padding: 0 24px;
}

/* Header darf an die Kanten des Wrappers */
.rtf-formation .rtf-header {
    margin-left: -24px;
    margin-right: -24px;
    border-radius: 0;
}

/* Letztes Element im Wrapper bekommt unten Abstand */
.rtf-formation-content-wrap > :last-child {
    padding-bottom: 24px;
}

/* Header */
.rtf-header {
    position: relative;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: var(--rtf-border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.rtf-header-default {
    background: var(--rtf-header-bg);
}

.rtf-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.rtf-header-content {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    color: #fff;
    width: 100%;
}

.rtf-profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* SVG-Silhouette als Fallback */
.rtf-profile-placeholder {
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rtf-profile-placeholder svg {
    width: 80%;
    height: 80%;
}

.rtf-name,
.rtf-header .rtf-name,
.rtf-header-overlay .rtf-name,
h1.rtf-name {
    font-size: 2rem;
    margin: 0 0 0.3rem;
    line-height: 1.2;
    color: #fff !important;
}

.rtf-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.rtf-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    background: var(--rtf-badge-bg);
    color: var(--rtf-badge-text);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.rtf-badge-small {
    padding: 1px 8px;
    font-size: 0.7rem;
    border-radius: 3px;
}

.rtf-region, .rtf-founding {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-right: 1rem;
}

/* Sektionen */
.rtf-section {
    margin-bottom: 2.5rem;
}

.rtf-section h2 {
    font-size: 1.3rem;
    color: var(--rtf-header-bg);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rtf-primary);
}

.rtf-section h2 .rtf-count {
    font-weight: normal;
    font-size: 0.85rem;
    color: #888;
}

.rtf-section h3 {
    font-size: 1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.rtf-bio-text {
    line-height: 1.7;
}

.rtf-wiki-source {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.78rem;
    color: #999;
}

.rtf-wiki-source a {
    color: #666;
    text-decoration: underline;
}

.rtf-wiki-source a:hover {
    color: var(--rtf-primary, #C8102E);
}

/* Inline Quellenverweis (Wikipedia · Discogs · MusicBrainz) */
.rtf-data-sources {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.78rem;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}
.rtf-data-sources-label {
    margin-right: 6px;
}
.rtf-data-sources a {
    color: #666;
    text-decoration: underline;
}
.rtf-data-sources a:hover {
    color: var(--rtf-primary, #C8102E);
}
.rtf-data-sources-sep {
    color: #ccc;
    margin: 0 2px;
}

/* Tabellen (Musikkatalog) */
.rtf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rtf-font-size);
}

.rtf-table thead {
    background: var(--rtf-header-bg);
    color: #fff;
}

.rtf-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rtf-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.rtf-table tbody tr:nth-child(even) {
    background: var(--rtf-row-alt);
}

.rtf-table tbody tr:hover {
    background: #e8ecf4;
}

.rtf-link-more {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--rtf-primary);
    font-weight: 600;
    text-decoration: none;
}

.rtf-link-more:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════
   Musikkatalog-Tabelle (exakt wie Musikkatalog-Plugin)
   ══════════════════════════════════════════════════════════ */

/* ── Diskographie ──────────────────────────────────── */

.rtf-album-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rtf-album-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: var(--rtf-card-bg, #fff);
    border: 1px solid #e8e8e8;
    border-radius: var(--rtf-border-radius, 6px);
    padding: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}
.rtf-album-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.rtf-album-cover {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    background: linear-gradient(135deg, #f0ebe3 0%, #e8ddd0 50%, #d9cfc2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a89880;
    overflow: hidden;
}
.rtf-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.rtf-album-placeholder {
    width: 65%;
    height: 65%;
}

.rtf-album-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.rtf-album-title {
    font-size: 0.85rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rtf-album-meta {
    font-size: 0.72rem;
    color: #888;
}
.rtf-album-tracks {
    font-size: 0.68rem;
    color: #aaa;
}

@media (max-width: 600px) {
    .rtf-album-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .rtf-album-cover { width: 48px; height: 48px; }
}

/* ── Musikkatalog ──────────────────────────────────── */

.rtf-katalog-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rtf-katalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rtf-font-size);
}

.rtf-katalog-table thead tr {
    background: var(--rtf-header-bg);
}

.rtf-katalog-table thead th {
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    border: none;
}

.rtf-katalog-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.rtf-katalog-table tbody tr:hover {
    background: #fce8e8;
}

.rtf-katalog-table tbody td {
    padding: 14px 14px;
    vertical-align: middle;
    color: #333;
}

.rtf-td-center {
    text-align: center;
}

/* Play Button – span statt button um OnAir2-Theme komplett zu umgehen */
.rtf-play-btn {
    background: var(--rtf-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    padding: 0 !important;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    user-select: none;
    position: relative;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    outline: none !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    font-family: Arial, sans-serif !important;
}

.rtf-play-btn .emoji,
.rtf-play-btn img.emoji {
    display: none !important;
}

.rtf-play-btn svg.rtf-play-icon {
    display: inline-block !important;
    pointer-events: none;
}

.rtf-play-btn::before,
.rtf-play-btn::after,
.rtf-play-btn *::before,
.rtf-play-btn *::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

.rtf-play-btn:hover {
    transform: scale(1.1);
    background: #a00d24 !important;
}

.rtf-play-btn.playing {
    background: var(--rtf-header-bg) !important;
}

/* Wünschen-Link (exakt wie Musikkatalog) */
.rtf-wish-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rtf-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: none;
}

.rtf-wish-link:hover {
    color: var(--rtf-primary);
    text-decoration: none;
}

/* Nur der Stern ändert sich beim Hover */
.rtf-wish-star {
    font-size: 1.1rem;
    transition: none;
}

.rtf-wish-link:hover .rtf-wish-star {
    color: var(--rtf-primary);
}

.rtf-wish-link:hover .rtf-wish-star::before {
    content: '★';
}

/* Trick: Stern via CSS austauschen beim Hover */
.rtf-wish-star {
    display: inline-block;
}

.rtf-wish-link:hover .rtf-wish-star {
    font-size: 0;
}

.rtf-wish-link:hover .rtf-wish-star::after {
    content: '★';
    font-size: 1.1rem;
    color: var(--rtf-primary);
}

/* Events */
.rtf-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rtf-event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--rtf-row-alt);
    border-radius: var(--rtf-border-radius);
    border-left: 4px solid var(--rtf-primary);
}

.rtf-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.rtf-event-day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rtf-primary);
    line-height: 1;
}

.rtf-event-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
}

.rtf-event-info strong {
    display: block;
}

.rtf-event-info span {
    color: #666;
    font-size: 0.85rem;
}

/* Galerie */
.rtf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--rtf-gallery-gap);
}

.rtf-gallery-item {
    display: block;
    border-radius: var(--rtf-border-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.rtf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.rtf-gallery-item:hover img {
    transform: scale(1.05);
}

/* Video Embed */
.rtf-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--rtf-border-radius);
}

.rtf-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rtf-soundcloud-embed iframe {
    width: 100%;
    height: 166px;
    border-radius: var(--rtf-border-radius);
}

/* Links */
.rtf-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rtf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--rtf-row-alt);
    border-radius: 3px;
    color: var(--rtf-header-bg);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.15s, transform 0.15s;
    border: 1px solid #ddd;
}

.rtf-link:hover {
    background: var(--rtf-header-bg);
    color: #fff;
    border-color: var(--rtf-header-bg);
    transform: translateY(-1px);
}

.rtf-link-icon {
    font-size: 1rem;
}

/* ── Formationsverzeichnis ─────────────────────────────── */

.rtf-verzeichnis {
    max-width: 1200px;
    margin: 0 auto;
}

.rtf-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.rtf-search-field {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: var(--rtf-border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.rtf-search-field:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

.rtf-filter {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: var(--rtf-border-radius);
    font-size: 0.9rem;
    background: #fff;
    min-width: 150px;
}

.rtf-filter-group {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.rtf-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    min-width: 80px;
}

.rtf-region-buttons,
.rtf-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rtf-region-btn {
    padding: 4px 10px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #444;
    font-weight: 500;
    min-width: 36px;
    text-align: center;
}

.rtf-region-btn:hover {
    border-color: var(--rtf-primary);
    color: var(--rtf-primary);
}

.rtf-region-btn.active {
    background: var(--rtf-primary);
    border-color: var(--rtf-primary);
    color: #fff;
}

.rtf-cat-btn {
    padding: 5px 14px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #444;
}

.rtf-cat-btn:hover {
    border-color: var(--rtf-primary);
    color: var(--rtf-primary);
}

.rtf-cat-btn.active {
    background: var(--rtf-primary);
    border-color: var(--rtf-primary);
    color: #fff;
}

.rtf-result-info {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.rtf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rtf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rtf-sort-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: var(--rtf-border-radius);
    font-size: 0.85rem;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.rtf-sort-select:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

.rtf-view-toggle {
    display: flex;
    gap: 4px;
}

.rtf-view-btn {
    background: #eee;
    border: 1px solid #ccc;
    border-radius: var(--rtf-border-radius);
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
    transition: background 0.2s, color 0.2s;
}

.rtf-view-btn.active,
.rtf-view-btn:hover {
    background: var(--rtf-primary);
    color: #fff;
    border-color: var(--rtf-primary);
}

/* Grid */
.rtf-grid {
    display: grid;
    gap: 1.2rem;
}

.rtf-verzeichnis[data-columns="2"] .rtf-grid { grid-template-columns: repeat(2, 1fr); }
.rtf-verzeichnis[data-columns="3"] .rtf-grid { grid-template-columns: repeat(3, 1fr); }
.rtf-verzeichnis[data-columns="4"] .rtf-grid { grid-template-columns: repeat(4, 1fr); }

/* Karten */
.rtf-card {
    background: var(--rtf-card-bg);
    border-radius: var(--rtf-border-radius);
    box-shadow: var(--rtf-card-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rtf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.rtf-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.rtf-card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--rtf-row-alt);
    position: relative;
}

.rtf-card-new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--rtf-primary, #C8102E);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.rtf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rtf-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    background: var(--rtf-row-alt);
}

.rtf-card-body {
    padding: 1rem;
}

.rtf-card-name {
    font-size: 1rem;
    margin: 0 0 0.4rem;
    color: var(--rtf-header-bg);
}

.rtf-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.rtf-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    color: #888;
    font-size: 0.8rem;
}

.rtf-card-meta > span:not(:last-child)::after {
    content: ' · ';
    margin: 0 2px;
}

.rtf-card-year {
    font-style: italic;
}

/* Table View */
.rtf-table-wrap {
    overflow-x: auto;
}

.rtf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rtf-table th {
    background: var(--rtf-header-bg, #1a1a2e);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.rtf-table th.rtf-sortable {
    cursor: pointer;
    user-select: none;
}

.rtf-table th.rtf-sortable:hover {
    background: var(--rtf-primary);
}

.rtf-sort-icon {
    font-size: 0.65rem;
    margin-left: 4px;
    opacity: 0.8;
}

.rtf-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.rtf-table tbody tr:nth-child(even) {
    background: var(--rtf-row-alt, #f8f9fa);
}

.rtf-table tbody tr:hover {
    background: #e9ecef;
}

.rtf-table td a {
    color: var(--rtf-primary);
    text-decoration: none;
    font-weight: 500;
}

.rtf-table td a:hover {
    text-decoration: underline;
}

/* Pagination */
.rtf-pagination {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
}

.rtf-page-btn {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    min-width: 44px;
    text-align: center;
    color: #333;
    line-height: 1.2;
    font-weight: 500;
}

.rtf-page-btn:hover:not([disabled]) {
    background: var(--rtf-primary);
    color: #fff;
    border-color: var(--rtf-primary);
}

.rtf-page-btn.rtf-page-active {
    background: var(--rtf-primary);
    color: #fff;
    border-color: var(--rtf-primary);
    font-weight: 700;
}

.rtf-page-btn[disabled] {
    opacity: 0.35;
    cursor: default;
}

.rtf-page-nav {
    padding: 10px 20px;
    font-size: 1rem;
    white-space: nowrap;
}

.rtf-page-ellipsis {
    padding: 10px 6px;
    color: #999;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.rtf-page-info {
    padding: 10px 14px;
    color: #555;
    font-size: 0.95rem;
    white-space: nowrap;
}

.rtf-btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--rtf-border-radius);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.rtf-btn-primary, .rtf-btn {
    background: var(--rtf-primary);
    color: #fff;
}

.rtf-btn:hover {
    background: #a00d24;
}

/* ── Registrierungsformular ────────────────────────────── */

.rtf-register {
    max-width: 720px;
    margin: 0 auto;
}

.rtf-form {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: var(--rtf-border-radius);
}

.rtf-form fieldset {
    border: none;
    border-top: 2px solid #555;
    border-radius: 0;
    padding: 1.5rem 0 0.5rem;
    margin-bottom: 1.5rem;
}

.rtf-form legend {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    padding: 0 0.5rem 0 0;
}

.rtf-field {
    margin-bottom: 1.5rem;
}

.rtf-field > label,
.rtf-form label:not(.rtf-checkbox-label):not(.rtf-pill-label) {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
}

.rtf-field input[type="text"],
.rtf-field input[type="email"],
.rtf-field input[type="url"],
.rtf-field input[type="tel"],
.rtf-field input[type="number"],
.rtf-field input[type="date"],
.rtf-field input[type="time"],
.rtf-field select {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #999;
    border-radius: 0;
    font-size: 0.95rem;
    background: transparent;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.rtf-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: var(--rtf-border-radius);
    font-size: 0.95rem;
    background: transparent;
    transition: border-color 0.2s;
    box-sizing: border-box;
    resize: vertical;
}

.rtf-field input:focus,
.rtf-field textarea:focus,
.rtf-field select:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

.rtf-field small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 0.78rem;
}

.rtf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Kategorien als Pill-Buttons */
.rtf-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rtf-checkbox-label {
    font-weight: 400 !important;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 1px solid #bbb;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    background: #fff;
}

.rtf-checkbox-label:hover {
    border-color: #666;
}

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

.rtf-checkbox-label:has(input:checked),
.rtf-checkbox-label.rtf-pill-active {
    background: #555;
    color: #fff;
    border-color: #555;
}

.rtf-required label::after {
    content: '';
}

.rtf-submit {
    text-align: center;
    margin-top: 1.5rem;
}

.rtf-submit .rtf-btn {
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Upload-Loader */
.rtf-upload-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--rtf-border-radius);
    font-size: 0.9rem;
    color: #6d4c00;
}
.rtf-upload-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ffe082;
    border-top-color: #f9a825;
    border-radius: 50%;
    animation: rtf-spin 0.8s linear infinite;
}
@keyframes rtf-spin {
    to { transform: rotate(360deg); }
}

.rtf-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--rtf-border-radius);
    text-align: center;
}

.rtf-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rtf-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Upload-Loader ────────────────────────────────────────── */

.rtf-upload-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    background: #eef6ff;
    border: 1px solid #b6d4fe;
    border-radius: var(--rtf-border-radius);
    font-size: 0.88rem;
    color: #0c5ebb;
}

.rtf-upload-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #b6d4fe;
    border-top-color: #0c5ebb;
    border-radius: 50%;
    animation: rtf-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes rtf-spin {
    to { transform: rotate(360deg); }
}

/* ── Fehler / Leer ─────────────────────────────────────── */

.rtf-error {
    color: var(--rtf-primary);
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* ── Edit-Modus ────────────────────────────────────────── */

.rtf-edit {
    max-width: 720px;
    margin: 0 auto;
}

.rtf-edit h2 {
    color: var(--rtf-header-bg);
    border-bottom: 2px solid var(--rtf-primary);
    padding-bottom: 0.5rem;
}

.rtf-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rtf-edit-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rtf-edit-gallery-item img {
    border-radius: var(--rtf-border-radius);
}

/* Event-Suche (Frontend Edit) */
.rtf-event-search-results {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--rtf-border-radius);
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rtf-event-result {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.rtf-event-result:hover {
    background: var(--rtf-row-alt);
}

.rtf-event-no-results {
    padding: 12px;
    color: #888;
    font-size: 0.9rem;
}

.rtf-assigned-events h4 {
    font-size: 0.95rem;
    margin: 1rem 0 0.5rem;
}

.rtf-assigned-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.rtf-remove-event {
    background: none;
    border: none;
    color: var(--rtf-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.rtf-remove-event:hover {
    color: #a00d24;
}

.rtf-empty-events {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

/* Token abgelaufen */
.rtf-token-expired {
    max-width: 480px;
    margin: 2rem auto;
    text-align: center;
}

.rtf-token-expired h2 {
    color: var(--rtf-primary);
}

/* ══════════════════════════════════════════════════════════
   Personen / Mitglieder
   ══════════════════════════════════════════════════════════ */

.rtf-persons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 1.5rem;
}

.rtf-person-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--rtf-row-alt);
    border-radius: var(--rtf-border-radius);
}

.rtf-person-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.rtf-person-thumb-placeholder {
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rtf-person-thumb-placeholder svg {
    width: 70%;
    height: 70%;
}

.rtf-person-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rtf-person-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.rtf-person-instrument {
    font-size: 0.8rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.rtf-person-also-in {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
    display: block;
    margin-top: 3px;
    line-height: 1.3;
}

.rtf-also-in-link {
    color: var(--rtf-primary, #C8102E);
    cursor: pointer;
    font-style: normal;
    font-weight: 600;
}

.rtf-also-in-link:hover {
    text-decoration: underline;
}

/* Netzwerk-Sektion */
.rtf-network-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rtf-network-row {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 8px 12px;
    background: var(--rtf-row-alt, #f8f8fa);
    border-radius: var(--rtf-border-radius, 6px);
}

.rtf-network-name {
    font-weight: 600;
    color: var(--rtf-primary, #C8102E);
    text-decoration: none;
}

.rtf-network-name:hover {
    text-decoration: underline;
}

.rtf-network-text {
    color: #555;
}

.rtf-network-text a {
    color: var(--rtf-primary, #C8102E);
    font-weight: 600;
    text-decoration: none;
}

.rtf-network-text a:hover {
    text-decoration: underline;
}

.rtf-instrument-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.rtf-instrument-icon svg,
img.rtf-instrument-icon {
    width: 14px;
    height: 14px;
}

/* Bearbeitungslink anfordern */
/* Buchungsanfrage */
.rtf-booking {
    margin-top: 2rem;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.rtf-booking-intro {
    color: #555;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

#rtf-booking-toggle {
    font-size: 1rem;
    padding: 12px 28px;
}

.rtf-booking-form-wrap {
    margin-top: 1.5rem;
}

.rtf-booking-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: var(--rtf-border-radius, 8px);
    padding: 1.5rem;
}

.rtf-booking-form fieldset {
    margin-bottom: 1.2rem;
    border: none;
    padding: 0;
}

.rtf-booking-form legend {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: #333;
}

.rtf-booking-form .rtf-field {
    margin-bottom: 0.8rem;
}

.rtf-booking-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #333;
}

.rtf-booking-form input[type="text"],
.rtf-booking-form input[type="email"],
.rtf-booking-form input[type="tel"],
.rtf-booking-form input[type="date"],
.rtf-booking-form input[type="time"],
.rtf-booking-form input[type="number"],
.rtf-booking-form select,
.rtf-booking-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rtf-booking-form input:focus,
.rtf-booking-form select:focus,
.rtf-booking-form textarea:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

.rtf-booking-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.2rem;
}

.rtf-btn-secondary {
    background: #eee;
    color: #555;
    border: 1px solid #ccc;
    padding: 10px 24px;
    border-radius: var(--rtf-border-radius);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.rtf-btn-secondary:hover {
    background: #ddd;
}

@media (max-width: 600px) {
    .rtf-booking-form .rtf-field-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Buchungsformular */
.rtf-booking-section {
    margin-top: 2rem;
}

.rtf-booking-toggle {
    font-size: 1rem;
    padding: 12px 28px;
}

.rtf-booking-form-wrap {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: var(--rtf-border-radius, 8px);
}

.rtf-booking-form-wrap h2 {
    margin-top: 0;
    font-size: 1.3rem;
}

.rtf-booking-intro {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.rtf-booking-form-wrap fieldset {
    margin-bottom: 1.2rem;
    border: none;
    padding: 0;
}

.rtf-booking-form-wrap legend {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.rtf-booking-form-wrap .rtf-field {
    margin-bottom: 0.8rem;
}

.rtf-booking-form-wrap label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.rtf-booking-form-wrap input[type="text"],
.rtf-booking-form-wrap input[type="email"],
.rtf-booking-form-wrap input[type="tel"],
.rtf-booking-form-wrap input[type="date"],
.rtf-booking-form-wrap input[type="time"],
.rtf-booking-form-wrap input[type="number"],
.rtf-booking-form-wrap select,
.rtf-booking-form-wrap textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rtf-booking-form-wrap input:focus,
.rtf-booking-form-wrap select:focus,
.rtf-booking-form-wrap textarea:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

/* Booking form rows */
.rtf-booking-hint {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.rtf-form-row {
    margin-bottom: 1rem;
}

.rtf-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #333;
}

.rtf-form-row input[type="text"],
.rtf-form-row input[type="email"],
.rtf-form-row input[type="tel"],
.rtf-form-row input[type="date"],
.rtf-form-row input[type="time"],
.rtf-form-row input[type="number"],
.rtf-form-row select,
.rtf-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rtf-form-row input:focus,
.rtf-form-row select:focus,
.rtf-form-row textarea:focus {
    border-color: var(--rtf-primary);
    outline: none;
}

.rtf-form-row-inline {
    display: flex;
    gap: 1rem;
}

.rtf-form-row-inline > div {
    flex: 1;
}

.rtf-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.2rem;
}

.rtf-form-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 0.9rem;
}

.rtf-form-message.rtf-msg-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rtf-form-message.rtf-msg-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rtf-field-row {
    display: flex;
    gap: 1rem;
}

.rtf-field-row .rtf-field {
    flex: 1;
}

@media (max-width: 600px) {
    .rtf-field-row {
        flex-direction: column;
        gap: 0;
    }
    .rtf-form-row-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Booking + Edit-Elemente ausserhalb article brauchen auch Padding im Wrapper */
.rtf-formation-content-wrap > .rtf-section,
.rtf-formation-content-wrap > .rtf-edit-request {
    padding-left: 24px;
    padding-right: 24px;
}

.rtf-edit-request {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    padding-bottom: 24px;
    border-top: 1px solid #eee;
}

/* ── Person Edit (Frontend) ─────────────────────────── */

.rtf-edit-persons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rtf-edit-person-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--rtf-row-alt);
    border-radius: var(--rtf-border-radius);
    font-size: 0.85rem;
}

.rtf-role-tag {
    color: #888;
    font-size: 0.75rem;
}

.rtf-remove-person {
    background: none;
    border: none;
    color: #a00;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 2px;
    line-height: 1;
}

.rtf-person-search-wrap {
    position: relative;
}

.rtf-autocomplete-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--rtf-border-radius);
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rtf-autocomplete-dropdown > div:hover {
    background: var(--rtf-row-alt);
}

.rtf-person-assign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 10px;
    background: #f0f8ff;
    border-radius: var(--rtf-border-radius);
}

.rtf-person-assign-row select {
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: var(--rtf-border-radius);
    border: 1px solid #ccc;
}

.rtf-role-checkboxes {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rtf-role-checkboxes label {
    font-size: 0.82rem;
    white-space: nowrap;
    cursor: pointer;
}

.rtf-btn-small {
    padding: 4px 12px;
    font-size: 0.82rem;
    border: none;
    background: var(--rtf-primary);
    color: #fff;
    border-radius: var(--rtf-border-radius);
    cursor: pointer;
    white-space: nowrap;
}

.rtf-btn-small:hover {
    background: #a00d24;
}

.rtf-edit-request-link {
    color: #999;
    font-size: 0.8rem;
    text-decoration: none;
}

.rtf-edit-request-link:hover {
    color: var(--rtf-primary);
}

.rtf-add-event-btn {
    white-space: nowrap;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
    .rtf-form {
        padding: 1.5rem 1rem;
    }

    .rtf-header {
        min-height: 200px;
    }

    .rtf-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .rtf-profile-image {
        width: 80px;
        height: 80px;
    }

    .rtf-name {
        font-size: 1.5rem;
    }

    .rtf-verzeichnis[data-columns="3"] .rtf-grid,
    .rtf-verzeichnis[data-columns="4"] .rtf-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rtf-search-bar {
        flex-direction: column;
    }

    .rtf-filter-group {
        flex-direction: column;
        gap: 6px;
    }

    .rtf-filter-label {
        min-width: unset;
    }

    .rtf-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rtf-toolbar-right {
        flex-wrap: wrap;
    }

    .rtf-sort-select {
        font-size: 0.8rem;
    }

    .rtf-table th, .rtf-table td {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .rtf-filter {
        min-width: unset;
    }

    .rtf-field-row {
        grid-template-columns: 1fr;
    }

    .rtf-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    /* Tablet: Komponist + Label ausblenden */
    .rtf-katalog-table th:nth-child(2),
    .rtf-katalog-table td:nth-child(2),
    .rtf-katalog-table th:nth-child(5),
    .rtf-katalog-table td:nth-child(5) {
        display: none;
    }

    .rtf-wish-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .rtf-verzeichnis .rtf-grid {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }

    /* Mobil: Kategorien-Spalte in Formationen-Tabelle ausblenden */
    .rtf-table th:nth-child(3),
    .rtf-table td:nth-child(3) {
        display: none;
    }

    .rtf-header-overlay {
        padding: 1rem;
    }

    /* Mobil: auch Album + Jahr ausblenden */
    .rtf-katalog-table th:nth-child(3),
    .rtf-katalog-table td:nth-child(3),
    .rtf-katalog-table th:nth-child(4),
    .rtf-katalog-table td:nth-child(4) {
        display: none;
    }
}


/* Person Detail Page */

.rtf-person-content-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff !important;
    padding: 24px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rtf-person-detail-page {
}

.rtf-person-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.rtf-person-image { flex-shrink: 0; }

.rtf-person-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.rtf-person-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e8e0d8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #b0a090;
}

.rtf-person-detail-page .rtf-person-info { flex: 1; min-width: 0; }

.rtf-person-detail-page .rtf-person-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--rtf-header-bg, #1a1a2e);
    margin: 0 0 8px;
    line-height: 1.2;
}

.rtf-person-roles { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

.rtf-person-role-badge {
    display: inline-block;
    background: var(--rtf-primary, #C8102E);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rtf-person-life { font-size: 0.95rem; color: #666; margin-bottom: 8px; }

.rtf-person-instruments { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.rtf-person-instrument {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.85rem;
    color: #333;
}

.rtf-person-wiki-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rtf-primary, #C8102E);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.rtf-person-wiki-link:hover { opacity: 0.8; }

.rtf-person-section {
    margin-bottom: 24px;
}

.rtf-person-section h2 {
    font-size: 1.2rem;
    color: var(--rtf-header-bg, #1a1a2e);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--rtf-primary, #C8102E);
}

.rtf-person-bio { font-size: 0.95rem; line-height: 1.7; color: #333; }
.rtf-person-bio p:last-child { margin-bottom: 0; }

.rtf-person-formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.rtf-person-formation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 12px;
    border-radius: var(--rtf-border-radius, 6px);
    border: 1px solid #eee;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}

.rtf-person-formation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rtf-person-formation-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.rtf-person-formation-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rtf-header-bg, #1a1a2e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 8px;
}

.rtf-person-formation-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--rtf-header-bg, #1a1a2e);
}

.rtf-person-formation-role { font-size: 0.78rem; color: #888; margin-top: 2px; }

.rtf-person-back { margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee; }

.rtf-person-back a {
    color: var(--rtf-primary, #C8102E);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.rtf-person-back a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .rtf-person-header { flex-direction: column; align-items: center; text-align: center; }
    .rtf-person-image img { width: 80px; height: 80px; }
    .rtf-person-roles, .rtf-person-instruments { justify-content: center; }
    .rtf-person-formations-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ── Personen-Verzeichnis (/personen/) ─────────────────── */

.rtf-personen-verzeichnis { max-width: 960px; margin: 0 auto; font-size: var(--rtf-font-size, 0.9rem); }

.rtf-personen-header-bar {
    margin-bottom: 12px;
}
.rtf-personen-header-bar h1 { margin: 0; font-size: 1.5rem; }

.rtf-personen-search-wrap {
    margin-bottom: 20px;
    position: relative;
}
.rtf-personen-search-wrap input[type="text"] {
    width: 100%; padding: 12px 44px 12px 16px;
    border: 2px solid #ddd; border-radius: 6px;
    font-size: 1rem; background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.rtf-personen-search-wrap input[type="text"]:focus {
    outline: none; border-color: var(--rtf-primary, #C8102E);
}
.rtf-personen-search-wrap input[type="text"]::placeholder {
    color: #aaa;
}
.rtf-personen-reset {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #999; text-decoration: none;
    border-radius: 50%; background: #eee;
    transition: background 0.2s, color 0.2s;
}
.rtf-personen-reset:hover { background: var(--rtf-primary, #C8102E); color: #fff; }

.rtf-personen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.rtf-person-card {
    display: flex; flex-direction: column; align-items: center;
    background: var(--rtf-card-bg, #fff);
    border-radius: 6px; box-shadow: var(--rtf-card-shadow, 0 2px 8px rgba(0,0,0,0.1));
    padding: 16px 12px 14px; text-decoration: none; color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
    text-align: center;
}
.rtf-person-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-2px);
}

.rtf-person-card-img {
    width: 80px; height: 80px; object-fit: cover; border-radius: 50%; margin-bottom: 10px;
}

.rtf-person-card-placeholder {
    width: 80px; height: 80px; border-radius: 50%; background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #bbb; margin-bottom: 10px;
}

.rtf-person-card-body { width: 100%; }

.rtf-person-card-name {
    font-weight: 600; font-size: 0.95rem; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.rtf-person-card-roles { font-size: 0.78rem; color: var(--rtf-primary, #C8102E); font-weight: 600; margin-bottom: 4px; }

.rtf-person-card-instruments {
    display: flex; gap: 4px; justify-content: center; margin-bottom: 4px;
}

.rtf-person-card-count { font-size: 0.78rem; color: #888; }

.rtf-page-current {
    display: inline-block; padding: 4px 10px; background: var(--rtf-primary, #C8102E);
    color: #fff; border-radius: 4px; font-weight: 600; font-size: 0.85rem;
}

.rtf-page-link {
    display: inline-block; padding: 4px 10px;
    color: var(--rtf-primary, #C8102E); text-decoration: none;
    border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem;
}
.rtf-page-link:hover { background: #f5f5f5; }

/* ── Instrument-Miniaturbilder in Mitgliederliste ──────── */

.rtf-person-instrument-icons {
    display: inline-flex; gap: 4px; align-items: center; margin-right: 6px;
}

.rtf-instrument-mini {
    width: 18px; height: 18px; object-fit: contain; vertical-align: middle;
}

/* ── Person-Item als Link (Formations-Mitgliederliste) ── */

a.rtf-person-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px; border-radius: 6px;
    transition: background 0.15s;
}
a.rtf-person-item:hover { background: #f5f5f5; }

/* ── Personen-Bearbeitungsformular ─────────────────────── */

.rtf-person-edit-wrap { font-size: var(--rtf-font-size, 0.9rem); }

.rtf-btn-sm {
    display: inline-block; padding: 6px 14px;
    background: var(--rtf-primary, #C8102E); color: #fff;
    border: none; border-radius: 4px; font-size: 0.85rem;
    text-decoration: none; cursor: pointer; font-weight: 600;
}
.rtf-btn-sm:hover { opacity: 0.9; }

@media (max-width: 600px) {
    .rtf-personen-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* ── Statistik-Leiste ──────────────────────────────── */
.rtf-stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    padding: 20px 16px;
    margin-bottom: 20px;
    background: var(--rtf-header-bg, #1a1a2e);
    border-radius: 8px;
    text-align: center;
}

.rtf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.rtf-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.rtf-stat-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* ── Entdecke-Formation ────────────────────────────── */
.rtf-discover {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #fdf6f0 0%, #f0f4fd 100%);
    border: 1px solid #e8e0d8;
}

.rtf-discover-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.rtf-discover-image {
    flex: 0 0 180px;
    overflow: hidden;
}

.rtf-discover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rtf-discover-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rtf-discover-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 4px;
}

.rtf-discover-name {
    font-size: 1.3rem;
    margin: 0 0 8px;
    line-height: 1.2;
}

.rtf-discover-name a {
    color: var(--rtf-header-bg, #1a1a2e);
    text-decoration: none;
}

.rtf-discover-name a:hover {
    color: var(--rtf-primary, #C8102E);
}

.rtf-discover-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.rtf-discover-bio {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px;
}

.rtf-discover-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rtf-primary, #C8102E);
    text-decoration: none;
}

.rtf-discover-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .rtf-stats-bar { gap: 8px 16px; padding: 14px 12px; }
    .rtf-stat-number { font-size: 1.2rem; }
    .rtf-stat-label { font-size: 0.65rem; }

    .rtf-discover-inner { flex-direction: column; }
    .rtf-discover-image { flex: 0 0 auto; max-height: 180px; }
    .rtf-discover-content { padding: 16px; }
    .rtf-discover-name { font-size: 1.1rem; }
}

/* ── Kantonskarte ──────────────────────────────────── */
.rtf-map-wrap {
    margin-bottom: 24px;
}

.rtf-map-container {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 520px;
}

@media (max-width: 768px) {
    .rtf-map-container { height: 380px; }
}

@media (max-width: 480px) {
    .rtf-map-container { height: 300px; }
}

/* Leaflet-Karte innerhalb des Containers */
.rtf-map-container .leaflet-container {
    border-radius: 8px;
    font-family: inherit;
}

/* Tooltip-Styling für die Choropleth-Karte */
.rtf-leaflet-tooltip {
    background: rgba(26, 26, 46, 0.92) !important;
    color: #fff !important;
    font-size: 0.82rem !important;
    padding: 6px 12px !important;
    border: none !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    white-space: nowrap;
}
.rtf-leaflet-tooltip::before {
    border-top-color: rgba(26, 26, 46, 0.92) !important;
}

/* Info-Bar unter der Karte */
.rtf-map-info {
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #666;
    background: #fafafa;
    border-top: 1px solid #eee;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rtf-map-info strong {
    color: var(--rtf-primary, #C8102E);
}
.rtf-map-info-text {
    opacity: 0.7;
}

.rtf-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    padding: 12px 0 4px;
    font-size: 0.78rem;
    color: #666;
}

.rtf-map-legend-label {
    font-weight: 600;
    color: #444;
}

.rtf-map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rtf-map-legend-color {
    display: inline-block;
    width: 16px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .rtf-map-legend { font-size: 0.7rem; gap: 4px 10px; }
}
