body {
    font-family: Arial, sans-serif;
    padding: 0;
}

header {
    background-color: #f8f9fa;
    padding: 10px;
    padding-left: 20px;
    border-bottom: 1px solid #ccc;
}

nav {
    display: flex;
    justify-content: flex-start;
}

nav a {
    text-decoration: none;
    color: #007bff;
    padding: 10px 15px;
    margin-right: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #e2e6ea;
}

nav a.active {
    background-color: #007bff;
    color: white;
}

#main {
    display: flex;
    position: relative;
}

#sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 20%;
    min-width: fit-content;
    background-color: #f4f4f4;
    padding: 20px;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    scrollbar-width: thin;
    display: flex;
    flex-direction: column;
}

#sidebar p {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#sidebar p:hover {
    background-color: #e2e2e2;
    cursor: pointer;
}

#output {
    max-width: 900px;
    padding: 20px;
    padding-left: 40px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

#message-area {
    margin: 5px;
    position: fixed;
    z-index: 999;
    right: 40px;
    top: 5%;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
}

.message-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
}

.message-container.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.message-container.info {
    background-color: #d9edf7;
    color: #31708f;
    border: 1px solid #bce8f1;
}

.message-container.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.message {
    position: relative;
    display: block;
    max-height: 400px;
    overflow: auto;
    margin-right: 10px;
}

.message-container.error p {
    margin: auto;
    text-decoration: underline;
}

.close-button {
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
}

details {
    margin: 10px 0;
    margin-bottom: 20px;
    border: 0px solid #ccc;
}

.actor {
    margin: 5px 0;
    margin-bottom: 5px;
}

summary {
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
    background-color: #ddd;
    border: 0px solid #ccc;
    border-radius: 0px;
    position: relative;
}

.summary-headline {
    font-weight: normal;
    margin: 0 auto;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

details.top-level-section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.top-level-section > summary {
    outline: none;
}

details.top-level-section[open] > summary {
    background-color: #bbb;
    margin-bottom: 10px;
}

details[open] > summary {
    background-color: #eeeeee;
}

.section-content {
    padding: 10px;
    border-left: 2px solid #007bff;
}

textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

form {
    padding: 2px;
}

fieldset {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

.additional-fields {
    margin: 5px 0px;
    padding: 5px 0px;
}

.required-fields {
    margin: 5px 0px;
    padding: 5px 0px;
}

.toggle-additional {
    background-color: #eeeeee8f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 3px 5px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: monospace;
}

.toggle-additional:hover {
    background-color: #ccc;
}

.hidden {
    display: none;
}

legend {
    font-weight: lighter;
    padding-top: 5px;
}

.legend-text {
    white-space: pre;
    padding-left: 4px;
}

.form-label {
    margin-right: 10px;
    flex: 0 0 200px;
    color: #333;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: inline-block;
    vertical-align: middle;
    block-size: fit-content;
}

.form-input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border 0.3s;
}

input[type='text'] {
    flex: auto;
}

.form-input:focus {
    border-color: #007bff;
    outline: none;
}

.form-field {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.form-error {
    display: none;
    padding: 5px;
    color: red;
    font-size: 0.9em;
}

.default {
    color: #aaa;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    z-index: 1000;
    min-width: 300px;
    max-width: 600px;
    max-height: 400px;
    overflow: auto;
    font-weight: normal;
    font-size: 0.9em;
}

dfn {
    font-style: normal;
    text-decoration: underline;
    text-decoration-style: dotted;
    padding-right: 2px;
}

span:hover .tooltip {
    display: inline;
}

summary .tooltip {
    right: 20px;
}

.show-info {
    padding-left: 0.5em;
    float: right;
}

.entry-container {
    position: relative;
    display: flex;
    flex-direction: row;
    margin: 0px 0;
    padding: 0px;
    border: 0px solid #cccccc;
}

.entry-container > fieldset {
    width: 100%;
    border: 2px solid #cccccc;
    background-color: #f9f9f9;
}

.entry-buttons {
    display: flex;
    flex-direction: column;
}

.entry-button {
    font-family: monospace;
    font-weight: bold;
    font-size: large;
    border: none;
    margin: 2px 5px;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #e0e0e0;
}

.entry-button:hover {
    background-color: #ccc;
}

.delete-field {
    color: black;
    font-family: monospace;
    font-weight: bold;
    border: none;
    margin: 5px;
}

.delete-field:hover {
    background-color: #ccc;
}

.field-container {
    position: relative;
    margin-bottom: 4px;
}
.editable-list {
    position: relative;
}

.add-button {
    padding: 1px;
    right: 10px;
    font-family: monospace;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

.actor-type {
    text-align: center;
    color: #000000;
}

.top-level-menu-item {
    padding: 2px;
    margin: 5px 0;
    background-color: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.top-level-menu-item:hover {
    background-color: #d0d0d0;
}

.nested-menu-item {
    padding: 0px;
    margin-left: 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nested-menu-item:hover {
    background-color: #e0e0e0;
}

.menu-item-text {
    padding: 2px 8px;
    flex: 100%;
    white-space: pre;
}

.menu-header {
    display: flex;
}

.menu-container {
    margin: 5px;
}

.action-bar {
    padding: 8px;
    margin: 16px;
    border-radius: 3px;
    background-color: #f4f4f4;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    right: 4vh;
    bottom: 0;
    width: 180px;
}

.action-button {
    padding: 8px 4px;
    margin: 2px 2%;
    width: 96%;
    background-color: #5d7895;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.action-button:hover {
    background-color: #0056b3;
}

.inline-button {
    background: none;
    border: none;
    color: inherit;
    padding: 2px;
    font-family: monospace;
    font-size: 16px;
    cursor: pointer;
}

.inline-button:hover {
    background-color: #c9c9c9;
    border-radius: 2px;
}

.modal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background-color: #eeeeee;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    flex: 0 0 30%;
}

.modal-input {
    margin: 10px 0;
    padding: 5px;
    width: 80%;
}

.modal-button {
    margin: 5px;
    padding: 5px 10px;
}

.chains-form {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 25px;
}

.add-chain-button {
    position: absolute;
    left: 10px;
    bottom: 0;
    margin: 5px;
}

.delete-chain-button {
    margin-left: auto;
}

.chain {
    margin: 4px;
    border-radius: 3px;
    border: 1px solid #cccccc;
    flex: 0 0 280px;
}

.chain-section {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    padding-bottom: 5px;
    max-width: 320px;
}

.chain-header {
    padding: 4px;
    border-radius: 3px;
    background-color: #eee;
}

.chain-name {
    background-color: #e0e0e0;
    text-overflow: ellipsis;
    overflow: hidden;
    padding-left: 4px;
}

.chain-buttons {
    display: flex;
}

.chain-card {
    background-color: white;
    border: 1px solid #dedede;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 12px;
    margin: 4px 0;
    margin-left: 10px;
    width: 100%;
}

.chain-card select {
    border-radius: 0;
    border-width: 2px;
    border-style: solid;
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.583);
    background-color: #cdcdcd20;
}

.bg-monitors {
    background-color: #00808020;
}

.bg-filters {
    background-color: #ffdab940;
}

.bg-actions {
    background-color: #ff7f5030;
}

.card-header-container {
    display: flex;
}

.card-header {
    width: 100%;
    margin-bottom: 10px;
}

.card-items {
    margin-bottom: 2px;
}

.card-item-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.card-item-select {
    width: 80%;
    margin-right: 5px;
}

.card-container {
    display: flex;
    flex-direction: row;
}

.card-controls {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    align-items: center;
}

.card-button {
    margin: 5px 0;
    background: none;
    border: none;
    color: inherit;
    margin: 2px;
    padding: 2px;
    font-family: monospace;
    cursor: pointer;
}

.add-card-button {
    background-color: #007bff;
    color: white;
    margin-top: auto;
}

.add-card-item-button {
    background: none;
    border: none;
    color: inherit;
    font-family: monospace;
    cursor: pointer;
    font-size: smaller;
}

.add-card-item-button:hover {
    background-color: #e9e8e844;
}

.chain:hover {
    background-color: #ffffff;
}

.card-button:hover {
    background-color: #c9c9c9;
}

.highlight {
    transition: background-color 2s ease-out;
}

.bg-highlight {
    background-color: #00b3ff56;
}

.optsearch-container {
    position: relative;
}

.optsearch-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.optsearch-suggestions {
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    background-color: white;
    position: absolute;
    width: calc(100% - 2px);
    top: 100%;
    z-index: 900;
}

.optsearch-suggestion {
    padding: 8px;
    cursor: pointer;
}

.optsearch-suggestion:hover {
    background-color: #f0f0f0;
}

.modal-view {
    background-color: #eeeeee;
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
    max-height: 80%;
    flex: 0 0 80%;
    overflow: auto;
}

.modal-view .summary-headline {
    font-style: italic;
}

.modal-view details[open] > summary {
    background-color: #dadada;
}

.history-title {
    background-color: #ddd;
    border-radius: 5px;
}
.history-row {
    margin: 4px 0;
    margin-left: 5px;
    padding-left: 5px;
    border-radius: 5px;
    background-color: #ddd;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

.history-content {
    border-radius: 5px;
    margin-left: 8px;
    display: flex;
}

.history-content p {
    margin: 2px 0;
}

.history-blank {
    color: #888;
    font-size: 0.8em;
    font-style: italic;
    text-align: center;
    width: 100%;
    margin: 5px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

tr th {
    text-align: center;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

td:hover {
    background-color: #ddd;
}

.minified {
    max-height: 6em;
    overflow-y: auto;
}
