/* EJ Anmeldung – Frontend CSS (Theme-neutral) */
.eja-form-wrap { max-width: 600px; margin: 0 auto; }
.eja-event-description { margin-bottom: 16px; }
.eja-event-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; font-size: 14px; color: #555; }
.eja-meta-item { background: #f8f9fa; border-radius: 20px; padding: 4px 12px; }
.eja-meta-item.eja-full { background: #fee2e2; color: #dc2626; }

.eja-notice { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.eja-notice-wait { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }

/* Form fields */
.eja-registration-form .eja-field { margin-bottom: 18px; }
.eja-registration-form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.eja-registration-form input[type="text"],
.eja-registration-form input[type="email"],
.eja-registration-form input[type="tel"],
.eja-registration-form input[type="number"],
.eja-registration-form input[type="date"],
.eja-registration-form select,
.eja-registration-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s;
}
.eja-registration-form input:focus,
.eja-registration-form select:focus,
.eja-registration-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.eja-registration-form .eja-fieldset { border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px 16px; margin: 0; }
.eja-registration-form .eja-fieldset legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.eja-registration-form .eja-checkbox-label,
.eja-registration-form .eja-radio-label {
    display: flex; align-items: center; gap: 8px; font-weight: 400;
    margin-bottom: 6px; cursor: pointer;
}
.eja-required { color: #dc2626; }
.eja-field-desc { font-size: 12px; color: #6b7280; margin: 4px 0 0; }

/* Signature */
.eja-signature-wrap { border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; background: #fff; }
.eja-signature-canvas { display: block; width: 100%; height: 150px; cursor: crosshair; touch-action: none; }
.eja-sig-clear { display: block; background: #f3f4f6; border: none; border-top: 1px solid #e5e7eb; padding: 6px 12px; font-size: 12px; color: #6b7280; cursor: pointer; width: 100%; }
.eja-sig-clear:hover { background: #fee2e2; color: #dc2626; }

/* Submit button */
.eja-form-submit { margin-top: 24px; }
.eja-btn-submit {
    display: inline-block;
    background: #1a3c5e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: inherit;
}
.eja-btn-submit:hover { background: #14304e; }
.eja-btn-submit:active { transform: scale(.98); }
.eja-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Messages */
.eja-form-message { margin-top: 16px; padding: 14px 18px; border-radius: 6px; font-size: 15px; }
.eja-form-message.eja-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.eja-form-message.eja-waitlist { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.eja-form-message.eja-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Verbesserte Checkbox & Radio Darstellung */
.eja-registration-form .eja-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0;
}
.eja-registration-form .eja-fieldset legend {
    font-weight: 600;
    font-size: 14px;
    padding: 0 6px;
    color: #374151;
}
.eja-registration-form .eja-checkbox-label,
.eja-registration-form .eja-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background .1s;
}
.eja-registration-form .eja-checkbox-label:hover,
.eja-registration-form .eja-radio-label:hover {
    background: #f1f5f9;
}
.eja-registration-form .eja-checkbox-label input,
.eja-registration-form .eja-radio-label input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: #1a3c5e;
    cursor: pointer;
}
/* Single checkbox */
.eja-field-type-checkbox .eja-checkbox-label {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
}

/* Unterschrift */
.eja-signature-wrap {
    border: 2px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    position: relative;
}
.eja-signature-canvas {
    display: block;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
}
.eja-sig-clear {
    display: block;
    background: #f8fafc;
    border: none;
    border-top: 1px solid #e5e7eb;
    padding: 7px 14px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background .15s, color .15s;
}
.eja-sig-clear:hover { background: #fee2e2; color: #dc2626; }

/* Signature-Wrap: explizite Höhe damit Canvas-Breite messbar ist */
.eja-signature-wrap {
    display: block !important;
    min-height: 170px;
}
.eja-signature-wrap {
    /* Isolate canvas from any theme transform/padding that shifts coords */
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
    min-height: 196px !important;
}
.eja-signature-canvas {
    /* box-sizing and padding MUST be zero – any padding shifts getBoundingClientRect */
    display: block !important;
    box-sizing: content-box !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
    user-select: none;
    -webkit-user-select: none;
    /* width/height set by JS only */
}

/* ── Kategorie-Übersicht ─────────────────────────────────────────── */
.eja-category-wrap { max-width: 680px; margin: 0 auto; }
.eja-category-title { margin-bottom: 4px; }
.eja-category-desc { color: #6b7280; margin-bottom: 24px; }

.eja-category-event {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    background: #fff;
}
.eja-category-event-title { margin: 0 0 10px; font-size: 18px; }
.eja-event-meta-desc { color: #555; font-size: 14px; margin: 8px 0 12px; }

.eja-event-details { margin-top: 14px; }
.eja-event-summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1a3c5e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    list-style: none;
    user-select: none;
    transition: background .15s;
}
.eja-event-summary:hover { background: #14304e; }
.eja-event-details[open] .eja-event-summary { background: #374151; }
.eja-event-details[open] .eja-form-wrap { margin-top: 16px; }
/* Remove duplicate padding when nested inside category */
.eja-category-event .eja-form-wrap { max-width: 100%; }

/* ── Kategorie-Sammelanmeldung ──────────────────────────────────── */
.eja-cat-step-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1a3c5e;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

/* Event-Karte als Checkbox */
.eja-cat-events-list { display: flex; flex-direction: column; gap: 10px; }

.eja-cat-event-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    background: #fff;
    position: relative;
}
.eja-cat-event-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(59,130,246,.12);
}
.eja-cat-event-card.eja-cat-selected {
    border-color: #1a3c5e;
    background: #eff6ff;
}
.eja-cat-event-card.eja-cat-full {
    border-color: #fde68a;
    background: #fffbeb;
}
.eja-cat-event-card.eja-cat-full.eja-cat-selected {
    border-color: #d97706;
    background: #fef3c7;
}

/* Hide native checkbox, use card style instead */
.eja-cat-event-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Check-icon rechts */
.eja-cat-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    font-size: 14px;
    font-weight: bold;
    color: transparent;
    margin-left: auto;
    transition: all .15s;
    background: #fff;
    align-self: center;
}
.eja-cat-event-card.eja-cat-selected .eja-cat-check-icon {
    border-color: #1a3c5e;
    background: #1a3c5e;
    color: #fff;
}
.eja-cat-event-card.eja-cat-full .eja-cat-check-icon {
    border-color: #d97706;
}
.eja-cat-event-card.eja-cat-full.eja-cat-selected .eja-cat-check-icon {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

.eja-cat-event-name { display: block; font-size: 15px; margin-bottom: 4px; }
.eja-cat-event-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #6b7280; }
.eja-cat-event-desc { font-size: 13px; color: #6b7280; margin-top: 6px; }

/* Spots badges */
.eja-spots { font-size: 12px; color: #374151; }
.eja-spots-full { color: #d97706; }
.eja-spots-low  { color: #dc2626; font-weight: 600; }

/* Selection info bar */
.eja-cat-selection-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-top: 12px;
}
.eja-info-wait { color: #d97706; font-size: 12px; }

/* Step 2 summary badge */
.eja-cat-selected-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.eja-cat-step1-footer { margin-top: 4px; }

.eja-notice-closed {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 16px;
}
