/* Table widget (basic element). Instance values arrive as --wct-* custom properties on .wc-table-widget
   (set by widget/tableWidget.gsp); everything below is an overridable default. */
/* Only the one value no adopted table ever contributes is declared here. The rest carry their default
   in the LAST fallback of each consumer - `var(--wct-x, var(--wct-adopted-x, default))` - because a
   variable declared on the wrapper is always "set", so a fallback after it can never be reached and an
   adopted table's captured look would have no way back once a field was cleared. */
.wc-table-widget {
  --wct-plain-line: #fafbfc;
}
.wc-table-widget .wc-table-scroll {
  overflow-x: auto;
  /* Only this axis ever scrolls. Left to itself, `overflow-x: auto` computes overflow-y to `auto` as well,
     and the horizontal bar then eats height out of a box whose height is its content - so the table
     overflowed vertically by the height of the bar and the last row was clipped behind it. */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  /* The bar's own strip, so it sits UNDER the table rather than across the last row. It has to be
     reserved: a box whose height is its content gets no taller when a horizontal bar appears, so the bar
     is drawn inside that height and the last row loses the bar's worth of itself - which is what the
     report showed. The padding is the bar's height exactly, so the bar lands in the strip and the rows
     keep all of theirs; a table that does not scroll simply carries 10px of space below it. */
  padding-bottom: 10px;
}
/* A bar the eye can find: the native overlay bar is what was drawn over the last row in the report. Kept
   slim and neutral so it reads as a control on the table's edge rather than a border of its own.
   Deliberately NOT paired with the standard `scrollbar-width` / `scrollbar-color`: since Chrome 121 those
   properties are supported, and setting either one makes Chromium IGNORE every ::-webkit-scrollbar rule
   below - so asking for a thin bar was switching this styling off and leaving the default overlay, which
   is the opposite of what it was there for. WebKit/Blink take these rules; Firefox draws its own bar,
   already laid out below the content and inside the strip reserved above. */
.wc-table-widget .wc-table-scroll::-webkit-scrollbar {
  height: 10px;
}
.wc-table-widget .wc-table-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}
.wc-table-widget .wc-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 5px;
}
.wc-table-widget .wc-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.45);
}
.wc-table-widget .wc-table-scroll:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
/* An adopted table was already laid out by the site, and our WRAPPER took its place as the box being laid
   out: in a `display:flex` row of two 582px tables the adopted one became 1156px and starved its sibling
   to 8px, permanently. `display: contents` removes it so the table is again the box the site sized. */
.wc-table-widget.wc-table--adopted {
  display: contents;
}
/* The scroll region, though, stays a real box on EVERY adopted table - it used to be dissolved too, and
   only came back once the editor had taken the columns over (Add Column). That left every other adopted
   table with nowhere to scroll: narrow the viewport and it had no choice but to compress its columns and
   cut the text, and no minimum could help because there was no scrolling box to overflow. Costing nothing
   is what makes this safe to do unconditionally: `overflow-x: auto` shows a scrollbar ONLY when the table
   is genuinely wider than the space, so a table that fits is untouched, and `min-width: 0` is what keeps
   the box from starving its siblings the way the wrapper did (a flex item sizes to its content until it
   is told it may shrink). */
.wc-table-widget.wc-table--adopted .wc-table-scroll {
  display: block;
  min-width: 0;
}
/* Width and margin are the site's business on a table we adopted: it may be a flex item sized by its row
   (a real one: three tables side by side in a `display:flex` box), and forcing 100% made it eat the row. */
.wc-table-widget .wc-table {
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
  /* Both name their own CSS default in the fallback, so "not set" paints exactly what no declaration at
     all would. (The font sizes above must NOT do this - their unset behaviour is inherit, not a fixed
     value - which is why they are written without one.) */
  background: var(--wct-table-bg, var(--wct-adopted-table-bg, transparent));
  /* Kept for the border box, but on its own it does nothing here: `border-collapse: collapse` above
     makes a table's border-radius a no-op, and the cells go on painting their own backgrounds square
     over the corners. A header fill therefore sat square on top of a rounded table. The radius that
     actually shows has to be set on the four CORNER CELLS, below. */
  border-radius: var(--wct-radius, var(--wct-adopted-radius, 0));
}
/* Corner cells carry the radius. Each corner lists two selectors because the first row is in <thead>
   on a table this widget renders, but an adopted table may have no <thead> at all and start straight
   into <tbody> - and the same on the way out for <tfoot>. `> *` rather than `> th, > td` so a header
   cell marked up either way is covered. Child combinators throughout, so a nested table inside a cell
   keeps its own corners instead of inheriting this one's. */
.wc-table-widget .wc-table > thead > tr:first-child > *:first-child,
.wc-table-widget .wc-table > tbody:first-child > tr:first-child > *:first-child {
  border-top-left-radius: var(--wct-radius, var(--wct-adopted-radius, 0));
}
.wc-table-widget .wc-table > thead > tr:first-child > *:last-child,
.wc-table-widget .wc-table > tbody:first-child > tr:first-child > *:last-child {
  border-top-right-radius: var(--wct-radius, var(--wct-adopted-radius, 0));
}
.wc-table-widget .wc-table > tbody:last-child > tr:last-child > *:first-child,
.wc-table-widget .wc-table > tfoot > tr:last-child > *:first-child {
  border-bottom-left-radius: var(--wct-radius, var(--wct-adopted-radius, 0));
}
.wc-table-widget .wc-table > tbody:last-child > tr:last-child > *:last-child,
.wc-table-widget .wc-table > tfoot > tr:last-child > *:last-child {
  border-bottom-right-radius: var(--wct-radius, var(--wct-adopted-radius, 0));
}
.wc-table-widget:not(.wc-table--adopted) .wc-table {
  width: 100%;
  margin: 0;
}
/* A table has to stay readable as columns are added. With `width: 100%` and auto layout the browser
   compresses columns down to their content's minimum before it will let the table overflow, and a table
   of mostly empty cells has almost no minimum - so adding columns squeezed them into each other and no
   scrollbar ever appeared (measured: 3 -> 10 columns took every column from 385px to 99px with the scroll
   box still at zero). The minimum is claimed for the WHOLE table - a room-for-every-column figure the
   renderers keep in --wct-col-count - so that once it bites the table outgrows its box and
   .wc-table-scroll scrolls, which is what that box is for. Deliberately not a min-width per cell: that
   also fires when the table has room to spare, and it does not merely floor the narrow columns, it
   re-shares the whole row (measured, three columns with room to spare: 820/153/201 became 555/309/309).
   A minimum on the table is inert until the table is actually short of room, so auto keeps meaning
   size-to-content. AUTO only: Fixed is where the user has set the widths. And only on a table WE
   managed: a legacy table brought up to contract wears the same wrapper, and its own layout is none of
   our business - until Add Column, which is where we take its columns over and stamp the class on. */
.wc-table-widget.wc-table--managed-columns:not(.wc-table--fixed) .wc-table {
  min-width: calc(var(--wct-col-min, 160px) * var(--wct-col-count, 1));
}
.wc-table-widget.wc-table--fixed .wc-table {
  table-layout: fixed;
}
/* A column left at AUTO has no width of its own, so on a narrow screen the browser is free to squeeze it
   to its longest word - which is how a cell ends up one letter per line. It gets a floor of its own here,
   on the CELLS rather than on the table, because the table-level minimum above cannot help a stored table
   that never published --wct-col-count (only our own renderers set it, so an adopted snippet has none).
   Below the breakpoint ONLY. A per-cell minimum was deliberately avoided for the desktop case, and the
   measurement is worth keeping: it does not merely floor the narrow columns, it re-shares the whole row -
   three columns with room to spare went from 820/153/201 to 555/309/309. That cannot happen here, because
   at this width there is no room to spare: the columns are already at their minimum and the table
   overflows into .wc-table-scroll, which is exactly the wanted outcome.
   Fixed is excluded: its widths are declared, and honouring them is what --wct-col-total / max-content
   above is for. The row-number column is excluded too - it holds an ordinal, and 160px of it would be
   width taken from the columns that have something to say. */
@media (max-width: 768px) {
  .wc-table-widget:not(.wc-table--fixed) .wc-table th:not(.wc-table-rownum),
  .wc-table-widget:not(.wc-table--fixed) .wc-table td:not(.wc-table-rownum) {
    min-width: var(--wct-col-min, 160px);
  }
}
/* ...and Fixed needs a minimum of its own, for the opposite reason to Auto's above. `table-layout: fixed`
   with `width: 100%` honours the column widths only while the table has room for them: once the viewport
   is narrower than their sum the browser compresses every column proportionally, so the widths the user
   set stop being true and the text is cut.
   The minimum is the sum of those widths. `max-content` IS that sum for a fixed-layout table - the
   browser adds the declared column widths up itself - so this needs nothing from the renderers and no
   edit to a stored table: an existing snippet starts scrolling as soon as this rule loads.
   --wct-col-total is preferred when a renderer has published it, being the same figure computed from the
   stored widths rather than the laid-out ones.
   It cannot widen a table that fits: a minimum only bites once the box is narrower than the content, and
   at that point the columns were going to be compressed anyway. EVERY fixed table, adopted or not,
   because a table whose declared widths are being squeezed away is broken whoever wrote it. */
.wc-table-widget.wc-table--fixed .wc-table {
  min-width: var(--wct-col-total, -webkit-max-content);
  min-width: var(--wct-col-total, max-content);
}
/* Per-device font sizes. Consumed here, not emitted per widget: with no variable set the var()
   substitution is invalid at computed-value time, so the declaration falls back to `inherit` — exactly the
   untouched-table behaviour — and a value from any device bucket applies in both the widget and a table
   inside a snippet. Never give these a fallback: calc(var(--k, inherit) * 1px) is invalid CSS. */
.wc-table-widget .wc-table th {
  font-size: calc(var(--head-font-size) * 1px);
}
.wc-table-widget .wc-table td {
  font-size: calc(var(--body-font-size) * 1px);
}
.wc-table-widget .wc-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  font-weight: var(--wct-head-weight, var(--wct-adopted-head-weight, 600));
}
/* Wrapping belongs to the per-column wrap chip, which says its piece by ADDING .wc-table-nowrap - so no
   rule here may hold a cell to one line. A blanket `white-space: nowrap` did exactly that, and so did a
   per-cell `min-width: max-content` (the same claim made through layout instead of through text), which
   left the chip inert and every long value ellipsised on the tables we render. */
.wc-table-widget .wc-table th, .wc-table-widget .wc-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  max-width: 300px;
}
.wc-table-widget .wc-table.fee-table-frozen td,
.wc-table-widget .wc-table.selected-editable-element td{
  cursor: pointer !important;
}
  /* Row height is a per-device number of px in --row-height, resolved HERE rather than on the wrapper: the
     responsive framework writes its per-element rule on the table, which is closer to the cell than the
     wrapper is, so a wrapper-level value cannot outrank it. The head/body fallbacks hold what an adopted
     table already had (sites commonly pad the header more than the body) and are used only until the Row
     height control writes --row-height — which then governs both halves, as the control implies. */
.wc-table-widget .wc-table th {
  padding: calc(var(--row-height, var(--head-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px));
}
.wc-table-widget .wc-table td {
  padding: calc(var(--row-height, var(--body-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px));
}
/* Only for a table we own: on an adopted one an unclassed cell keeps whatever the site's cascade gave it
   (usually `start`, which also does the right thing in RTL). Captured alignments arrive as classes. */
.wc-table-widget:not(.wc-table--adopted) .wc-table th,
.wc-table-widget:not(.wc-table--adopted) .wc-table td {
  text-align: left;
}
.wc-table-widget .wc-table th {
  /* --wct-cell-bg / --wct-cell-color are a heading's OWN fill and text colour, set on the cell. Through
     variables, not inline declarations: the adopted rules below are !important, and an inline background
     lost to them exactly as an inline colour did. */
  background: var(--wct-cell-bg, var(--wct-header-bg, var(--wct-adopted-header-bg, transparent)));
  color: var(--wct-cell-color, var(--wct-head-color, var(--wct-adopted-head-color, inherit)));
  font-weight: var(--wct-head-weight, var(--wct-adopted-head-weight, 600));
  text-transform: var(--wct-head-transform, var(--wct-adopted-head-transform));
  letter-spacing: var(--wct-head-tracking, var(--wct-adopted-head-tracking));
  /* No fallback, deliberately: line-height INHERITS, so an unset variable makes the declaration
     invalid at computed-value time and the cell keeps whatever the table or the site gives it -
     which is the untouched behaviour. A fallback would hand every table a value of ours. */
  line-height: var(--wct-head-line-height, 1.2);
  font-family: var(--wct-head-font, var(--wct-adopted-head-font));
}
.wc-table-widget .wc-table td {
  /* --wct-cell-color is set on the cell itself (the Cell fill / Text colour pair). It has to come through
     the variable rather than as an inline `color`, because the adopted rules below are !important and an
     inline declaration loses to those. */
  color: var(--wct-cell-color, var(--wct-body-color, var(--wct-adopted-body-color, inherit)));
  font-weight: var(--wct-body-weight, var(--wct-adopted-body-weight, inherit));
  /* The body half carries the same typesetting controls as the header. */
  font-family: var(--wct-body-font, var(--wct-adopted-body-font));
  text-transform: var(--wct-body-transform, var(--wct-adopted-body-transform));
  letter-spacing: var(--wct-body-tracking, var(--wct-adopted-body-tracking));
  /* Unset means inherit - see the note above. */
  line-height: var(--wct-body-line-height, 1.2);
}
/* Cell content is authored in Redactor, which styles the classes its Wrap control writes - `float-left`,
   `float-right`, `wrap-center` - under `.rx-content`, its own editing surface. A table cell is outside
   that scope, so a wrapped image came out of the editor looking one way and landed in the cell looking
   another: measured float none / margin 0 / max-width none in the cell against left / 1em / 200px in the
   editor, and an image that filled the column instead of sitting 64px wide beside its text. Redactor's
   own declarations, scoped to a cell, so the cell shows what the editor showed - on the live page too. */
/* The margin is written whole, not as the two sides Redactor names: inside `.rx-content` a figure starts
   at margin 0 and the class adds to that, while a cell inherits the UA's `1em 40px` - so naming only two
   sides left the other two showing through (measured 40px on the left). */
.wc-table-widget .wc-table th .float-left,
.wc-table-widget .wc-table td .float-left {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 200px;
}
.wc-table-widget .wc-table th .float-right,
.wc-table-widget .wc-table td .float-right {
  float: right;
  margin: 0 0 1em 1em;
  max-width: 200px;
}
.wc-table-widget .wc-table th .wrap-center,
.wc-table-widget .wc-table td .wrap-center {
  text-align: center;
  margin: 0;
}
.wc-table-widget .wc-table th .wrap-center img,
.wc-table-widget .wc-table td .wrap-center img,
.wc-table-widget .wc-table th .wrap-center figcaption,
.wc-table-widget .wc-table td .wrap-center figcaption {
  margin-left: auto;
  margin-right: auto;
}
.wc-table-widget .wc-table th .wrap-center figcaption,
.wc-table-widget .wc-table td .wrap-center figcaption {
  text-align: center;
}

/* The header row is hidden, not deleted, when the Header row control is turned off - see
   applyStyleToDom. Stated explicitly (rather than relying on the UA's [hidden] rule) so a site
   stylesheet that sets `display: table-header-group` on thead cannot bring it back. */
.wc-table-widget .wc-table thead[hidden] {
  display: none;
}

/* Cell content is Redactor markup: each line is its own <p>. The UA's 1em paragraph margin made a row
   jump 48→85px the moment a cell went empty → "<p>x</p>" (measured), on the canvas and the storefront. */
.wc-table-widget .wc-table th p,
.wc-table-widget .wc-table td p {
  margin: 0;
}
/* Brand Kit styles every paragraph under the page (brand-kit-base.css `#webcommander-page p`), and a rule
   ON the element always beats what the cell inherits — so a Body font size / colour / weight set here
   never reached the text, which is always wrapped in <p>. Hand the cell's own typography back by making
   the paragraph transparent. The selectors must out-specify that id-scoped Brand Kit rule, hence the
   page id here and the sub-editor canvas class for the same rule's second form. */
#webcommander-page .wc-table-widget .wc-table th p,
#webcommander-page .wc-table-widget .wc-table td p,
.fee-sub-editor-canvas .wc-table-widget .wc-table th p,
.fee-sub-editor-canvas .wc-table-widget .wc-table td p {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
.wc-table-widget .wc-table th p + p,
.wc-table-widget .wc-table td p + p {
  margin-top: 0.5em;
}

/* Rounding a table only shows once its borders are NOT collapsed: a collapsed border box is painted
   square whatever the radius says. Separate borders with zero spacing draw our single-side rules exactly
   as collapse did, and overflow clips the header fill and stripes to the corners. The class is added by
   the Corner radius control, never by adoption. */
.wc-table-widget.wc-table--rounded .wc-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.wc-table-widget.wc-table--adopted.wc-table--rounded .wc-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
}

/* borders per table style. Every rule below is drawn at --wct-border-width, whose default lives in the
   last fallback for the same reason every other default does: the variable is only ever declared when the
   Border width control is used, so clearing the field puts the 1px back. */
.wc-table-widget.wc-table--bordered .wc-table,
.wc-table-widget.wc-table--striped .wc-table {
  border: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb));
}
/* Header sits on a bottom rule; body rows take a single top rule on every row after the first. */
.wc-table-widget.wc-table--bordered .wc-table thead th,
.wc-table-widget.wc-table--striped .wc-table thead th {
  border-bottom: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb));
}
.wc-table-widget.wc-table--bordered .wc-table tbody tr + tr td {
  border-top: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb));
}
.wc-table-widget.has-grid.wc-table--bordered .wc-table th + th,
.wc-table-widget.has-grid.wc-table--bordered .wc-table td + td,
.wc-table-widget.has-grid.wc-table--striped .wc-table th + th,
.wc-table-widget.has-grid.wc-table--striped .wc-table td + td {
  border-left: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb));
}
/* `td + td` is a SIBLING rule, so it draws the rule between two cells of the same row - which is right
   until a merge above covers a row's leading columns. That row's first cell is then :first-child while
   sitting at grid column 1 or beyond, and the vertical rule to its left goes missing exactly where the
   merged block is. No combinator can express "not at grid column 0", so both renderers mark the cell
   (tableWidget.gsp and fee.table.model.js, from the one span layout) and it is matched by class here. */
.wc-table-widget.has-grid.wc-table--bordered .wc-table .wc-table-grid-start,
.wc-table-widget.has-grid.wc-table--striped .wc-table .wc-table-grid-start {
  border-left: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb));
}
/* A cell that spans several columns is not one column, so a single column's width cap is not its cap -
   a banner row would otherwise be held to the width of the narrowest thing it stretches over. */
.wc-table-widget .wc-table th[colspan],
.wc-table-widget .wc-table td[colspan] {
  max-width: none;
}
/* Plain's line is deliberately faint, but it is still the Border colour control's line: hardwiring it
   meant Border colour did nothing here and Border width only thickened something invisible. The faint
   default moves into the fallback, where a set colour can win. */
.wc-table-widget.wc-table--plain .wc-table tbody tr + tr td {
  border-top: var(--wct-border-width, 1px) solid var(--wct-border-color, var(--wct-plain-line));
}
/* Both stripe fills are authorable (Odd / Even row fill), so each carries its default in the last
   fallback like every other value. `background-color`, not the shorthand: an adopted table may paint a
   cell with more than a colour, and the shorthand reset that for no reason.
   The ODD rule is gated on a class, the way the Corner radius one is, because odd rows had no rule of
   ours at ALL before this control existed: an unconditional `transparent` default would paint over the
   alternating colour a legacy table brought with it, including one adopted and saved before the class
   existed. The class is added when the fill is set (both renderers) and when adoption captures the
   table's own colour into --wct-adopted-stripe-odd-bg, so there is always something to paint. */
.wc-table-widget.wc-table--striped.wc-table--stripe-odd .wc-table tbody tr:nth-child(odd) td {
  background-color: var(--wct-stripe-odd-bg, var(--wct-adopted-stripe-odd-bg, transparent));
}
.wc-table-widget.wc-table--striped .wc-table tbody tr:nth-child(even) td {
  background-color: var(--wct-stripe-even-bg, var(--wct-adopted-stripe-even-bg, rgba(0, 0, 0, 0.025)));
}


/* [data-col] is on every cell the contract touches. It is here for weight: a real site rule
   (`.table-groups table.sched td.time { font-weight: 500 !important }`) is (0,3,2) !important and beat the
   (0,3,1) these selectors had, so the Typography controls did nothing on that column. */
.wc-table-widget.wc-table--adopted .wc-table th[data-col] {
  padding: calc(var(--row-height, var(--head-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px)) !important;
  /* The header often rules in a different colour from the body (white against a dark fill). The captured
     value goes FIRST here, not in a var() fallback: --wct-border-color is defined for every wrapper by the
     defaults block, so a fallback would never be reached. Using the Border colour control removes this
     seed (dropCapturedHeadBorder), and the control's colour then applies to the header too. */
  border: 0 solid var(--wct-border-color, var(--wct-adopted-head-border-color, var(--wct-adopted-border-color, #e5e7eb))) !important;
}
.wc-table-widget.wc-table--adopted .wc-table td[data-col] {
  padding: calc(var(--row-height, var(--body-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px)) !important;
  border: 0 solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb)) !important;
}
/* The row-number column carries no [data-col] — that attribute is what marks a cell as belonging to a
   data column — so the two rules above do not reach it, and on an adopted table the site's own cell rules
   would keep it out of step with the columns beside it. Same declarations, same reason for !important as
   its siblings: a real site rule at (0,3,2) !important outranks anything we can write without it. */
.wc-table-widget.wc-table--adopted .wc-table th.wc-table-rownum {
  padding: calc(var(--row-height, var(--head-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px)) !important;
  border: 0 solid var(--wct-border-color, var(--wct-adopted-head-border-color, var(--wct-adopted-border-color, #e5e7eb))) !important;
}
.wc-table-widget.wc-table--adopted .wc-table td.wc-table-rownum {
  padding: calc(var(--row-height, var(--body-row-height, 13)) * 1px) var(--wct-cell-pad-x, var(--wct-adopted-pad-x, 16px)) !important;
  border: 0 solid var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb)) !important;
}
/* The row-number column has its own wrap chip, so it opts out through the same class every other cell
   does. `!important` and this specificity because the adopted rule below is (0,4,1) !important — the
   unscoped version of this rule was (0,3,0) and lost to it on precisely the cells it was written for. */
.wc-table-widget .wc-table .wc-table-rownum.wc-table-nowrap {
  white-space: nowrap !important;
}
/* An adopted table keeps its own stylesheet, which may hold a cell to one line of its own accord, and the
   wrap chip has to outrank it - hence the weight, on the cells the chip did NOT mark. `overflow-wrap` goes
   back to the site's own breaking for the same reason. The chip still wins: it is what puts
   .wc-table-nowrap on the cell, and this rule steps around that class. */
.wc-table-widget.wc-table--adopted .wc-table th:not(.wc-table-nowrap),
.wc-table-widget.wc-table--adopted .wc-table td:not(.wc-table-nowrap) {
  white-space: normal !important;
  overflow-wrap: normal !important;
}
/* --wct-adopted-* hold what THIS cell had when the table was adopted, so a column the site weighted or
   coloured on its own keeps it; the Typography controls clear them (dropAdoptedCellSeeds) and take over. */
.wc-table-widget.wc-table--adopted .wc-table th[data-col] {
  font-size: calc(var(--head-font-size) * 1px) !important;
  font-weight: var(--wct-adopted-weight, var(--wct-head-weight, var(--wct-adopted-head-weight, 600))) !important;
  color: var(--wct-cell-color, var(--wct-adopted-color, var(--wct-head-color, var(--wct-adopted-head-color, inherit)))) !important;
  background: var(--wct-cell-bg, var(--wct-header-bg, var(--wct-adopted-header-bg, transparent))) !important;
  /* Seeded from the table's own header at adoption, so these start as no-ops and only move when the
     Typography controls are used. */
  text-transform: var(--wct-head-transform, var(--wct-adopted-head-transform)) !important;
  letter-spacing: var(--wct-head-tracking, var(--wct-adopted-head-tracking)) !important;
  /* No default for an ADOPTED table, unlike our own above: it arrived with the site's own line height and
     must keep it until this control is used. The panel still shows a real number rather than a blank -
     styleValuesFromDom measures the ratio the cell actually renders (ratioOf). */
  line-height: var(--wct-head-line-height, var(--wct-adopted-head-line-height)) !important;
  font-family: var(--wct-head-font, var(--wct-adopted-head-font)) !important;
}
.wc-table-widget.wc-table--adopted .wc-table td[data-col] {
  font-size: calc(var(--body-font-size) * 1px) !important;
  font-weight: var(--wct-adopted-weight, var(--wct-body-weight, var(--wct-adopted-body-weight, inherit))) !important;
  color: var(--wct-cell-color, var(--wct-adopted-color, var(--wct-body-color, var(--wct-adopted-body-color, inherit)))) !important;
  font-family: var(--wct-body-font, var(--wct-adopted-body-font)) !important;
  text-transform: var(--wct-body-transform, var(--wct-adopted-body-transform)) !important;
  letter-spacing: var(--wct-body-tracking, var(--wct-adopted-body-tracking)) !important;
  /* Unset means inherit - see the note above. */
  line-height: var(--wct-body-line-height, var(--wct-adopted-body-line-height)) !important;
}
/* Seeded from the table's own look at adoption, so "unset" here can only mean the table had neither. */
.wc-table-widget.wc-table--adopted .wc-table {
  background: var(--wct-table-bg, var(--wct-adopted-table-bg, transparent)) !important;
  border-radius: var(--wct-radius, var(--wct-adopted-radius, 0)) !important;
  /* The border MODEL the table was authored with. Our `border-collapse: collapse` is only (0,2,0), so a
     site whose own `separate` rule is weaker lost its cell gaps and separate borders on adoption. The
     Corner radius control's .wc-table--adopted.wc-table--rounded rule is more specific, so it still wins. */
  border-collapse: var(--wct-adopted-border-collapse, collapse) !important;
  border-spacing: var(--wct-adopted-border-spacing, 0) !important;
  /* Adoption starts this class on the table's own layout, so this is a no-op until the Column width
     toggle is used - which without !important did nothing at all on the many sites that set
     `table-layout` on the table themselves. */
  table-layout: auto !important;
}
.wc-table-widget.wc-table--adopted.wc-table--fixed .wc-table {
  table-layout: fixed !important;
}
/* An adopted table's own stylesheet usually paints its body cells, which cover the table element the
   fill is painted on. Class-gated like the stripe and radius rules, so with no fill of ours the table
   keeps every colour its own rules give it - including per-row and per-cell ones. Striped is excluded:
   the two stripe fills own the body there. No !important - the Cell fill is inline on the td. */
.wc-table-widget.wc-table--adopted.wc-table--body-fill:not(.wc-table--striped) .wc-table tbody td {
  background-color: var(--wct-table-bg);
}
/* The same two stripe fills, at a weight an adopted table's own stylesheet cannot beat. The shared
   rules above are (0,4,3) / (0,5,3), and every snippet rule is scoped section-wide, so a real one
   (`.widget-snippet .wcs_section_x table.sched tbody tr:nth-child(even) td`) is (0,4,4) - which is how
   the EVEN fill came to do nothing on those tables while the odd one, carrying one class more, worked.
   [data-col] and .wc-table-rownum are the same weight device the padding/border rules above use, and
   between them they cover every cell the contract touches. Still no !important: the Cell fill is inline
   on the td, and an important rule here would outrank it.
   BOTH parities are class-gated, and that gate is what makes these safe to add: a table adopted before
   the fills were authorable carries neither class and neither captured colour, so it goes on showing its
   own even rows rather than being repainted in our faint default by a rule that now outranks its site's.
   The classes arrive with a captured colour (adoption) or an authored one (the panel). */
.wc-table-widget.wc-table--adopted.wc-table--striped.wc-table--stripe-odd .wc-table tbody tr:nth-child(odd) td[data-col],
.wc-table-widget.wc-table--adopted.wc-table--striped.wc-table--stripe-odd .wc-table tbody tr:nth-child(odd) td.wc-table-rownum {
  background-color: var(--wct-stripe-odd-bg, var(--wct-adopted-stripe-odd-bg, transparent));
}
.wc-table-widget.wc-table--adopted.wc-table--striped.wc-table--stripe-even .wc-table tbody tr:nth-child(even) td[data-col],
.wc-table-widget.wc-table--adopted.wc-table--striped.wc-table--stripe-even .wc-table tbody tr:nth-child(even) td.wc-table-rownum {
  background-color: var(--wct-stripe-even-bg, var(--wct-adopted-stripe-even-bg, rgba(0, 0, 0, 0.025)));
}
/* The border model above zeroes the site's own cell borders, so the table-style and grid-line controls
   paint theirs back here — same rules as the shared ones, at a weight the site's cannot beat. */
/* Same story for the frame around the table: our bordered/striped default drew one on a table that had
   none, adding 2px of height. Adoption seeds the table's own frame; the style controls drop the seed. */
.wc-table-widget.wc-table--adopted.wc-table--bordered .wc-table,
.wc-table-widget.wc-table--adopted.wc-table--striped .wc-table {
  border: var(--wct-border-width, var(--wct-outer-border-width, 1px)) solid var(--wct-outer-border-color, var(--wct-border-color, var(--wct-adopted-border-color, #e5e7eb))) !important;
}
/* A header underline the table never had is a visible change on adoption (a site may rule the body rows
   and leave the header clean), so adoption seeds --wct-head-border-width: 0 in that case; picking a table
   style or toggling grid lines drops the seed and this default applies. */
.wc-table-widget.wc-table--adopted.wc-table--bordered .wc-table thead th,
.wc-table-widget.wc-table--adopted.wc-table--striped .wc-table thead th {
  border-bottom-width: var(--wct-border-width, var(--wct-head-border-width, 1px)) !important;
}
/* --wct-adopted-border-width is the width the cells were ruled at; 1px only if there was none. */
.wc-table-widget.wc-table--adopted.wc-table--bordered .wc-table tbody tr + tr td {
  border-top-width: var(--wct-border-width, var(--wct-adopted-border-width, 1px)) !important;
}
/* Striped belongs on this branch too. Our Striped style draws no row rules - the alternation IS the look
   - so striped was left out of the restore entirely, and an adopted table that was striped AND ruled had
   its rules zeroed by the cell reset above with nothing to put them back: the design lost every line the
   moment it was selected. Its captured width brings them back, and a striped table that never had any
   still gets none, because the fallback is 0. Stripe detection beats border detection in applyLook, so a
   striped-and-ruled table can only land here.
   Plain on an ADOPTED table does not mean our Plain style, it means "this table ruled nothing" - that is
   how applyLook classifies a table with no cell borders at all. So the last fallback here is 0, not the
   1px its bordered twin above gets: adoption must be a visual no-op, and an unruled table that came back
   from its first select with a rule between every row was the whole complaint. A table that DID rule its
   rows still shows them (--wct-adopted-border-width carries that width), and the moment the Border width
   control is used --wct-border-width wins and Plain draws again. */
.wc-table-widget.wc-table--adopted.wc-table--plain .wc-table tbody tr + tr td,
.wc-table-widget.wc-table--adopted.wc-table--striped .wc-table tbody tr + tr td {
  border-top-width: var(--wct-border-width, var(--wct-adopted-border-width, 0)) !important;
}
.wc-table-widget.wc-table--adopted.has-grid.wc-table--bordered .wc-table th + th,
.wc-table-widget.wc-table--adopted.has-grid.wc-table--bordered .wc-table td + td,
.wc-table-widget.wc-table--adopted.has-grid.wc-table--striped .wc-table th + th,
.wc-table-widget.wc-table--adopted.has-grid.wc-table--striped .wc-table td + td,
.wc-table-widget.wc-table--adopted.has-grid.wc-table--bordered .wc-table .wc-table-grid-start,
.wc-table-widget.wc-table--adopted.has-grid.wc-table--striped .wc-table .wc-table-grid-start {
  border-left-width: var(--wct-border-width, var(--wct-adopted-border-width, 1px)) !important;
}
/* Alignment chips have to reach past the site's per-cell width/alignment rules too. */
.wc-table-widget.wc-table--adopted .wc-table th.wc-table-align-left,
.wc-table-widget.wc-table--adopted .wc-table td.wc-table-align-left {
  text-align: left !important;
}
.wc-table-widget.wc-table--adopted .wc-table th.wc-table-align-center,
.wc-table-widget.wc-table--adopted .wc-table td.wc-table-align-center {
  text-align: center !important;
}
.wc-table-widget.wc-table--adopted .wc-table th.wc-table-align-right,
.wc-table-widget.wc-table--adopted .wc-table td.wc-table-align-right {
  text-align: right !important;
}

/* Row height is per-device: --row-height carries the cell's vertical padding in px (compact 8 / default 13
   / comfortable 20, see TableWidgetParamsUtil.ROW_HEIGHT_PX) and is consumed by the cell padding rule
   above. The .wc-table--row-* class is kept only for the compact image-height rule below. */

/* Alignment. These repeat the `th`/`td` type selector from the base rule above so specificity matches
   (0,2,1); without it the base rule's `text-align: left` wins regardless of source order. */
.wc-table-widget .wc-table th.wc-table-align-center,
.wc-table-widget .wc-table td.wc-table-align-center {
  text-align: center;
}
.wc-table-widget .wc-table th.wc-table-align-right,
.wc-table-widget .wc-table td.wc-table-align-right {
  text-align: right;
}
/* Per-column wrap toggle: wrap off truncates to one ellipsised line (numeric columns read better so). */
.wc-table-widget .wc-table-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The sidebar editor stores the value inside a block (`<p>`), so that block is what overflows - the cell
   above never gets to draw the dots. Inline typing writes bare text and is already covered. */
.wc-table-widget .wc-table-nowrap > * {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Inline images arrive from the cell's Redactor toolbar as a bare `<img src alt>` with no class to hang
   styling off, so target any `img` in a cell - a heading is edited by the same editor. */
.wc-table-widget .wc-table th img,
.wc-table-widget .wc-table td img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 64px;
  border-radius: 4px;
}
.wc-table-widget .wc-table th.wc-table-align-center img,
.wc-table-widget .wc-table td.wc-table-align-center img {
  margin: 0 auto;
}
.wc-table-widget .wc-table th.wc-table-align-right img,
.wc-table-widget .wc-table td.wc-table-align-right img {
  margin-left: auto;
}
.wc-table-widget.wc-table--row-compact .wc-table th img,
.wc-table-widget.wc-table--row-compact .wc-table td img {
  max-height: 32px;
}
/* The UA gives a figure a 1em/40px margin, which reads as broken spacing in a cell. The three wrap
   classes set their own margins on purpose (that is what makes text sit beside a floated image), so the
   reset steps around them - it used to win on specificity and flatten them to zero. */
.wc-table-widget.wc-table--bordered .wc-table tbody tr figure:not(.float-left):not(.float-right):not(.wrap-center) {
  margin: 0;
}

body.fee-editor-active .wc-table-widget .wc-table tr td ul, body.fee-editor-active .wc-table-widget .wc-table tr td ol {
  padding-left: 18px;
}