/* APlusPlugins Kadence Formatter v0.3.5: scoped, CSS-first HTML table presentation.
   No global table overrides; no mid-word wrapping; preserve document structure. */
:root {
    --aplusplg-kf-cell-min: 112px;
    --aplusplg-kf-cell-max: 480px;
    --aplusplg-kf-border: #d4d9df;
    --aplusplg-kf-stripe: #f5f7fa;
    --aplusplg-kf-heading: #e9eff6;
    --aplusplg-kf-element-gap: 20px;
    --aplusplg-kf-header-tint: 1;
}
/* Core Table already has a figure wrapper. Raw HTML tables receive one wrapper. */
.wp-block-table[class*="aplusplg-kf-style-"],
.aplusplg-kf-scroll[class*="aplusplg-kf-style-"] {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}
.wp-block-table[class*="aplusplg-kf-style-"] > table,
.aplusplg-kf-scroll[class*="aplusplg-kf-style-"] > table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0;
}
.wp-block-table[class*="aplusplg-kf-style-"] :is(th,td),
.aplusplg-kf-scroll[class*="aplusplg-kf-style-"] :is(th,td) {
    box-sizing: border-box;
    min-width: var(--aplusplg-kf-cell-min);
    max-width: var(--aplusplg-kf-cell-max);
    padding: .68rem .8rem;
    border: 1px solid var(--aplusplg-kf-border);
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}
/* min/max are guidelines with table-layout:auto; unbroken tokens remain intact. */
.wp-block-table.aplusplg-kf-style-data-standard tbody tr:nth-child(even),
.wp-block-table.aplusplg-kf-style-data-comparison tbody tr:nth-child(even),
.aplusplg-kf-scroll.aplusplg-kf-style-data-standard tbody tr:nth-child(even),
.aplusplg-kf-scroll.aplusplg-kf-style-data-comparison tbody tr:nth-child(even) {
    background: var(--aplusplg-kf-stripe);
}
.wp-block-table.aplusplg-kf-style-data-standard thead,
.wp-block-table.aplusplg-kf-style-data-comparison thead,
.aplusplg-kf-scroll.aplusplg-kf-style-data-standard thead,
.aplusplg-kf-scroll.aplusplg-kf-style-data-comparison thead {
    background: var(--aplusplg-kf-actual-header-background, var(--aplusplg-kf-heading));
}
.wp-block-table.aplusplg-kf-style-data-comparison tr > :first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-data-comparison tr > :first-child {
    font-weight: 600;
    background: var(--aplusplg-kf-heading);
}
.wp-block-table.aplusplg-kf-style-data-compact :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-data-compact :is(th,td) {
    padding: .35rem .5rem;
    font-size: .94em;
}
.wp-block-table.aplusplg-kf-style-control-card,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card {
    border: 1px solid #bacde0;
    border-radius: .45rem;
}
.wp-block-table.aplusplg-kf-style-control-card tr > :first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card tr > :first-child {
    font-weight: 600;
    background: var(--aplusplg-kf-heading);
    min-width: 9rem;
    width: 25%;
}
.wp-block-table.aplusplg-kf-style-callout-info,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info {
    border-left: .3rem solid #356cab;
    background: #f5f9ff;
}
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td) {
    border-color: transparent;
    min-width: 0;
}
.wp-block-table.aplusplg-kf-style-worksheet :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet :is(th,td) {
    min-height: 2.25rem;
}
/* v0.3.8: Worksheets are fill-in forms, not equally weighted data tables.
   Restrict these proportions and stripes to the explicit worksheet presentation.
   Long labels wrap at word boundaries; the Entry column gets writing space.
   A 42rem minimum preserves usability on narrow screens via figure scrolling. */
.wp-block-table.aplusplg-kf-style-worksheet > table,
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet > table {
    box-sizing: border-box;
    width: 100%;
    min-width: 42rem;
    max-width: none;
    table-layout: fixed;
}
.wp-block-table.aplusplg-kf-style-worksheet tr > :first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet tr > :first-child {
    box-sizing: border-box;
    width: 32%;
    min-width: 0;
    max-width: none;
    text-align: left;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}
.wp-block-table.aplusplg-kf-style-worksheet tr > :nth-child(2),
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet tr > :nth-child(2) {
    box-sizing: border-box;
    width: 68%;
    min-width: 0;
    max-width: none;
    text-align: left;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}
.wp-block-table.aplusplg-kf-style-worksheet thead > tr > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet thead > tr > :is(th,td) {
    background: var(--aplusplg-kf-actual-header-background, var(--aplusplg-kf-heading));
    font-weight: 700;
}
.wp-block-table.aplusplg-kf-style-worksheet tbody > tr:nth-child(even) > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-worksheet tbody > tr:nth-child(even) > :is(th,td) {
    background: var(--aplusplg-kf-stripe);
}
@media print {
    .wp-block-table.aplusplg-kf-style-worksheet > table,
    .aplusplg-kf-scroll.aplusplg-kf-style-worksheet > table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }
    .wp-block-table.aplusplg-kf-style-worksheet tr > :first-child,
    .aplusplg-kf-scroll.aplusplg-kf-style-worksheet tr > :first-child { width: 32%; }
    .wp-block-table.aplusplg-kf-style-worksheet tr > :nth-child(2),
    .aplusplg-kf-scroll.aplusplg-kf-style-worksheet tr > :nth-child(2) { width: 68%; }
}
@media (max-width: 767px) {
    .wp-block-table[class*="aplusplg-kf-style-"] :is(th,td),
    .aplusplg-kf-scroll[class*="aplusplg-kf-style-"] :is(th,td) {
        padding: .5rem .65rem;
    }
}
@media print {
    .wp-block-table[class*="aplusplg-kf-style-"],
    .aplusplg-kf-scroll[class*="aplusplg-kf-style-"] {
        overflow: visible;
        max-width: none;
    }
    .wp-block-table[class*="aplusplg-kf-style-"] > table,
    .aplusplg-kf-scroll[class*="aplusplg-kf-style-"] > table {
        min-width: 0;
        width: 100%;
    }
    .wp-block-table.aplusplg-kf-style-worksheet :is(th,td),
    .aplusplg-kf-scroll.aplusplg-kf-style-worksheet :is(th,td) {
        min-height: 2.8rem;
    }
}

/* v0.3.3: predictable separation without double-margins on adjacent tables. */
.wp-block-table[class*="aplusplg-kf-style-"],
.aplusplg-kf-scroll[class*="aplusplg-kf-style-"],
.wp-block-group.aplusplg-kf-callout {
    margin-block-start: 0;
    margin-block-end: var(--aplusplg-kf-element-gap);
}
/* Independent notices: native Group + Paragraph blocks, no table semantics. */
.wp-block-group.aplusplg-kf-callout {
    box-sizing: border-box;
    padding: 1rem 1.15rem;
    border-left: .3rem solid #356cab;
    border-radius: .3rem;
    background: #f5f9ff;
}
.wp-block-group.aplusplg-kf-callout > :first-child { margin-block-start: 0; }
.wp-block-group.aplusplg-kf-callout > :last-child { margin-block-end: 0; }
.wp-block-group.aplusplg-kf-callout .aplusplg-kf-callout-label { margin-block-end: .4rem; }
@media print {
    .wp-block-group.aplusplg-kf-callout { break-inside: avoid; }
}

/* v0.3.3: callouts are left-aligned content, never centered table headings.
   Legacy table-style callouts have no bottom rule or tinted header. */
.wp-block-table.aplusplg-kf-style-callout-info,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info {
    border-block-end: 0 !important;
    border-block-start: 0 !important;
    border-inline-end: 0 !important;
    text-align: left !important;
}
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td,p),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td,p) {
    text-align: left !important;
    border-inline: 0 !important;
    border-block-end: 0 !important;
    background: transparent !important;
}
/* Internal separators only for neighboring rows retained in one callout table. */
.wp-block-table.aplusplg-kf-style-callout-info tr + tr > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info tr + tr > :is(th,td),
.wp-block-table.aplusplg-kf-style-callout-info tbody tr:first-child > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info tbody tr:first-child > :is(th,td) {
    border-block-start: 1px solid var(--aplusplg-kf-border);
}
.wp-block-group.aplusplg-kf-callout,
.wp-block-group.aplusplg-kf-callout :is(p,strong,em,a) {
    text-align: left !important;
}
.wp-block-group.aplusplg-kf-callout > .wp-block-paragraph.aplusplg-kf-callout-label,
.wp-block-group.aplusplg-kf-callout .aplusplg-kf-callout-label {
    margin-block: 0 .55rem !important;
    font-weight: 700;
}
.wp-block-group.aplusplg-kf-callout .aplusplg-kf-callout-body {
    margin-block-start: 0;
}


/* v0.3.5: label/value and control-card tables keep intrinsic column sizing.
   No percentage columns, no container-based column-width overrides. The figure
   scrolls when its minimum readable columns exceed the chapter reader width.
   Use presentation class for layout; semantic class identifies row headers. */
.wp-block-table.aplusplg-kf-style-control-card,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.wp-block-table.aplusplg-kf-style-control-card > table,
.wp-block-table.aplusplg-kf-style-control-card > table.has-fixed-layout,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card > table,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card > table.has-fixed-layout {
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: none;
    table-layout: auto;
    border: 0;
    border-collapse: collapse;
}
.wp-block-table.aplusplg-kf-style-control-card :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-control-card :is(th,td) {
    max-width: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
/* The row label consumes only its intrinsic width, but never becomes so narrow
   that intact labels split. 'width: 1%' is a compact-column preference, NOT a
   percentage split of the rendered table. */
.wp-block-table.aplusplg-kf-style-control-card tr > :first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-control-card tr > :first-child {
    width: 1%;
    min-width: 9rem;
    max-width: none;
    white-space: normal;
    font-weight: 600;
    text-align: left;
    background: var(--aplusplg-kf-heading);
}
.wp-block-table.aplusplg-kf-style-control-card tr > :not(:first-child),
.aplusplg-kf-scroll.aplusplg-kf-style-control-card tr > :not(:first-child) {
    width: auto;
    min-width: max(20rem, var(--aplusplg-kf-cell-min));
    max-width: none;
    text-align: left;
}
/* v0.3.9: Control-card zebra bands must color cells, not only tr.
   Earlier first-column th backgrounds obscured a row-level stripe.
   Paint even rows on each cell, including the row-header th. Keep the
   existing shaded row labels on odd rows and ordinary body background.
   No dependence on column count or table layout. */
.wp-block-table.aplusplg-kf-style-control-card tbody > tr:nth-child(even) > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-control-card tbody > tr:nth-child(even) > :is(th,td) {
    background: var(--aplusplg-kf-stripe);
}
/* Label/value tables in particular must not reserve an unbroken line for
   long labels. The intrinsic sizing rules above still protect word boundaries. */
/* WordPress ships .wp-block-table .has-fixed-layout td/th with
   word-break:break-word. Override at higher specificity, even after minification. */
.wp-block-table.aplusplg-kf-style-control-card table.has-fixed-layout :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-control-card table.has-fixed-layout :is(th,td) {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}
/* Callout tables are a legacy presentation. Fill the chapter column, regardless
   of core/table's fixed-layout and thead border styles. Native Groups are preferred. */
.wp-block-table.aplusplg-kf-style-callout-info,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    border: 0 !important;
    border-left: .3rem solid #356cab !important;
    border-radius: 0;
    background: #f5f9ff;
}
.wp-block-table.aplusplg-kf-style-callout-info > table,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info > table {
    width: 100% !important;
    min-width: 0;
    max-width: none;
    table-layout: auto !important;
    border: 0 !important;
    border-collapse: collapse;
}
.wp-block-table.aplusplg-kf-style-callout-info :is(thead,tbody,tfoot),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(thead,tbody,tfoot) {
    border: 0 !important;
    background: transparent !important;
}
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td) {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    max-width: none;
    padding: 1rem !important;
    border: 0 !important;
    text-align: left !important;
    vertical-align: top;
    background: transparent !important;
}
/* A separately marked leading strong label is a block-level title. This does
   not guess where a title ends when the *entire* cell is one strong run. */
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td) > strong:first-child,
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td) > p:first-child > strong:first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td) > strong:first-child,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td) > p:first-child > strong:first-child {
    display: block;
    margin: 0 0 .55rem;
    text-align: left !important;
}
.wp-block-table.aplusplg-kf-style-callout-info :is(th,td) p,
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info :is(th,td) p {
    width: 100%;
    max-width: none;
    margin-block: 0;
    text-align: left !important;
}
/* Only rows inside the same legacy callout table receive a separator. */
.wp-block-table.aplusplg-kf-style-callout-info tbody tr + tr > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info tbody tr + tr > :is(th,td),
.wp-block-table.aplusplg-kf-style-callout-info thead + tbody tr:first-child > :is(th,td),
.aplusplg-kf-scroll.aplusplg-kf-style-callout-info thead + tbody tr:first-child > :is(th,td) {
    border-top: 1px solid var(--aplusplg-kf-border) !important;
}
/* Native callouts must not inherit Kadence's constrained Group inner width. */
.wp-block-group.aplusplg-kf-callout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-block-end: 0 !important;
    text-align: left;
}
.wp-block-group.aplusplg-kf-callout > :is(.wp-block-paragraph, p) {
    width: 100%;
    max-width: none;
    text-align: left !important;
}

/* v0.4.0: intact words are a non-negotiable constraint on every managed table.
   Core's .has-fixed-layout rule uses word-break:break-word; override it even
   when the author has set a narrow per-column width. Overflow is preferable. */
.wp-block-table[class*="aplusplg-kf-"] > table,
.wp-block-table[class*="aplusplg-kf-"] > table.has-fixed-layout,
.aplusplg-kf-scroll[class*="aplusplg-kf-"] > table,
.aplusplg-kf-scroll[class*="aplusplg-kf-"] > table.has-fixed-layout {
    table-layout: auto !important;
}
.wp-block-table[class*="aplusplg-kf-"] > table :is(th,td),
.wp-block-table[class*="aplusplg-kf-"] > table.has-fixed-layout :is(th,td),
.aplusplg-kf-scroll[class*="aplusplg-kf-"] > table :is(th,td) {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal !important;
}
.wp-block-table[class*="aplusplg-kf-"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
