/* ─────────────────────────────────────────────
   Radio Tell Musikkatalog – Frontend Styles
   Namespace: .rt-mkat-
   ───────────────────────────────────────────── */

:root {
    --rt-primary:       #C8102E;
    --rt-header-bg:     #1A1A2E;
    --rt-row-alt:       #F2F4F8;
    --rt-font-size:     0.9rem;
    --rt-border-radius: 4px;
}

/* ── Gesamtanzahl-Banner ── */
.rt-mkat-total-count {
    font-size: 0.88rem;
    color: #666;
    padding: 6px 0 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rt-mkat-total-count strong {
    color: var(--rt-primary);
    font-size: 1rem;
}
.rt-mkat-total-icon {
    font-size: 1rem;
}

/* ── Wrapper ── */
.rt-mkat-wrap {
    font-size: var(--rt-font-size);
    font-family: inherit;
    color: #1a1a1a;
    max-width: 100%;
}

/* ── Formular ── */
.rt-mkat-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--rt-border-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.rt-mkat-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.rt-mkat-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rt-mkat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rt-mkat-input {
    padding: 8px 10px;
    border: 1px solid #e8b0ba;
    border-radius: var(--rt-border-radius);
    font-size: var(--rt-font-size);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
    box-sizing: border-box;
    background: #fff5f6;
    color: #1a1a1a;
}

.rt-mkat-input::placeholder {
    color: #c0a0a6;
    opacity: 1;
    transition: opacity 0.15s;
}

.rt-mkat-input:focus {
    outline: none;
    border-color: var(--rt-primary);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.15);
}

.rt-mkat-input:focus::placeholder {
    opacity: 0;
}

/* ── Buttons ── */
.rt-mkat-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.rt-mkat-btn {
    padding: 8px 18px;
    border-radius: var(--rt-border-radius);
    font-size: var(--rt-font-size);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, opacity 0.2s;
}

.rt-mkat-btn--primary {
    background: var(--rt-primary);
    color: #fff;
}
.rt-mkat-btn--primary:hover {
    opacity: 0.88;
}
.rt-mkat-btn--secondary {
    background: #eee;
    color: #444;
    border: 1px solid #ccc;
}
.rt-mkat-btn--secondary:hover {
    background: #e0e0e0;
}

/* ── Status / Trefferanzeige ── */
.rt-mkat-status {
    min-height: 28px;
    padding: 6px 0;
    font-size: 0.88rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-mkat-status .rt-mkat-count {
    font-weight: 700;
    color: var(--rt-primary);
    font-size: 1rem;
}

.rt-mkat-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: var(--rt-primary);
    border-radius: 50%;
    animation: rt-spin 0.6s linear infinite;
}
@keyframes rt-spin { to { transform: rotate(360deg); } }

/* ── Ergebnistabelle ── */
.rt-mkat-results {
    width: 100%;
    overflow-x: auto;
}

.rt-mkat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rt-font-size);
    border: 1px solid #e0e0e0;
    border-radius: var(--rt-border-radius);
    overflow: hidden;
}

.rt-mkat-table thead th {
    background: var(--rt-header-bg);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.rt-mkat-table thead th:hover {
    opacity: 0.85;
}

.rt-mkat-table thead th .sort-icon {
    margin-left: 4px;
    opacity: 0.5;
    font-size: 0.7rem;
}
.rt-mkat-table thead th.sorted-asc .sort-icon::after  { content: ' ▲'; opacity: 1; }
.rt-mkat-table thead th.sorted-desc .sort-icon::after { content: ' ▼'; opacity: 1; }
.rt-mkat-table thead th:not(.sorted-asc):not(.sorted-desc) .sort-icon::after { content: ' ↕'; }

.rt-mkat-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.1s;
}
.rt-mkat-table tbody tr:nth-child(even) {
    background: var(--rt-row-alt);
}
.rt-mkat-table tbody tr:hover {
    background: rgba(200, 16, 46, 0.05);
}

.rt-mkat-table td {
    padding: 8px 12px;
    vertical-align: middle;
    line-height: 1.4;
}

.rt-mkat-table td.col-year {
    white-space: nowrap;
    color: #777;
    font-size: 0.82rem;
}

/* ── Play-Button ── */
.rt-mkat-play-btn {
    background: var(--rt-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s, transform 0.1s;
    flex-shrink: 0;
}
.rt-mkat-play-btn:hover { opacity: 0.85; }
.rt-mkat-play-btn:active { transform: scale(0.95); }
.rt-mkat-play-btn svg { width: 14px; height: 14px; fill: #fff; }
/* Aktiver Player: hellrot */
.rt-mkat-play-btn.playing,
.rt-mkat-play-btn.playing:hover {
    background: #e8455a;
    opacity: 1;
}

/* ── Wünschen-Link ── */
.rt-mkat-wunsch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
    background: none !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s, transform 0.15s;
    border: none;
    line-height: 1;
}
.rt-mkat-wunsch-btn .rt-mkat-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: fill 0.15s, stroke 0.15s, transform 0.15s;
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 2;
    stroke-linejoin: round;
}
.rt-mkat-wunsch-btn:hover {
    color: var(--rt-primary) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}
.rt-mkat-wunsch-btn:hover .rt-mkat-icon {
    fill: var(--rt-primary);
    stroke: var(--rt-primary);
    transform: scale(1.2);
}

/* ── Mini Audio-Player ── */
.rt-mkat-audio-wrap {
    padding: 8px 0 4px;
}
.rt-mkat-audio-wrap audio {
    width: 220px;
    height: 32px;
    display: block;
}

/* ── Pagination ── */
.rt-mkat-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.rt-mkat-page-btn {
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: var(--rt-border-radius);
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
    color: #333;
}
.rt-mkat-page-btn:hover {
    background: var(--rt-row-alt);
    border-color: var(--rt-primary);
}
.rt-mkat-page-btn.active {
    background: var(--rt-primary);
    color: #fff;
    border-color: var(--rt-primary);
    font-weight: 700;
}
.rt-mkat-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rt-mkat-page-info {
    font-size: 0.85rem;
    color: #777;
    padding: 0 6px;
}

/* ── No results ── */
.rt-mkat-no-results {
    text-align: center;
    padding: 32px 16px;
    color: #888;
    font-style: italic;
    border: 1px dashed #ddd;
    border-radius: var(--rt-border-radius);
    margin-top: 8px;
}

/* ── Responsive: Tablet / Phone Landscape (≤640px) ── */
@media (max-width: 640px) {
    .rt-mkat-fields {
        grid-template-columns: 1fr 1fr;
    }
    .rt-mkat-form {
        padding: 14px;
    }
    .rt-mkat-table td,
    .rt-mkat-table th {
        padding: 6px 8px;
        font-size: 0.82rem;
    }
}

@media (max-width: 400px) {
    .rt-mkat-fields {
        grid-template-columns: 1fr;
    }
}

/* ── Responsive: iPhone Portrait (≤430px) ── */
/* Komponist + Label ausblenden; Hörprobe + Wünschen nur als Icon */
@media (max-width: 430px) {

    .rt-mkat-table {
        font-size: 0.78rem;
    }
    .rt-mkat-table td,
    .rt-mkat-table th {
        padding: 5px 4px;
    }

    /* Komponist ausblenden – via CSS-Klasse (zuverlässig unabhängig von Spaltenposition) */
    .rt-mkat-table .col-composer {
        display: none;
    }

    /* Label ausblenden */
    .rt-mkat-table .col-label {
        display: none;
    }

    /* Hörprobe + Wünschen: schmale Icon-Spalte */
    .rt-mkat-table .col-snippet,
    .rt-mkat-table .col-wunsch {
        width: 34px;
        min-width: 34px;
        text-align: center;
        padding: 5px 2px;
    }

    /* «Wünschen»-Text ausblenden, nur Stern-Icon */
    .rt-mkat-wunsch-btn .rt-mkat-btn-label {
        display: none;
    }
    .rt-mkat-wunsch-btn {
        padding: 2px;
        justify-content: center;
    }
    .rt-mkat-wunsch-btn .rt-mkat-icon {
        width: 20px;
        height: 20px;
    }

    /* Play-Button Touch-freundlich */
    .rt-mkat-play-btn {
        width: 30px;
        height: 30px;
    }
}

/* ── Auszug-Shortcode [rt_musikkatalog_auszug] ── */
.rt-mkat-auszug-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rt-header-bg);
    margin: 0 0 10px 0;
    padding: 0;
}
.rt-mkat-auszug-count {
    font-size: 0.8rem;
    color: #888;
    margin: 6px 0 0;
    text-align: right;
}
.rt-mkat-auszug-empty {
    color: #888;
    font-style: italic;
    padding: 8px 0;
}
.rt-mkat-auszug-table {
    margin-bottom: 0;
}

/* ── Auszug-Shortcode ── */
.rt-mkat-auszug .rt-mkat-auszug-meta {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 8px 0;
}
.rt-mkat-auszug .rt-mkat-auszug-meta strong {
    color: var(--rt-primary);
}
.rt-mkat-auszug .rt-mkat-auszug-link {
    margin: 10px 0 0 0;
    font-size: 0.88rem;
}
.rt-mkat-auszug .rt-mkat-auszug-link a {
    color: var(--rt-primary);
    text-decoration: none;
    font-weight: 600;
}
.rt-mkat-auszug .rt-mkat-auszug-link a:hover {
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════════════
   Album-Karte [rt_album_karte] — Variante B2 (Sidebar-Hero)
   Schriftgrössen + Farben an OnAir2-Theme angepasst
   ═══════════════════════════════════════════════════════════════ */

.rt-ak-heading {
    margin: 0 0 12px 0;
    /* erbt H4 des Themes vollständig */
}

.rt-ak-wrap { width: 100%; font-family: inherit; }

.rt-ak {
    display: flex;
    border: 1px solid rgba(0,0,0,0.13);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    min-height: 320px;
    font-size: 16px;
    line-height: 1.5;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.rt-ak-sidebar {
    position: relative;
    width: 210px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rt-ak-banner-bg {
    position: absolute;
    inset: 0;
    background: #1a1a2e;   /* Fallback wenn kein Cover */
    overflow: hidden;
}
.rt-ak-banner-img {
    position: absolute;
    inset: -24px;
    width: calc(100% + 48px);
    height: calc(100% + 48px);
    object-fit: cover;
    filter: blur(24px) brightness(1.0) saturate(1.1);
    opacity: 0.70;
}
.rt-ak-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(15,15,35,0.25) 0%,
        rgba(15,15,35,0.50) 55%,
        rgba(15,15,35,0.78) 100%);
}
.rt-ak-sidebar-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 14px 16px;
    height: 100%;
}
.rt-ak-badge {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 12px;
    align-self: flex-start;
}

/* Cover-Thumbnail */
.rt-ak-thumb {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.18);
    background: #2a2a3e;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rt-ak-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rt-ak-thumb-vinyl { position: relative; width: 60px; height: 60px; opacity: 0.5; }
.rt-ak-thumb-vinyl svg { width: 100%; height: 100%; }

/* Metadaten */
.rt-ak-meta { margin-top: 14px; text-align: center; width: 100%; }

.rt-ak-album-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 4px;
}
.rt-ak-artist {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 3px;
}
.rt-ak-label {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 3px;
}
.rt-ak-details {
    font-size: 11px;
    color: rgba(255,255,255,0.32);
    margin-top: 2px;
}
.rt-ak-rating {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rt-ak-stars      { font-size: 15px; color: rgba(255,200,0,0.9); letter-spacing: 1px; }
.rt-ak-rating-val { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ── Trackliste ───────────────────────────────────────────────── */
.rt-ak-tracks {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-left: 1px solid rgba(0,0,0,0.08);
}

/* Grid: Dice-Button ist 6. Zelle in col-heads → steht exakt über Wunsch-Stern.
   1fr/1fr = gleich viel Platz für Titel und Komponist */
.rt-ak-col-heads,
.rt-ak-track {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 54px 34px 34px;
    align-items: center;
    min-width: 0;
}
.rt-ak-col-heads {
    padding: 8px 14px;   /* identisch zu .rt-ak-track */
}
.rt-ak-track {
    padding: 7px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.1s;
}
.rt-ak-track:last-child { border-bottom: none; }
.rt-ak-track:hover { background: #f9f9fb; }

/* Spalten-Header */
.rt-ak-tracks-header {
    border-bottom: 2px solid var(--rt-primary, #dd3333);
    background: #f7f7f7;
    flex-shrink: 0;
}
.rt-ak-ch {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
}

/* Würfel absolut oben-rechts — damit col-heads dieselbe Breite wie track-rows hat */
.rt-ak-next-btn {
    width: 26px;
    height: 26px;
    justify-self: center;
    color: var(--rt-primary, #dd3333);
    background: none;
    border: 1px solid rgba(221,51,51,0.35);
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.rt-ak-next-btn:hover {
    background: rgba(221,51,51,0.07);
    border-color: var(--rt-primary, #dd3333);
}
.rt-ak-next-btn:disabled { opacity: 0.4; cursor: default; }

/* Track-Zellen */
.rt-ak-tracks-scroll { height: 368px; /* 8 tracks × 46px */ overflow-y: auto; flex-shrink: 0; }

.rt-ak-tno {
    font-size: 14px;
    color: #bbb;
    text-align: right;
    padding-right: 10px;
    min-width: 0;
}
.rt-ak-tname {
    font-size: 17px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
    min-width: 0;
}
.rt-ak-tcomposer {
    font-size: 15px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
    min-width: 0;
}
.rt-ak-tdur {
    font-size: 14px;
    color: #aaa;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 0;
}

/* Play-Button */
.rt-ak-play {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #aaa;
    justify-self: center;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.rt-ak-play:hover {
    border-color: var(--rt-primary, #dd3333);
    color: var(--rt-primary, #dd3333);
}
.rt-ak-play.rt-ak-play--active {
    background: var(--rt-primary, #dd3333);
    border-color: var(--rt-primary, #dd3333);
    color: #fff;
}
.rt-ak-play--empty { border: none; background: none; cursor: default; }
.rt-ak-play svg { width: 7px; height: 8px; margin-left: 1px; }

/* Wunsch-Stern */
.rt-ak-wunsch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    justify-self: center;
    color: #ddd;
    text-decoration: none;
    transition: color 0.12s, transform 0.15s;
}
.rt-ak-wunsch:hover {
    color: var(--rt-primary, #dd3333);
    transform: scale(1.3);
    text-decoration: none;
}
.rt-ak-wunsch-star {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: fill 0.12s;
}
.rt-ak-wunsch:hover .rt-ak-wunsch-star {
    fill: var(--rt-primary, #dd3333);
    stroke: var(--rt-primary, #dd3333);
}

/* Footer */
.rt-ak-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 5px 14px;
    border-top: 1px solid rgba(0,0,0,0.07);
    background: #f7f7f7;
    flex-shrink: 0;
    gap: 4px;
}
.rt-ak-source { font-size: 12px; color: #ccc; }
.rt-ak-img-hint { display: none; }  /* kein "Albumcover"-Label im Footer */
.rt-ak-audio  { display: none; }
.rt-ak-loading { padding: 24px; font-size: 14px; color: #888; }

/* Responsive ≤ 600px */
@media (max-width: 600px) {
    .rt-ak { flex-direction: column; }
    .rt-ak-sidebar { width: 100%; min-height: 150px; }
    .rt-ak-sidebar-content {
        flex-direction: row;
        align-items: flex-end;
        gap: 14px;
        padding: 12px;
    }
    .rt-ak-thumb { width: 80px; height: 80px; flex-shrink: 0; }
    .rt-ak-badge { display: none; }
    .rt-ak-meta  { text-align: left; margin-top: 0; }
    .rt-ak-rating { margin-top: 8px; }
    /* Komponist auf Mobile ausblenden */
    .rt-ak-col-heads,
    .rt-ak-track      { grid-template-columns: 24px 1fr 44px 28px 28px; }
    .rt-ak-ch--composer, .rt-ak-tcomposer { display: none; }
}
