/* Grundlayout */
.seiten-plugin {
    font-family: Arial, sans-serif;
    color: #222;
    background: #fff;
    padding: 15px;
}

.seiten-header {
    margin-bottom: 1em;
    border-bottom: 2px solid #007acc;
}

.seiten-header h3 {
    margin: 0;
    color: #007acc;
}

/* Flex Container */
.container-flex {
    display: flex;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 220px; /* fixe Sidebar-Breite */
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 1em;
}

.sidebar ul li a.button-link {
    display: inline-block; /* block wäre ok, inline-block ermöglicht minimale Breite */
    width: 100%;           /* füllt die Sidebar-Breite */
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;   /* verhindert Umbruch */
    overflow: hidden;
    text-overflow: ellipsis; /* falls doch mal zu lang */
}

.sidebar ul li a.button-link.btn-secondary {
    background-color: #555;
    color: #fff;
}

.sidebar ul li a.button-link.btn-secondary:hover {
    background-color: #444;
}

/* Suchformular */
.suchformular {
    background-color: #FAFAFA;
    padding: 10px;
    border: 1px solid #BBBBBB;
    border-radius: 7px;
    box-shadow: 0 3px 7px rgba(52,152,219,0.5);
}

.suchformular input[type="text"] {
    width: 90%;
    padding: 6px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.suchformular label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    font-size: 0.9em;
}

.suchformular .suchbutton {
    background-color: #DDDDDD;
    border-radius: 5px;
    box-shadow: 0 3px 7px rgba(52,152,219,0.5);
    color: black;
    border: none;
    padding: 7px 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.suchformular .suchbutton:hover {
    background-color: #BBBBBB;
}

/* Content Area */
.content-area {
    flex: 1 1 auto;
	/*background-color: #D5E1F0;*/
}

/* Frontend-Tabellen aus dem Editor duerfen nicht vom aktiven Theme blau eingefaerbt werden. */
.content-area .eigene-seite figure.table > table,
.content-area .eigene-seite-kategorie figure.table > table {
    width: 100%;
    border-collapse: collapse;
}

.content-area .eigene-seite figure.table > table th,
.content-area .eigene-seite figure.table > table td,
.content-area .eigene-seite-kategorie figure.table > table th,
.content-area .eigene-seite-kategorie figure.table > table td {
    padding: 10px;
    border: 1px solid #d7e0e8;
    vertical-align: top;
    color: inherit;
}

.content-area .eigene-seite figure.table > table th,
.content-area .eigene-seite-kategorie figure.table > table th {
    background: transparent;
    color: inherit;
}

.content-area .eigene-seite figure.table > table .as-editor-align-left,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-left {
    text-align: left;
}

.content-area .eigene-seite figure.table > table .as-editor-align-right,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-right {
    text-align: right;
}

.content-area .eigene-seite figure.table > table .as-editor-align-center,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-center {
    text-align: center;
}

.content-area .eigene-seite figure.table > table .as-editor-align-justify,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-justify {
    text-align: justify;
}

.content-area .eigene-seite figure.table > table .as-editor-align-right > *,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-right > * {
    margin-left: auto;
    margin-right: 0;
}

.content-area .eigene-seite figure.table > table .as-editor-align-center > *,
.content-area .eigene-seite-kategorie figure.table > table .as-editor-align-center > * {
    margin-left: auto;
    margin-right: auto;
}

/* Tabellen */
.notes-table {
    width: 100%;
    border-collapse: collapse;
    /*margin-top: 1em;*/
}

.notes-table th,
.notes-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    text-align: left;
}

/* Angepasste Überschriften */
.notes-table th {
    background: #3399ff;  /* helleres Blau */
    color: #fff;       /* weiß */
    cursor: pointer;
    user-select: none;
}

.notes-table tr.notes-row-overdue {
    background: #ffdddd;
}

.notes-table tr.notes-row-today {
    background: #fff9d9;
}

.notes-table tr.notes-row-future {
    background: #e7f5e7;
}

.notes-table td.action-links a {
    margin-right: 6px;
    text-decoration: none;
    font-size: 1.1em;
}

.notes-status-done {
    color: green;
    font-weight: bold;
}

.notes-status-open {
    color: red;
    font-weight: bold;
}

/* Formulare */
.note-form {
    max-width: 600px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.note-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-weight: bold;
}

.note-form input[type="text"],
.note-form input[type="datetime-local"],
.note-form select,
.note-form textarea {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.note-form textarea {
    resize: vertical;
}

.form-row-inline {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.form-field-small {
    flex: 1;
}

.btn-primary {
    margin-top: 15px;
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}

.btn-primary:hover {
    background: #005f99;
}

.cancel-link {
    margin-left: 15px;
    color: #777;
    text-decoration: none;
    font-size: 0.9em;
}

.cancel-link:hover {
    text-decoration: underline;
}

.btn-clear-date {
    background: #ccc;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    font-size: 1.1em;
    padding: 0 6px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 720px) {
    .container-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 15px;
    }
}
