/*
 * turnier-report-start.css
 * DanceIQ 2.0 – Test-UI für den Gast-Flow: TopTurnier-Link -> Paarauswahl ->
 * bestehenden Importer aufrufen.
 *
 * Seitenspezifische Regeln. Die sechs Farbtokens, die mit den anderen
 * V2-Seiten identisch sind (bg/surface/ink/muted/gold/gold-light) sowie
 * der Box-Sizing-Reset kommen jetzt aus /css/danceiq-v2.css, das vor
 * dieser Datei geladen wird.
 *
 * Hier verbleiben: Radien/Abstands-Skala (kein Äquivalent in den anderen
 * Seiten), --diq-danger/--diq-success (weichen von landing.css' Werten ab
 * bzw. sind hier anders), --diq-anthracite (weicht geringfügig von
 * --diq-dark ab — siehe Abschlussdokumentation), sowie alle Step-/Formular-
 * /Teilnehmerlisten-Layouts dieser Seite.
 */

:root {
    --diq-success: #22c55e;
    --diq-danger: #ef4444;
    --diq-anthracite: #1f2430;

    --diq-radius-sm: 10px;
    --diq-radius-md: 16px;
    --diq-radius-lg: 24px;

    --diq-space-1: 4px;
    --diq-space-2: 8px;
    --diq-space-3: 12px;
    --diq-space-4: 16px;
    --diq-space-5: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ttr-page {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--diq-space-5) var(--diq-space-4) 80px;
    min-height: 100vh;
}

.ttr-header { margin-bottom: var(--diq-space-5); }

.ttr-eyebrow {
    margin: 0 0 var(--diq-space-1);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--diq-gold);
    font-weight: 600;
}

.ttr-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.ttr-lead {
    margin: 0 0 var(--diq-space-4);
    color: var(--diq-muted);
    font-size: 1rem;
}

.ttr-step[hidden] { display: none; }

.ttr-form { display: flex; flex-direction: column; gap: var(--diq-space-4); }

.ttr-field { display: flex; flex-direction: column; gap: var(--diq-space-2); }

.ttr-field-label {
    font-size: 0.85rem;
    color: var(--diq-muted);
    font-weight: 600;
}

.ttr-field input[type="url"] {
    appearance: none;
    border: 1px solid #e2ddd2;
    background: var(--diq-surface);
    border-radius: var(--diq-radius-md);
    padding: 14px var(--diq-space-4);
    font-size: 1rem;
    color: var(--diq-ink);
    min-height: 52px;
    width: 100%;
}

.ttr-field input[type="url"]:focus {
    outline: none;
    border-color: var(--diq-gold);
    box-shadow: 0 0 0 3px var(--diq-gold-light);
}

.ttr-btn {
    appearance: none;
    border: none;
    border-radius: var(--diq-radius-md);
    min-height: 52px;
    width: 100%;
    padding: 0 var(--diq-space-5);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.ttr-btn-primary {
    background: var(--diq-anthracite);
    color: #fff;
}

.ttr-btn-primary:active { opacity: 0.85; }

.ttr-btn-primary:disabled {
    background: #b9b3a6;
    cursor: not-allowed;
}

.ttr-btn-ghost {
    background: transparent;
    color: var(--diq-muted);
    padding: var(--diq-space-3) 0;
    min-height: auto;
    text-decoration: underline;
    text-align: left;
}

.ttr-error {
    margin: 0;
    color: var(--diq-danger);
    font-size: 0.9rem;
}

.ttr-tournament-meta {
    background: var(--diq-surface);
    border-radius: var(--diq-radius-md);
    padding: var(--diq-space-4);
    margin-bottom: var(--diq-space-4);
}

.ttr-tournament-meta h2 {
    margin: 0 0 var(--diq-space-1);
    font-size: 1.1rem;
}

.ttr-tournament-meta p {
    margin: 0;
    color: var(--diq-muted);
    font-size: 0.9rem;
}

.ttr-participant-list {
    list-style: none;
    margin: 0 0 var(--diq-space-4);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--diq-space-2);
}

.ttr-participant-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--diq-space-3);
    background: var(--diq-surface);
    border: 1px solid #eee9dd;
    border-radius: var(--diq-radius-md);
    padding: var(--diq-space-4);
    min-height: 56px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.ttr-participant-btn:active,
.ttr-participant-btn[aria-selected="true"] {
    border-color: var(--diq-gold);
    background: var(--diq-gold-light);
}

.ttr-participant-name {
    font-weight: 600;
    color: var(--diq-ink);
}

.ttr-participant-startnr {
    color: var(--diq-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.ttr-selected-pair {
    background: var(--diq-surface);
    border-radius: var(--diq-radius-md);
    padding: var(--diq-space-4);
    margin-bottom: var(--diq-space-4);
}

.ttr-pair-name {
    margin: var(--diq-space-1) 0 0;
    font-size: 1.2rem;
    font-weight: 700;
}

#step-confirm .ttr-btn { margin-bottom: var(--diq-space-3); }

.ttr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--diq-space-3);
    padding: var(--diq-space-5) 0;
    text-align: center;
    color: var(--diq-muted);
}

.ttr-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--diq-gold-light);
    border-top-color: var(--diq-gold);
    animation: ttr-spin 0.8s linear infinite;
}

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

.ttr-debug-output {
    background: var(--diq-anthracite);
    color: #e7e3d8;
    border-radius: var(--diq-radius-md);
    padding: var(--diq-space-4);
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 var(--diq-space-4);
}

.ttr-error-panel {
    background: #fdecea;
    border-radius: var(--diq-radius-md);
    padding: var(--diq-space-4);
}

.ttr-error-message {
    margin: 0 0 var(--diq-space-3);
    color: #7a1f16;
}

@media (min-width: 640px) {
    .ttr-page { padding-top: 64px; }
    .ttr-title { font-size: 2rem; }
}

/* ── Einheitliche minimale Kopf-/Fußzeile (Navigation Landingpage ↔ Report) ── */

.ttr-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--diq-space-3) 0;
    margin-bottom: var(--diq-space-4);
    border-bottom: 1px solid #eee9dd;
}
.ttr-topbar-brand {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -.02em;
    color: var(--diq-ink);
    text-decoration: none;
}
.ttr-topbar-link {
    font-size: .85rem;
    color: var(--diq-muted);
    text-decoration: none;
}
.ttr-topbar-link:hover,
.ttr-topbar-brand:hover {
    color: var(--diq-anthracite);
}

.ttr-footer {
    max-width: 480px;
    margin: var(--diq-space-5) auto 0;
    padding: var(--diq-space-4) var(--diq-space-4) var(--diq-space-5);
    border-top: 1px solid #eee9dd;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--diq-space-4);
    font-size: .82rem;
}
.ttr-footer a { color: var(--diq-muted); text-decoration: none; }
.ttr-footer a:hover { color: var(--diq-ink); }
