/* ── Arbeitseinsatz Manager – Frontend ── */

.aem-wrap {
    max-width: 680px;
    margin: 0;  /* linksbündig statt auto */
    font-family: inherit;
}

.aem-event-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f0f4f8;
    border-left: 4px solid #1F4E79;
    border-radius: 0 4px 4px 0;
}

.aem-event-titel {
    font-weight: 700;
    font-size: 1.1em;
}

.aem-event-datum {
    color: #555;
}

.aem-plaetze {
    margin-left: auto;
    font-size: 0.9em;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.aem-plaetze.aem-voll {
    background: #ffebee;
    color: #c62828;
}

.aem-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.aem-fehler {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.aem-fehler ul {
    margin: 0;
    padding-left: 20px;
}

.aem-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.aem-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 540px) {
    .aem-row { grid-template-columns: 1fr; }
}

.aem-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aem-field label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
}

.aem-req {
    color: #c62828;
}

.aem-field input[type="text"],
.aem-field input[type="email"] {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.aem-field input:focus {
    outline: none;
    border-color: #1F4E79;
    box-shadow: 0 0 0 2px rgba(31,78,121,0.15);
}

.aem-checkboxen {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.aem-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 0.95em;
}

.aem-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1F4E79;
    flex-shrink: 0;
}

/* Imbiss-Block: eigene Box mit Titel */
.aem-imbiss-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aem-imbiss-block .aem-field-label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
}

.aem-imbiss-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 0.95em;
}

.aem-imbiss-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1F4E79;
    flex-shrink: 0;
}

.aem-btn {
    align-self: flex-start;
    padding: 11px 28px;
    background: #1F4E79;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.aem-btn:hover {
    background: #163a5f;
}

/* ── Vorstandsbereich: Meldeweg kurzfristige Einsätze ── */

.aem-meldung {
    max-width: 680px;
    margin: 0;
    font-family: inherit;
}

.aem-meldung-block {
    margin: 0 0 40px;
    padding: 0 0 32px;
    border-bottom: 1px solid #e3e8ee;
}

.aem-meldung-block:last-child {
    border-bottom: none;
}

.aem-meldung-block > h2 {
    margin: 0 0 6px;
    font-size: 1.2em;
}

.aem-meldung-intro {
    margin: 0 0 18px;
    color: #555;
    font-size: 0.95em;
}

.aem-meldung .aem-field input[type="date"],
.aem-meldung .aem-field select {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    /* Theme/Browser geben input[type="date"] sonst einen gelben Hintergrund –
       gleiche Behebung wie im rur-messungen-Plugin. */
    background: #fff !important;
    color: #333 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.aem-meldung-edit {
    border: 1px solid #e3e8ee;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.aem-meldung-edit > summary {
    cursor: pointer;
    font-weight: 600;
}

.aem-meldung-meta,
.aem-meldung-edit .aem-meldung-meta {
    font-weight: normal;
    color: #666;
    font-size: 0.9em;
    margin-left: 8px;
}

.aem-meldung-edit .aem-form {
    margin-top: 16px;
}

/* Helfer-Widget */

.aem-helfer-widget {
    position: relative;
}

.aem-helfer-suche {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

.aem-helfer-suche:focus {
    outline: none;
    border-color: #1F4E79;
    box-shadow: 0 0 0 2px rgba(31,78,121,0.15);
}

.aem-helfer-vorschlaege {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 240px;
    overflow-y: auto;
}

.aem-helfer-vorschlag {
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.95em;
}

.aem-helfer-vorschlag:hover {
    background: #f0f4f8;
}

.aem-helfer-leer {
    color: #777;
    cursor: default;
    font-style: italic;
}

.aem-helfer-leer:hover {
    background: transparent;
}

.aem-helfer-liste {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aem-helfer-eintrag {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f4f8;
    border: 1px solid #dbe3ec;
    border-radius: 4px;
    padding: 6px 10px;
}

.aem-helfer-name {
    flex: 1;
}

.aem-helfer-mnr {
    color: #667;
    font-size: 0.85em;
}

.aem-helfer-entfernen {
    border: none;
    background: transparent;
    color: #b71c1c;
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.aem-helfer-hinweis {
    margin: 8px 0 0;
    font-size: 0.85em;
    color: #777;
}

.aem-datenschutz-hinweis {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 0.88em;
    color: #5f5636;
    line-height: 1.5;
}
