/* ── Tabulky ve frontendu ───────────────────────────────────── */
.kfbz-article table,
.k-block--tiptap table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;
}

.kfbz-article table th,
.kfbz-article table td {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    vertical-align: top;
    text-align: left;
}

.kfbz-article table th {
    background: #f3f4f6;
    font-weight: 600;
    white-space: nowrap;
}

.kfbz-article table tr:nth-child(even) td {
    background: #f9fafb;
}

/* Tabulky v Kirby Panelu (Tiptap editor) */
.ProseMirror table {
    border-collapse: collapse;
    margin: 1rem 0;
    width: 100%;
    table-layout: fixed;
    overflow: hidden;
}

.ProseMirror table td,
.ProseMirror table th {
    min-width: 2em;
    border: 1px solid #ced4da;
    padding: 4px 6px;
    vertical-align: top;
    box-sizing: border-box;
    position: relative;
}

.ProseMirror table th {
    font-weight: bold;
    background: #f1f3f5;
    text-align: left;
}

.ProseMirror .selectedCell::after {
    z-index: 2;
    position: absolute;
    content: "";
    inset: 0;
    background: rgba(100, 149, 237, 0.25);
    pointer-events: none;
}

/* ── Zarovnání textu ───────────────────────────────────────── */
.kfbz-article p[style*="text-align: center"],
.kfbz-article h1[style*="text-align: center"],
.kfbz-article h2[style*="text-align: center"],
.kfbz-article h3[style*="text-align: center"] { text-align: center; }

.kfbz-article p[style*="text-align: right"],
.kfbz-article h1[style*="text-align: right"],
.kfbz-article h2[style*="text-align: right"],
.kfbz-article h3[style*="text-align: right"]  { text-align: right; }

.kfbz-article p[style*="text-align: justify"] { text-align: justify; }

/* ── HTML blok ─────────────────────────────────────────────── */
.kfbz-html-block { margin: 1rem 0; }
