/* ================================================================
   Brevet Multi-Anmeldung – Frontend
   ================================================================ */

:root {
    --bm-blue:       #0073aa;
    --bm-blue-dark:  #005a87;
    --bm-blue-light: #e8f4fd;
    --bm-radius:     10px;
    --bm-shadow:     0 2px 12px rgba(0,0,0,.08);
    --bm-shadow-lg:  0 4px 24px rgba(0,0,0,.12);
}

.brevetm-wrap {
    max-width: 820px;
    margin: 0 auto;
    font-size: 16px;
    font-family: inherit;
}

/* ── Cycling animation header ─────────────────────────────── */
.brevetm-anim-wrap {
    overflow: hidden;
    height: 90px;
    margin-bottom: 12px;
    border-radius: var(--bm-radius);
    background: linear-gradient(135deg, #deeef8 0%, #eef5fb 60%, #f4f8fc 100%);
}
.brevetm-road-svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* Horizontal riding motion – spokes rotate via SVG SMIL animateTransform */
.brevetm-rider {
    animation: bm-ride 5s linear infinite;
}
@keyframes bm-ride {
    from { transform: translateX(-80px); }
    to   { transform: translateX(860px); }
}

/* ── Section cards ─────────────────────────────────────────── */
.brevetm-section {
    border: 1px solid #dde4ec;
    border-radius: var(--bm-radius);
    padding: 26px 30px;
    margin-bottom: 24px;
    background: #fff;
    box-shadow: var(--bm-shadow);
}
.brevetm-section-title {
    margin: 0 0 20px;
    font-size: 1.15em;
    font-weight: 700;
    color: #1a1a2e;
    border-bottom: 3px solid var(--bm-blue);
    padding-bottom: 10px;
    letter-spacing: -0.01em;
}

/* ── Event-Zeile (Checkbox) ───────────────────────────────── */
.brevetm-event-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid #e0e8f0;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: #fafcfe;
}
.brevetm-event-row:hover:not(.is-full) {
    background: var(--bm-blue-light);
    border-color: var(--bm-blue);
    box-shadow: 0 2px 8px rgba(0,115,170,.12);
}
.brevetm-event-row:has(input:checked) {
    background: var(--bm-blue-light);
    border-color: var(--bm-blue);
    box-shadow: 0 2px 10px rgba(0,115,170,.18);
}
.brevetm-event-row input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--bm-blue);
    cursor: pointer;
}
.brevetm-event-row.is-full {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f4f4f4;
    border-color: #ddd;
}

.brevetm-event-info { flex: 1; }
.brevetm-event-name {
    font-weight: 700;
    font-size: 1.08em;
    color: #1a1a2e;
    line-height: 1.3;
}
.brevetm-event-meta {
    color: #5a6a7a;
    font-size: 0.92em;
    margin: 4px 0 7px;
}
.brevetm-event-desc {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ── Kapazitätsbalken ─────────────────────────────────────── */
.brevetm-capacity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.brevetm-capacity-bar {
    width: 220px;
    height: 12px;
    background: #dde4ec;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.brevetm-capacity-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s;
}
.brevetm-fill-green  { background: #28a745; }
.brevetm-fill-orange { background: #fd7e14; }
.brevetm-fill-red    { background: #dc3545; }

.brevetm-capacity-label { font-size: 0.84em; color: #556; }
.brevetm-full-label     { color: #dc3545; font-weight: 700; }
.brevetm-unlimited      { color: #28a745; }

/* ── Warteliste-Tags ──────────────────────────────────────── */
.brevetm-waitlist-tag {
    display: inline-block;
    background: #fd7e14;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.brevetm-wl-full-tag { background: #dc3545 !important; }

/* ── Persönliche Daten ────────────────────────────────────── */
.brevetm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}
@media (max-width: 580px) {
    .brevetm-grid { grid-template-columns: 1fr; }
    .brevetm-section { padding: 20px 18px; }
}

.brevetm-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
    font-size: 0.93em;
    letter-spacing: 0.01em;
}
.brevetm-field input,
.brevetm-field textarea,
.brevetm-field select {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #c8d4e0;
    border-radius: 7px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fafcfe;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: #1a1a2e;
}
.brevetm-field input:focus,
.brevetm-field textarea:focus,
.brevetm-field select:focus {
    border-color: var(--bm-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,.15);
    background: #fff;
}
.brevetm-full-width { margin-top: 18px; }
.brevetm-full-width textarea { resize: vertical; }

/* ── Event-Optionen ───────────────────────────────────────── */
.brevetm-event-options {
    margin: 0 0 10px 36px;
    border-left: 3px solid var(--bm-blue);
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}
.brevetm-options-inner {
    background: #f0f7ff;
    padding: 14px 18px;
}
.brevetm-opt-row { margin-bottom: 12px; }
.brevetm-opt-label {
    display: block;
    font-weight: 600;
    font-size: 0.92em;
    margin-bottom: 7px;
    color: #2c3e50;
}
.brevetm-opt-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 18px;
    font-weight: normal;
    font-size: 0.93em;
    cursor: pointer;
}
.brevetm-opt-row select {
    padding: 8px 12px;
    border: 1.5px solid #c8d4e0;
    border-radius: 7px;
    font-size: 14px;
    min-width: 220px;
    background: #fff;
    color: #1a1a2e;
    transition: border-color 0.15s;
}
.brevetm-opt-row select:focus {
    border-color: var(--bm-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}
.brevetm-price-tag {
    color: #c0392b;
    font-size: 0.87em;
    font-weight: 600;
}

/* ── Submit-Bereich ───────────────────────────────────────── */
.brevetm-submit-section { background: #f6f9fd; }
.brevetm-payment-hint {
    background: var(--bm-blue-light);
    border-left: 4px solid var(--bm-blue);
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 0.93em;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.5;
}
.brevetm-btn {
    background: var(--bm-blue);
    color: #fff;
    border: none;
    padding: 14px 38px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    box-shadow: 0 3px 10px rgba(0,115,170,.3);
}
.brevetm-btn:hover {
    background: var(--bm-blue-dark);
    box-shadow: 0 5px 16px rgba(0,115,170,.4);
    transform: translateY(-1px);
}
.brevetm-btn:active { transform: translateY(0); }
.brevetm-hint { color: #888; font-size: 13px; margin: 10px 0 0; }

/* ── Fehler & Erfolg ──────────────────────────────────────── */
.brevetm-errors {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 22px;
    color: #721c24;
}
.brevetm-errors ul { margin: 0; padding-left: 20px; }
.brevetm-field-error { color: #dc3545; font-size: 0.88em; margin: 5px 0 0; }

.brevetm-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 24px 28px;
    color: #155724;
    box-shadow: var(--bm-shadow);
}
.brevetm-success h3 { margin: 0 0 12px; font-size: 1.2em; }
.brevetm-success.is-waitlist {
    background: #fff3cd;
    border-color: #fd7e14;
    color: #7c4400;
}
.brevetm-notice { color: #666; font-style: italic; }

/* ── Datenschutz / Consent ────────────────────────────────── */
.brevetm-consent-details {
    background: #f8f9fa;
    border: 1px solid #dde4ec;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
    font-size: 0.93em;
}
.brevetm-consent-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--bm-blue);
    list-style: none;
    outline: none;
}
.brevetm-consent-details summary::-webkit-details-marker { display: none; }
.brevetm-consent-details summary::before { content: '▶ '; font-size: 0.8em; }
.brevetm-consent-details[open] summary::before { content: '▼ '; }
.brevetm-summary-hint { font-weight: normal; color: #888; font-size: 0.9em; }
.brevetm-consent-text {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    color: #444;
    line-height: 1.65;
    max-height: 300px;
    overflow-y: auto;
}
.brevetm-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.97em;
    line-height: 1.45;
    padding: 12px 16px;
    background: #fffbea;
    border: 1.5px solid #ffc107;
    border-radius: 8px;
    transition: background 0.12s;
}
.brevetm-consent-label:hover { background: #fff8d6; }
.brevetm-consent-label input[type="checkbox"] {
    margin-top: 2px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--bm-blue);
}

/* ── Stornierung ──────────────────────────────────────────── */
.brevetm-cancelled {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 18px 22px;
    color: #856404;
}
.brevetm-cancel-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}
.brevetm-cancel-event-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1.5px solid #dde4ec;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    background: #fafcfe;
}
.brevetm-cancel-event-row:hover { background: #fff3cd; border-color: #ffc107; }
.brevetm-cancel-event-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }
.brevetm-cancel-event-row span { display: flex; flex-direction: column; gap: 3px; }
.brevetm-cancel-event-row small { color: #888; font-size: 0.87em; }

.brevetm-btn-danger { background: #dc3545 !important; box-shadow: 0 3px 10px rgba(220,53,69,.3); }
.brevetm-btn-danger:hover { background: #b02a37 !important; }
