.spice-inline-tables,
.spice-inline-table-editor-list {
    margin: 24px 0;
}
.spice-inline-table-wrap,
.spice-inline-table-editor {
    margin: 18px 0;
}
.spice-inline-table-editor {
    padding: 16px;
    border: 1px solid #d8dcdf;
    border-radius: 14px;
    background: #fff;
}
.spice-inline-table-editor__top,
.spice-inline-table-editor__order,
.spice-inline-table-editor__tools,
.spice-inline-table-editor__settings {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.spice-inline-table-editor__top {
    justify-content: space-between;
    margin-bottom: 10px;
}
.spice-inline-table-editor__top strong {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6f777c;
}
.spice-inline-table-editor__settings {
    gap: 18px;
    margin: 6px 0 8px;
}
.spice-inline-table-editor__settings .components-base-control { margin-bottom: 0; }
.spice-inline-table-editor__tools { margin: 8px 0 12px; }
.spice-inline-table__title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
    color: #252a2d;
}
.spice-inline-table__scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d9dddf;
    border-radius: 10px;
    background: #fff;
}
.spice-inline-table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}
.spice-inline-table th,
.spice-inline-table td {
    padding: 13px 15px;
    border-right: 1px solid #e2e5e7;
    border-bottom: 1px solid #e2e5e7;
    vertical-align: top;
    text-align: left;
    color: #394045;
    background: #fff;
    overflow-wrap: anywhere;
}
.spice-inline-table th {
    background: #f4f5f5;
    color: #252a2d;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.spice-inline-table tr:last-child > * { border-bottom: 0; }
.spice-inline-table tr > *:last-child { border-right: 0; }
.spice-inline-table tbody tr:not(:first-child):hover td { background: #fafafa; }
.spice-inline-table span { display: block; min-width: 1px; }
.spice-inline-table.is-compact th,
.spice-inline-table.is-compact td { padding: 9px 11px; font-size: 12px; }
.spice-inline-table.is-compact th { font-size: 10px; }
.spice-inline-table__caption {
    margin-top: 9px;
    color: #737b80;
    font-size: 12px;
    line-height: 1.55;
}
.editor-styles-wrapper .spice-inline-table .is-selected-cell {
    box-shadow: inset 0 0 0 2px #3858e9;
}
.editor-styles-wrapper .spice-inline-table .block-editor-rich-text__editable {
    min-width: 1px;
    width: 100%;
}
@media (max-width: 700px) {
    .spice-inline-table { min-width: 560px; }
    .spice-inline-table-editor { padding: 12px; }
}


.spice-inline-table-editor-unit,
.spice-inline-table-unit {
    display: block;
    margin: 18px 0;
}
.spice-inline-table-editor-unit > .spice-inline-table-editor,
.spice-inline-table-unit > .spice-inline-table-wrap {
    margin: 0;
}

/* Fortsetzungstext ist bewusst kein Bestandteil der Tabellenkarte. */
.spice-inline-table__continuation,
.spice-inline-table__after-text {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
    line-height: inherit;
}
.editor-styles-wrapper .spice-inline-table__continuation.block-editor-rich-text__editable,
.editor-styles-wrapper .spice-inline-table__after-text.block-editor-rich-text__editable {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
}
.editor-styles-wrapper .spice-inline-table__continuation.block-editor-rich-text__editable:focus,
.editor-styles-wrapper .spice-inline-table__after-text.block-editor-rich-text__editable:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
}

/*
 * Inline-Tabellen folgen derselben Inhaltskante wie der normale Schritttext.
 * Dadurch stehen Text oberhalb, Tabelle und Fortsetzungstext exakt bündig.
 */
.spice-learning-module__step .spice-inline-table-editor-list,
.spice-learning-module__step .spice-inline-tables,
.spice-interactive-guide__step .spice-inline-table-editor-list,
.spice-interactive-guide__step .spice-inline-tables,
.spice-branch-guide__step .spice-inline-table-editor-list,
.spice-branch-guide__step .spice-inline-tables {
    width: calc(100% - 64px);
    margin-left: 64px;
    margin-right: 0;
    box-sizing: border-box;
}

/* Das Lernmodul besitzt für das Frontend zusätzlich einen eigenen Tabellen-Wrapper. */
.spice-learning-module__step .spice-learning-module__tables {
    width: calc(100% - 64px);
    margin-left: 64px;
    margin-right: 0;
    box-sizing: border-box;
}

/* Der Fortsetzungstext richtet sich nun nach dem bereits eingerückten Tabellen-Wrapper. */
.spice-learning-module__step .spice-inline-table__continuation,
.spice-interactive-guide__step .spice-inline-table__continuation,
.spice-branch-guide__step .spice-inline-table__continuation {
    width: 100%;
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: #6f7274;
}

/* In tief verschachtelten Verzweigungen ist auch der normale Schritttext nicht eingerückt. */
.spice-branch-guide__branch-editor .spice-inline-table-editor-list,
.spice-branch-guide__branch-editor .spice-inline-tables {
    width: 100%;
    margin-left: 0;
}

/* Die klassische Schritt-für-Schritt-Anleitung arbeitet ohne 64px-Inhaltseinzug. */
.spice-guide__step .spice-inline-table-editor-list,
.spice-guide__step .spice-inline-tables {
    max-width: 830px;
    margin-left: 0;
    margin-right: 0;
}
.spice-guide__step .spice-inline-table__continuation {
    width: 100%;
    max-width: 830px;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: #77797b;
}
.spice-inline-table__after-text--frontend {
    margin-top: 20px;
}

@media (max-width: 580px) {
    .spice-learning-module__step .spice-inline-table-editor-list,
    .spice-learning-module__step .spice-inline-tables,
    .spice-learning-module__step .spice-learning-module__tables,
    .spice-interactive-guide__step .spice-inline-table-editor-list,
    .spice-interactive-guide__step .spice-inline-tables,
    .spice-branch-guide__step .spice-inline-table-editor-list,
    .spice-branch-guide__step .spice-inline-tables {
        width: 100%;
        margin-left: 0;
    }
}
