/* ── Überschriften ── */

.oo-richtext h1,
.oo-richtext h2,
.oo-richtext h3,
.oo-richtext h4,
.oo-richtext h5,
.oo-richtext h6 {
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    color: #2c3e50;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
}

.oo-richtext h1 {
    background-color: rgba(52, 152, 219, 0.05);
    border-left: 4px solid rgba(52, 152, 219, 0.25);
}

.oo-richtext h2 {
    background-color: rgba(52, 152, 219, 0.04);
    border-left: 4px solid rgba(52, 152, 219, 0.2);
}

.oo-richtext h3 {
    background-color: rgba(52, 152, 219, 0.03);
    border-left: 3px solid rgba(52, 152, 219, 0.15);
}

.oo-richtext h4 {
    background-color: transparent;
    border-left: 3px solid rgba(52, 152, 219, 0.12);
}

.oo-richtext h5 {
    background-color: transparent;
    border-left: 2px solid rgba(52, 152, 219, 0.1);
}

.oo-richtext h6 {
    background-color: transparent;
    border-left: 2px solid rgba(52, 152, 219, 0.07);
}


/* ── Listen ── */

.oo-richtext ul,
.oo-richtext ol {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.oo-richtext li {
    margin-bottom: 0.15rem;
}


/* ── Bilder ── */

.oo-richtext img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}


/* ── Blockquote ── */

.oo-richtext blockquote {
    border-left: 4px solid var(--oo-info);
    background-color: var(--oo-gray-100);
    padding: 0.4rem 1.25rem;
    margin: 0.75rem 0;
}


/* ── Tabellen ── */

.oo-richtext table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 1.25rem 0;
}

/* ── Tabellenkopf ── */
.oo-richtext thead tr {
    background: var(--oo-primary, #357abd);
    color: #fff;
}

.oo-richtext thead th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid var(--oo-primary-dark, #2a6199);
}

.oo-richtext thead th:last-child {
    border-right: none;
}

/* ── Tabellenkörper ── */
.oo-richtext tbody tr {
    transition: background 0.15s ease;
}

.oo-richtext tbody tr:nth-child(even) {
    background: #f5f8fc;
}

.oo-richtext tbody tr:hover {
    background: #e8f1fb;
}

.oo-richtext tbody tr:hover th {
    background: #d1e4f6;
}

.oo-richtext tbody th {
    padding: 0.6rem 1rem;
    vertical-align: middle;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    background: #f5f8fc;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.oo-richtext tbody td {
    padding: 0.6rem 1rem;
    vertical-align: middle;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.oo-richtext tbody td:last-child {
    border-right: none;
}

.oo-richtext tbody tr:last-child td,
.oo-richtext tbody tr:last-child th {
    border-bottom: none;
}

/* ── Tabellenfuß ── */
.oo-richtext tfoot tr {
    background: #f0f0f0;
    font-weight: 600;
}

.oo-richtext tfoot td {
    padding: 0.65rem 1rem;
    border-right: 1px solid #e0e0e0;
    border-top: 2px solid #ccc;
}

.oo-richtext tfoot td:last-child {
    border-right: none;
}

/* ── Ausrichtungs-Hilfsklassen ── */
.oo-richtext th.text-right,
.oo-richtext td.text-right {
    text-align: right;
}

.oo-richtext th.text-center,
.oo-richtext td.text-center {
    text-align: center;
}
