/* Combined styles for overlay and overlay content */
/* Overlay Hintergrund */
#event-overlay,
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* etwas weniger deckend */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.overlay.active, .overlay[style*="display: flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
/* Overlay-Inhalt: Schwarz mit weißer Schrift und gelben Akzenten */
.overlay-content {
    background: #232323;
    color: #FFF;
    padding: 32px 20px;
    border-radius: 16px;
    width: 70vw;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 25px 5px rgba(0,0,0,0.45);
    position: relative;
    border-top: 6px solid #FFC700;
    border-bottom: 6px solid #FFC700;
}

.overlay-content h3 {
    margin-top: 32px;    /* z.B. 32px, passe nach Bedarf an */
    margin-bottom: 10px; /* Optional: für nach unten */
    font-size: 1.08em;   /* Optional: leicht größer */
    color: #FFC700;      /* Optional: gelb, wenn gewünscht */
}

/* Passwort-Felder */
.overlay-content input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 3px;
    margin-bottom: 11px;
    box-sizing: border-box;
    border: 1.5px solid #444;
    background: #181818;
    color: #FFF;
    border-radius: 5px;
    font-size: 1em;
    height: 38px;
    transition: border-color 0.18s;
}

/* Fokuseffekt wie beim Textfeld */
.overlay-content input[type="password"]:focus {
    outline: none;
    border-color: #FFC700;
    box-shadow: 0 0 5px #FFC70044;
}

/* Schließen-Button */
.close-btn {
    cursor: pointer;
    position: absolute;
    top: 20px; right: 28px;
    font-size: 32px;
    font-weight: bold;
    color: #FFC700;
    transition: color 0.2s;
}

.close-btn:hover,
.close-btn:focus {
    color: #FFF700;
}

.overlay-content h2 {
    text-align: center;
    color: #FFC700;
    font-size: 2em;
    margin-bottom: 1.2em;
}

/* Labels und Inputs */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #FFF;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 3px;
    margin-bottom: 11px;
    box-sizing: border-box;
    border: 1.5px solid #444;
    background: #181818;
    color: #FFF;
    border-radius: 5px;
    transition: border-color 0.18s;
}
input:focus, textarea:focus {
    outline: none;
    border-color: #FFC700;
}

.ck-editor__editable_inline {
    min-height: 300px;
    max-height: 600px;
    background: #222 !important;
    color: #FFF !important;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group {
    margin-bottom: 19px;
}

button[type="submit"] {
    display: block;
    width: 80%;
    padding: 12px;
    background-color: #FFC700;
    color: #181818;
    margin-left:auto;
    margin-right:auto;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    margin-top: 12px;
    box-shadow: 0 3px 10px 1px rgba(0,0,0,.07);
    transition: background 0.2s, color 0.2s;
}

button[type="submit"]:hover {
    background: rgba(255, 217, 0, 0.71);
    padding: 12px;
    color: #000;
    margin-left:auto;
    margin-right:auto;
    border-radius: 7px;
    margin-top: 12px;
    font-size: 18px;
}


.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group.small-field {
    flex: 1 1 0;   /* Jeder bekommt gleich viel Platz */
    min-width: 0;  /* Damit die Felder auch bei wenig Platz klein werden */
}

.form-group.small-field input {
    width: 100%;
}
.file-upload-btn {
    display: inline-block;
    background: #FFC700;
    color: #181818;
    border-radius: 20px;
    padding: 8px 22px;
    font-size: 1em;
    font-weight: 600;
    margin-top: 6px;
    cursor: pointer;
    transition: background 0.16s, color 0.16s, box-shadow 0.16s;
    box-shadow: 0 2px 6px 1px rgba(0,0,0,0.05);
}

.file-upload-btn:hover,
.file-upload-btn:focus {
    background: #FFD900;
    color: #000;
    outline: none;
    box-shadow: 0 2px 12px 1px rgba(255,199,0,.14);
}
/* === Optimierte Checkbox-Gruppen-Styles für die Tag-Auswahl === */

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 14px; /* horizontal und vertikal Abstand zwischen Spalten/Zellen */
    justify-content: space-between;
    margin-bottom: 22px;
}

.checkbox-group {
    flex: 1 1 22%;      /* Bis zu vier Spalten nebeneinander, maximal auf 4 reduziert */
    min-width: 180px;
    background: transparent;
    margin-bottom: 0;   /* Kein extra Abstand unter Gruppe, da gap genutzt wird */
}

.tag-title {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #FFC700;
    font-size: 1.05em;
    letter-spacing: 0.01em;
}

.checkbox-group > div label {
    display: block;
    margin-bottom: 3px;
    font-weight: normal;
    color: #fff;
    font-size: 0.96em;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 7px;
    accent-color: #FFC700;
}

.checkbox-group label,
.checkbox-group input[type="checkbox"] {
    vertical-align: middle;
}
/* Fix: Formulare IM Overlay bekommen KEINEN Box-Rahmen und KEINE Hintergrundfarbe! */
.overlay-content form {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: unset !important;
    border-radius: 0 !important;
}
.ck-balloon-panel,
.ck.ck-balloon-panel {
    z-index: 9999 !important;
}
@media (max-width: 800px) {
    .checkbox-container {
        flex-direction: column;
        gap: 12px 0;
    }
    .checkbox-group {
        min-width: 0;
        width: 100%;
    }
}

.filter-hint {
    font-size: 0.93em;     /* Etwas kleiner */
    color: #bbbbbb;        /* Optional: leicht heller/grauer */
    margin-bottom: 8px;    /* Optional: weniger Abstand unten */
}
.filter-table {
    width: 100%;
    border-collapse: separate;
}
.filter-table td {
    padding: 2px 10px 2px 0;
    vertical-align: middle;
}
.filter-table label {
    font-weight: 400;
    color: #fff;
    margin-bottom: 0;
}
.filter-table input[type="checkbox"] {
    vertical-align: middle;
    margin: 0 4px 0 0;
}
@media (max-width: 600px) {
    .filter-table, .filter-table tr, .filter-table td {
        display: block; /* Fällt bei sehr schmalen Screens untereinander */
        width: 100%;
    }
}

#max-tag-counter {
    width: 100%;
    text-align: right;
}