/**
 * Stile für die Information-Checkbox in der Navbar
 */

/* Verstecke alle Info-Boxen initial, um Flackern beim Laden zu vermeiden */
/* WICHTIG: storyConfigSelectorInfo und groupAccessPermissionsInfo werden ausgeschlossen,
   da diese eine spezielle Logik in edit_prompts.html haben */
.alert-info:not(#storyConfigSelectorInfo):not(#groupAccessPermissionsInfo),
.alert.alert-info:not(#storyConfigSelectorInfo):not(#groupAccessPermissionsInfo),
.alert-infoUser,
.alert-infoPrompt,
.alert-infoPromptWordList,
.alert-infoPromptWordListAdd,
.alert-infoImprove,
.alert-infoActivity,
.alert-infoUserProfile,
.alert-infoBackupData,
.alert-infoPermawebData {
    display: none !important;
}

/* Diese Klasse wird von JavaScript hinzugefügt, wenn die Checkbox aktiviert ist */
/* WICHTIG: storyConfigSelectorInfo und groupAccessPermissionsInfo werden ausgeschlossen,
   da diese eine spezielle Logik in edit_prompts.html haben (abhängig von setIdSelector) */
body.show-info-boxes .alert-info:not(#storyConfigSelectorInfo):not(#groupAccessPermissionsInfo),
body.show-info-boxes .alert.alert-info:not(#storyConfigSelectorInfo):not(#groupAccessPermissionsInfo),
body.show-info-boxes .alert-infoUser,
body.show-info-boxes .alert-infoPrompt,
body.show-info-boxes .alert-infoPromptWordList,
body.show-info-boxes .alert-infoPromptWordListAdd,
body.show-info-boxes .alert-infoImprove,
body.show-info-boxes .alert-infoActivity,
body.show-info-boxes .alert-infoUserProfile,
body.show-info-boxes .alert-infoBackupData,
body.show-info-boxes .alert-infoPermawebData {
    display: block !important;
}
.prompt-form.user-settings-form .alert.alert-info {
    margin-bottom: 8px !important;
}
.prompt-form.user-settings-form .alert.alert-info + .form-group {
    margin-top: 0 !important;
}
.prompt-form.user-settings-form .alert.alert-info + .form-group,
.prompt-form.user-settings-form .alert.alert-info + .json-editor-container {
    margin-top: 0 !important;
}

/* Container für die Information-Checkbox */
.info-checkbox-container {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 10px 0 0 !important;
    white-space: nowrap;
}

/* Das Checkbox-Element selbst */
.info-checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    cursor: pointer;
    accent-color: #0d6efd; /* Bootstrap primary color */
    vertical-align: middle;
}

/* Label für die Checkbox */
.info-checkbox-container label {
    color: white;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    line-height: 1.5;
}

/* Hover-Effekt für bessere Interaktivität */
.info-checkbox-container:hover label {
    opacity: 0.85;
}

/* Nav-Item, das die Checkbox enthält */
.navbar-nav > li.info-checkbox-item {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Responsive Design für mobile Geräte */
@media (max-width: 991px) {
    .info-checkbox-container {
        margin: 8px 0;
        padding: 5px 0 !important;
    }
    
    .info-checkbox-container label {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .info-checkbox-container {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 15px !important;
        margin: 5px 0;
    }
    
    .navbar-nav > li.info-checkbox-item {
        width: 100%;
    }
}

/* Anpassungen für collapsed Navbar */
.navbar-collapse.collapse:not(.show) .info-checkbox-container {
    display: flex !important;
}

/* Dark mode Unterstützung (optional) */
@media (prefers-color-scheme: dark) {
    .info-checkbox-container label {
        color: #f8f9fa;
    }
}

/* Stelle sicher, dass beide Info-Boxen die gleiche Breite haben wie andere alert-info Boxen */
#storyConfigSelectorInfo,
#groupAccessPermissionsInfo {
    /* Erbe die Standard-Breite von .alert-info */
    width: auto;
    max-width: none;
}
/* Visuelle Breitenangleichung: Beide Info-Boxen sollen die gleiche Breite haben */
#storyConfigSelectorInfo {
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

/* groupAccessPermissionsInfo soll exakt so breit wie storyConfigSelectorInfo sein, trotz Parent-Padding */
#groupAccessPermissionsInfo {
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem 1rem;
    box-sizing: border-box;
}

/* Leichter Abstand für die Checkbox toggleParticipantsCheckbox zum Rand */
#toggleParticipantsCheckbox,
.form-check-label[for="toggleParticipantsCheckbox"] {
    margin-left: 0.25rem;
}

/* Abstand der Teilnehmer-Tabelle zum äußeren Container */
#participantsTableCard {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.card-body + #participantsTableCard {
    margin-top: 3.5rem !important;
    margin-left: 2.5rem !important;
    margin-right: 2.5rem !important;
    border-radius: 12px !important;
    border: 1.5px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background: #fff;
}

/* Spezielle Behandlung für json_editor.html */
body.show-info-boxes .json-editor-container {
    margin-top: 10px !important;
}

/* Stelle sicher, dass die Überschrift "Fragen und Antworten" sichtbar ist */
body.show-info-boxes .json-editor-container h3 {
    margin-top: 5px !important;
    clear: both !important;
}

/* Verbessere die Sichtbarkeit der Informationsboxen */
body.show-info-boxes .alert-info {
    position: relative !important;
    margin-bottom: 20px !important;
    z-index: 1;
}