/* 2.1.1 — one table style for native WordPress blocks and the classic price list.
 * The plugin owns the prices and alternative layouts; this file only styles them.
 */
:root,.editor-styles-wrapper {
  --ks-table-head:#31493d;
  --ks-table-head-text:#fbf9f6;
  --ks-table-paper:#fbf9f6;
  --ks-table-stripe:#eee8e0;
  --ks-table-line:#d8dcd5;
  --ks-table-ink:#252c28;
  --ks-table-font:15px;
  --ks-table-py:21px;
  --ks-table-px:24px;
}

:is(.kr-site,.editor-styles-wrapper) .wp-block-table,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__frame {
  max-width:100%;
  min-width:0;
  border:1px solid var(--ks-table-line);
  border-radius:4px;
  background:var(--ks-table-paper);
  box-shadow:none;
  overflow-x:auto;
  overscroll-behavior-x:contain;
}

:is(.kr-site,.editor-styles-wrapper) .wp-block-table table,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic table.tpg-price__table {
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0;
  border:0;
  border-collapse:collapse;
  border-spacing:0;
  background:var(--ks-table-paper);
  color:var(--ks-table-ink);
  font-family:var(--kr-body,Manrope,Arial,sans-serif);
  font-size:var(--ks-table-font);
  line-height:1.55;
}

:is(.kr-site,.editor-styles-wrapper) .wp-block-table :is(th,td),
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table :is(th,td) {
  min-width:0;
  border:0;
  border-bottom:1px solid var(--ks-table-line);
  border-inline-start:1px solid var(--ks-table-line);
  /* The pricing plugin declares cell padding !important, including in containers. */
  padding:var(--ks-table-py) var(--ks-table-px)!important;
  background:transparent;
  color:var(--ks-table-ink);
  font-size:var(--ks-table-font);
  font-weight:400;
  line-height:1.55;
  text-align:left;
  vertical-align:middle;
  white-space:normal;
  overflow-wrap:anywhere;
}

:is(.kr-site,.editor-styles-wrapper) .wp-block-table :is(thead,tfoot) { border:0; }
:is(.kr-site,.editor-styles-wrapper) .wp-block-table thead th,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table thead th {
  background:var(--ks-table-head);
  color:var(--ks-table-head-text);
  border-bottom:0;
  border-inline-start-color:#ffffff26;
  font-size:var(--ks-table-font);
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}

:is(.kr-site,.editor-styles-wrapper) .wp-block-table tr>:first-child,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table tr>:first-child {
  border-inline-start:0;
}
:is(.kr-site,.editor-styles-wrapper) .wp-block-table tbody tr:nth-child(odd),
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table tbody tr {
  background:var(--ks-table-paper);
}
:is(.kr-site,.editor-styles-wrapper) .wp-block-table tbody tr:nth-child(even),
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table tbody tr:nth-child(even) {
  background:var(--ks-table-stripe);
}
:is(.kr-site,.editor-styles-wrapper) .wp-block-table tbody tr:last-child>*,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table tbody tr:last-child>* {
  border-bottom:0;
}
:is(.kr-site,.editor-styles-wrapper) .wp-block-table tbody th,
:is(.kr-site,.editor-styles-wrapper) .ks6-table tbody td:first-child,
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table tbody th {
  font-weight:600;
}
:is(.kr-site,.editor-styles-wrapper) .ks6-table tr>:first-child { width:32%; }
:is(.kr-site,.editor-styles-wrapper) .wp-block-table tfoot { background:var(--ks-table-stripe); }
:is(.kr-site,.editor-styles-wrapper) .wp-block-table figcaption {
  margin:0;
  padding:12px var(--ks-table-px);
  border-top:1px solid var(--ks-table-line);
  color:var(--kr-muted,#69716b);
}

/* Inline plugin colours need a deliberate override for the site's classic skin. */
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic {
  --tpg-price-header:var(--ks-table-head)!important;
  --tpg-price-header-text:var(--ks-table-head-text)!important;
  --tpg-price-accent:var(--ks-table-ink)!important;
}
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__package {
  font-size:var(--ks-table-font);
  font-weight:600;
  line-height:1.55;
  margin-bottom:4px;
}
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__unit {
  font-size:12px;
  line-height:1.5;
  letter-spacing:0;
}
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__amount {
  color:var(--ks-table-ink);
  white-space:nowrap;
}
:is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__number { font-size:24px; }

@media(max-width:600px) {
  :root,.editor-styles-wrapper { --ks-table-font:13px; --ks-table-py:16px; --ks-table-px:12px; }
  :is(.kr-site,.editor-styles-wrapper) .wp-block-table :is(th,td) { font-size:13px; line-height:1.55; }
  :is(.kr-site,.editor-styles-wrapper) .ks6-table tr>:first-child { width:36%; min-width:120px; }
}
/* Container sizing also keeps a price list inside a narrow WordPress column usable. */
@container tpg-price (max-width:600px) {
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table {
    --ks-table-font:13px; --ks-table-py:16px; --ks-table-px:12px;
  }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table :is(th,td),
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__package { font-size:13px; }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__unit { font-size:11px; }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__number { font-size:21px; }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic :is(.tpg-price__from,.tpg-price__currency) { font-size:11px; }
}
@container tpg-price (max-width:340px) {
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__table { --ks-table-px:9px; }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__package { font-size:12px; }
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic .tpg-price__number { font-size:19px; }
}
@media print {
  :is(.kr-site,.editor-styles-wrapper) .tpg-price.tpg-price--classic {
    --tpg-price-header:#fff!important; --tpg-price-header-text:#000!important;
  }
  :is(.kr-site,.editor-styles-wrapper) .wp-block-table thead th { background:#fff; color:#000; border-bottom:2px solid #000; }
}
