/*
 * Community Challenges – eigenes Stylesheet.
 *
 * Bewusst nicht in Tailwind: assets/css/tailwind.css ist ein gepurgter
 * Build, der nicht in Git liegt und lokal erzeugt wird. Jede hier neu
 * gebrauchte Klasse (Fortschrittsbalken, Medaillenfarben, Sperr-Optik)
 * waere auf DEV bis zum naechsten lokalen Build unsichtbar – ohne Fehler,
 * ohne Konsolenmeldung. Ein eigenes Stylesheet liegt in Git, wird nicht
 * gepurgt und ist damit fuer einen abgegrenzten UI-Block der robustere
 * Weg (siehe CLAUDE.md, Abschnitt Tailwind-Build).
 */

.cq-ch-wrap {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1rem;
}

/* ---------- Kopf ---------- */

.cq-ch-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.cq-ch-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    justify-content: space-between;
}

.cq-ch-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.cq-ch-land {
    color: #6b6b6b;
    font-size: .95rem;
}

.cq-ch-desc {
    color: #555;
    line-height: 1.6;
    margin-top: .75rem;
}

/* ---------- Statuspille ---------- */

.cq-ch-status {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.cq-ch-status--geplant     { background: #eef2ff; color: #4338ca; }
.cq-ch-status--aktiv       { background: #e7f7ec; color: #1a7f37; }
.cq-ch-status--auswertung  { background: #fff4e5; color: #a35c00; }
.cq-ch-status--beendet     { background: #f1f1f1; color: #666; }

/* ---------- Fortschritt ---------- */

.cq-ch-goal-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: .5rem;
}

.cq-ch-bar {
    height: 18px;
    background: #ececec;
    border-radius: 999px;
    overflow: hidden;
}

.cq-ch-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffce45, #1a8c1a);
    border-radius: 999px;
    transition: width .4s ease;
}

.cq-ch-bar-fill--done {
    background: linear-gradient(90deg, #1a8c1a, #22b455);
}

.cq-ch-goal-note {
    margin-top: .5rem;
    color: #666;
    font-size: .92rem;
}

.cq-ch-goal-done {
    margin-top: .75rem;
    padding: .75rem 1rem;
    background: #e7f7ec;
    border-radius: 10px;
    color: #12631f;
    font-weight: 600;
}

/* ---------- Preise ---------- */

.cq-ch-prizes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cq-ch-prize {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cq-ch-prize:last-child { border-bottom: 0; }

.cq-ch-medal { font-size: 1.35rem; line-height: 1; }

.cq-ch-prize-text { color: #333; }

/* Der gesperrte Preispool wird NICHT unkenntlich gemacht.
   Die erste Fassung hat die Preise unscharf gezeichnet - das war genau
   verkehrt herum gedacht: der Preis ist der Grund mitzumachen. Wer ihn
   nicht lesen kann, hat keinen Anlass, das Community-Ziel zu erreichen.
   Dass er noch nicht freigeschaltet ist, sagt der Hinweis darunter - das
   reicht und ist ehrlicher als ein Weichzeichner. */

.cq-ch-lock-note {
    margin-top: .75rem;
    padding: .6rem .8rem;
    background: #f6f6f6;
    border: 1px dashed #d5d5d5;
    border-radius: 10px;
    color: #666;
    font-size: .92rem;
}

/* ---------- Eigener Stand ---------- */

.cq-ch-me {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: baseline;
}

.cq-ch-me-num {
    font-size: 1.9rem;
    font-weight: 800;
    color: #1a8c1a;
    line-height: 1;
}

.cq-ch-me-label {
    display: block;
    font-size: .82rem;
    color: #777;
    margin-top: .2rem;
}

.cq-ch-pending {
    color: #a35c00;
    font-size: .92rem;
    margin-top: .75rem;
}

/* ---------- Leaderboard ---------- */

.cq-ch-board {
    width: 100%;
    border-collapse: collapse;
}

.cq-ch-board th,
.cq-ch-board td {
    padding: .55rem .4rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: .95rem;
}

.cq-ch-board th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
}

.cq-ch-board td:last-child,
.cq-ch-board th:last-child { text-align: right; }

.cq-ch-row--me { background: #fffbe9; font-weight: 600; }

.cq-ch-empty { color: #888; padding: .75rem 0; }

/* ---------- Aktionen / Hinweise ---------- */

.cq-ch-actions {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
    color: #444;
}

.cq-ch-actions li {
    padding: .3rem 0 .3rem 1.4rem;
    position: relative;
}

.cq-ch-actions li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #1a8c1a;
    font-weight: 700;
}

.cq-ch-note {
    color: #666;
    font-size: .92rem;
    margin-top: .75rem;
}

.cq-ch-hint {
    padding: .75rem 1rem;
    background: #fff4e5;
    border-radius: 10px;
    color: #8a4f00;
    margin-bottom: 1.25rem;
}

/* ---------- Liste ---------- */

.cq-ch-list { display: grid; gap: 1rem; }

.cq-ch-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cq-ch-link:hover .cq-ch-card {
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

/* ---------- Teaser (Startseite) ---------- */

.cq-ch-teaser {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #fffdf5, #fff6e0);
    border: 1px solid #f0e2bb;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.cq-ch-teaser:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .09); }

.cq-ch-teaser-title {
    font-weight: 700;
    color: #222;
    margin: 0 0 .4rem;
}

.cq-ch-teaser-cta {
    display: inline-block;
    margin-top: .6rem;
    font-weight: 600;
    color: #1a7f37;
}

@media (max-width: 480px) {
    .cq-ch-title   { font-size: 1.25rem; }
    .cq-ch-me      { gap: 1rem; }
    .cq-ch-me-num  { font-size: 1.55rem; }
}
