.pg-inline-text,
.pg-inline-background {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.pg-inline-background {
  padding: 0.05em 0.15em;
}
.has-pg-main-color {
  color: var(--pg-theme-main, #111) !important;
}
.has-pg-main-background-color {
  background-color: var(--pg-theme-main, #111) !important;
}
.has-pg-gray-color {
  color: var(--pg-theme-gray, #f7f7f7) !important;
}
.has-pg-gray-background-color {
  background-color: var(--pg-theme-gray, #f7f7f7) !important;
}
.pg-fz-xs {
  font-size: 0.75em;
}
.pg-fz-s {
  font-size: 0.9em;
}
.pg-fz-l {
  font-size: 1.25em;
}
.pg-fz-xl {
  font-size: 1.6em;
}
.pg-code-file,
.pg-code-dir {
  font-family: Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 0.2em 0.5em;
  color: #333;
  border-radius: 2px;
  overflow-wrap: anywhere;
}
.pg-code-file::before {
  content: "▤";
  margin-right: 0.4em;
  opacity: 0.65;
}
.pg-code-dir::before {
  content: "▱";
  margin-right: 0.4em;
  opacity: 0.65;
}
.pg-note {
  font-size: 0.8em;
}
/* Inline-button presentation lives in presets.css so editor, article and
   settings previews use the same single-surface rules. */
.pg-inline-icon,
.pg-inline-icon.pg-glyph,
.pg-inline-icon.pg-custom-icon {
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  margin-inline: 0.1em;
  line-height: 1;
  vertical-align: -0.12em;
  font-size: inherit;
  /* A rich-text icon contains a space; a shortcode icon can be empty.
     Clipping fixes both baselines to the same box instead of font metrics. */
  overflow: hidden;
  white-space: nowrap;
}
.pg-inline-icon.pg-custom-icon {
  background-color: currentColor;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
}
/* SWELL inline-list metrics: inline-block, 1.5 line height, 2px vertical padding.
   Inline layout prevents an extra empty line before each saved <br>. */
:is(.pg-inline-list, [class*="pg-table-list-"]){position:relative;display:inline-block;line-height:1.5;padding:2px 0 2px 1.5em;text-align:inherit}
:is(.pg-inline-list, [class*="pg-table-list-"])::before{content:"";display:block;position:absolute;left:.25em;top:calc(.25em + 2px);width:1em;height:1em;background-color:currentColor;mask:var(--pg-inline-list-icon) center/contain no-repeat;-webkit-mask:var(--pg-inline-list-icon) center/contain no-repeat}
:is(.pg-inline-list[data-icon="dot"],.pg-table-list-dot)::before{width:6px;height:6px;left:.5em;top:calc(.75em - 1px);border-radius:50%;mask:none;-webkit-mask:none;color:inherit}
:is(.pg-inline-list[data-icon="check"],.pg-table-list-check)::before{--pg-inline-list-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20d%3D%22M38.9%208.9l-3.6-3.6c-0.2-0.2-0.5-0.2-0.7%200l-21%2021.1-8.2-8.2c-0.2-0.2-0.5-0.2-0.7%200l-3.6%203.6c-0.2%200.2-0.2%200.5%200%200.7l12.5%2012.5%2025.3-25.4c0.2-0.2%200.2-0.5%200-0.7z%22%2F%3E%3C%2Fsvg%3E");color:var(--pg-editor-color_list_check,#6ab974);transform:scale(.8);}
:is(.pg-inline-list[data-icon="circle"],.pg-table-list-circle)::before{--pg-inline-list-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20d%3D%22M20%201c-10.5%200-19%208.5-19%2019s8.5%2019%2019%2019c10.5%200%2019-8.5%2019-19s-8.5-19-19-19zM20%2033.8c-7.6%200-13.8-6.2-13.8-13.8s6.2-13.8%2013.8-13.8c7.6%200%2013.8%206.2%2013.8%2013.8s-6.2%2013.8-13.8%2013.8z%22%2F%3E%3C%2Fsvg%3E");color:var(--pg-editor-color_list_good,#86c45d);}
:is(.pg-inline-list[data-icon="triangle"],.pg-table-list-triangle)::before{--pg-inline-list-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20d%3D%22M37.6%2035.5h-35.2c-0.4%200-0.6-0.4-0.4-0.8l17.6-30.5c0.2-0.3%200.7-0.3%200.9%200l17.5%2030.6c0.2%200.3%200%200.7-0.4%200.7zM10.3%2030.5h19.5l-9.8-16.9-9.7%2016.9z%22%2F%3E%3C%2Fsvg%3E");color:var(--pg-editor-color_list_triangle,#e5b43f);}
:is(.pg-inline-list[data-icon="close"],.pg-table-list-close)::before{--pg-inline-list-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20d%3D%22M35.9%2031.8l-11.8-11.8%2011.8-11.8c0.1-0.1%200.1-0.4%200-0.5l-3.6-3.6c-0.1-0.1-0.4-0.1-0.5%200l-11.8%2011.8-11.8-11.8c0%200-0.1-0.1-0.2-0.1s-0.2%200.1-0.3%200.1l-3.6%203.6c0%200.1-0.1%200.2-0.1%200.3s0%200.2%200.1%200.2l11.8%2011.8-11.8%2011.8c-0.1%200.1-0.1%200.4%200%200.5l3.6%203.6c0.1%200.1%200.4%200.1%200.5%200l11.8-11.8%2011.8%2011.8c0.1%200.1%200.4%200.1%200.5%200l3.6-3.6c0.1-0.2%200.1-0.4%200-0.5z%22%2F%3E%3C%2Fsvg%3E");color:var(--pg-editor-color_list_bad,#df6b6b);}
.pg-table-text-nowrap {
  white-space: nowrap;
}
.pg-table-text-center {
  display: block;
  text-align: center;
}
/* A whole-cell format carries the color and symbol alongside native core/table content. */
/* SWELL 2.19 cell masks and sizing: S 1em, M 1.5em, L 2.5em.
   Keep the saved span/text intact; decoration never depends on font glyphs. */
:is(td, th):has(.pg-cell-data){position:relative;isolation:isolate}
.pg-cell-data{--pg-cell-icon-size:1.5em;background-color:transparent}
.pg-cell-data[data-pg-cell-size="s"]{--pg-cell-icon-size:1em}
.pg-cell-data[data-pg-cell-size="l"]{--pg-cell-icon-size:2.5em}
:is(td, th) .pg-cell-data::after{content:"";position:absolute;inset:0;z-index:-2;background-color:inherit;pointer-events:none}
:is(td, th) .pg-cell-data:where([data-pg-cell-icon]:not([data-pg-cell-icon=""]))::before{
 content:"";display:block;position:absolute;top:0;left:calc(50% - var(--pg-cell-icon-size)/2);
 width:var(--pg-cell-icon-size);height:100%;z-index:-1;pointer-events:none;
 background-color:var(--pg-cell-icon-color,currentColor);
 -webkit-mask:var(--pg-cell-mask) center/auto var(--pg-cell-icon-size) no-repeat;
 mask:var(--pg-cell-mask) center/auto var(--pg-cell-icon-size) no-repeat;
}
/* Background mode keeps the configured hue but reduces only the icon's opacity.
   Older saved cells without a mode already render as backgrounds. */
:is(td, th) .pg-cell-data:not([data-pg-cell-mode="object"])::before{opacity:.25}
:is(td, th) .swl-cell-bg[data-icon-type="bg"][data-icon]::after{opacity:.25}
:is(td, th):has(.pg-cell-data[data-pg-cell-icon]:not([data-pg-cell-icon=""]):not([data-pg-cell-mode="object"])){
 text-shadow:var(--cell-text-shadow,1px 1px 1px var(--pg-theme-content_bg,#fff));
}
:is(td, th):has(.pg-cell-data[data-pg-cell-icon]:not([data-pg-cell-icon=""]):not([data-pg-cell-mode="object"])[data-pg-cell-size="l"]){padding-top:1.25em;padding-bottom:1.25em}
:is(td, th):has(.pg-cell-data[data-pg-cell-icon]:not([data-pg-cell-icon=""]):not([data-pg-cell-mode="object"])[data-pg-cell-size="s"]){padding:1em}
:is(td, th) .pg-cell-data[data-pg-cell-size="s"]::before{height:var(--pg-cell-icon-size);top:.25em;left:auto;right:.25em}
:is(td, th) .pg-cell-data[data-pg-cell-mode="object"]::before{
 display:inline-block;position:static;height:var(--pg-cell-icon-size);width:var(--pg-cell-icon-size);
 vertical-align:middle;margin:0 .25em 0 0;opacity:1;z-index:auto;
}
/* Controls live outside the article and never affect the theme's toolbar. */
.pg-format-toolbar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.pg-format-toolbar > div {
  display: flex;
  align-items: center;
}
.pg-format-toolbar .components-button {
  color: inherit;
}
.pg-format-toolbar .components-button.is-pressed {
  background: transparent;
  color: #fff;
}
.pg-format-popover .components-popover__content {
  max-width: calc(100vw - 24px);
  width: 300px;
}
.pg-format-body {
  padding: 16px;
  font-size: 13px;
  color: #111;
  background: #fff;
}
.pg-format-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}
.pg-format-heading .components-button {
  height: 28px;
  min-width: 28px;
}
.pg-format-preset-row {
  display: flex;
  gap: 6px;
}
.pg-format-preset-row > * {
  flex: 1;
  justify-content: center;
}
/* SWELL's labeled four-by-three choices, using the actual inline surface for
   every sample. Components' button reset cannot erase an outline's border. */
.pg-format-popover:has(.pg-inline-button-grid){z-index:100010}
.pg-format-popover:has(.pg-inline-button-grid) .components-popover__content{width:340px}
.pg-inline-button-grid{display:grid;gap:12px;margin:0 0 12px}
.pg-inline-button-row{display:grid;grid-template-columns:72px repeat(3,minmax(0,1fr));gap:6px;align-items:center}
.pg-inline-button-type{font-size:11px;letter-spacing:-.4px;white-space:nowrap}
.pg-inline-button-grid .pg-inline-button-row .components-button.pg-inline-button-choice{display:block;width:100%;height:auto;min-height:0;margin:0;padding:0;background:transparent;border:0;border-radius:2px;box-shadow:none;line-height:1.5}
.pg-inline-button-choice .pg-inline-button.pg-inline-button{display:block;width:100%;max-width:100%;margin:0;padding:4px;font-size:12px;line-height:2}
.pg-inline-button-choice[aria-pressed="true"],.pg-inline-button-choice:focus-visible{outline:2px solid var(--wp-admin-theme-color,#111);outline-offset:2px}
.pg-inline-button-clear{display:flex;justify-content:flex-end;margin:0 0 12px}
.pg-inline-button-clear .components-button{height:auto;padding:4px 0}
.pg-inline-button-link{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border-top:1px solid #ddd;padding-top:12px}
.pg-inline-button-link-label{width:100%;font-size:12px;font-weight:600}
.pg-inline-button-link .block-editor-url-input{flex:1;min-width:0;width:auto}
.pg-inline-button-link .block-editor-url-input input{width:100%;min-width:0}
.pg-inline-button-link>.components-button{height:36px;flex-shrink:0}
.pg-format-symbols {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.pg-format-symbols button {
  min-width: 32px;
  justify-content: center;
  padding: 6px;
  font-size: 19px;
}
.pg-format-body .components-base-control {
  margin-bottom: 14px;
}
.pg-format-body > .components-button {
  margin-right: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .pg-inline-button::after {
    transition: none !important;
  }
}

.pg-toolbar-preferences .components-toggle-control {
  margin-block: 16px !important;
}
.pg-toolbar-preferences .components-toggle-control__label {
  line-height: 1.5;
}

/* A format fill already lives in a native ToolbarGroup. A second group adds
   WordPress header padding twice (notably in the newer fixed toolbar). */
.block-editor-block-toolbar .pg-format-toolbar {
  --pg-format-control-height: 48px;
  display: flex;
  align-items: center;
  align-self: flex-start;
  flex-wrap: nowrap;
  order: 10;
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
  padding-left: 5px;
  height: var(--pg-format-control-height);
  min-height: 0;
}
.editor-collapsible-block-toolbar .pg-format-toolbar,
.edit-widgets-header .pg-format-toolbar {
  --pg-format-control-height: 32px;
}
.pg-format-toolbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 24px;
  width: 1px;
  background: #ddd;
  transform: translateY(-50%);
}
.block-editor-block-toolbar .pg-format-toolbar :is(.components-dropdown, .pg-format-direct) {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}
.pg-format-direct:empty {
  display: none !important;
}
.block-editor-block-toolbar .pg-format-toolbar .components-button {
  min-width: 36px;
  height: var(--pg-format-control-height);
  min-height: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
  padding-inline: 6px;
  margin: 0;
}
.pg-format-toolbar .components-button svg {
  display: block;
  width: 20px;
  height: 20px;
}
.pg-format-menu-content {
  width: 280px;
  max-width: calc(100vw - 32px);
  color: #111;
  background: #fff;
  box-sizing: border-box;
}
.pg-format-menu-content .components-menu-group {
  padding: 6px;
  margin: 0;
}
.pg-format-menu-content .components-menu-item__button {
  min-height: 36px;
  height: auto;
  padding: 8px 10px;
  gap: 10px;
}
.pg-format-menu-content .components-menu-item__button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.pg-format-menu-back.components-button {
  width: 100%;
  justify-content: flex-start;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  height: 40px;
}
.pg-format-menu-content
  .pg-format-custom-trigger
  > .components-menu-items__item-icon {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.pg-format-sample {
  display: inline-block;
  max-width: 24px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.4;
  animation: none !important;
  padding: 1px 3px;
  margin: 0;
}
.pg-format-popover .components-popover__content {
  max-height: min(560px, 75vh);
  overflow-y: auto;
}
.pg-format-heading {
  margin-bottom: 12px;
  font-size: 13px;
}
.pg-format-body .pg-format-size-apply.components-button {
  --wp-ui-button-background-color-active: #111;
  background: #111;
  color: #fff;
  box-shadow: none;
  border: 1px solid transparent;
}
.pg-format-body .pg-format-size-apply.components-button:disabled {
  background: #f0f0f0;
  color: #777;
  border-color: #e0e0e0;
  cursor: not-allowed;
  opacity: 1;
}
.has-pg-main-thin-color {
  color: color-mix(in srgb, var(--pg-theme-main) 5%, #fff) !important;
}
.has-pg-main-thin-background-color {
  background: color-mix(in srgb, var(--pg-theme-main) 5%, #fff) !important;
}

/* WordPress wraps format fills in a slot; expose its children to the native flex order. */
.block-editor-block-toolbar__slot:has(> .pg-format-toolbar) {
  display: contents;
}
/* Keep tool popovers above WordPress's fixed toolbar and editor notices. */
.pg-format-popover,
.pg-format-menu-popover {
  z-index: 10000;
}

.pg-format-menu-popover .components-popover__content {
  max-width: calc(100vw - 24px);
  overflow: visible;
}
.pg-format-menu-content.is-custom-formats {
  width: 520px;
}
.pg-custom-format-grid > [role="group"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.pg-format-menu-content .components-menu-item__button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
}
.pg-format-menu-content .components-menu-item__item {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.pg-custom-format-grid .components-menu-item__button {
  height: 44px;
  min-height: 44px;
  padding: 6px 10px;
  gap: 8px;
}
.pg-custom-format-grid .components-menu-items__item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  margin: 0;
}
.pg-format-menu-content .pg-format-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  max-width: 32px;
  min-height: 24px;
  max-height: 28px;
  padding: 2px 4px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle;
  animation: none !important;
}
.pg-format-menu-content .pg-format-small {
  font-size: 10px;
}
@media (max-width: 540px) {
  .pg-custom-format-grid .components-menu-item__button {
    height: 48px;
    min-height: 48px;
    padding: 4px 6px;
    gap: 4px;
    font-size: 11px;
  }
  .pg-custom-format-grid .components-menu-items__item-icon {
    flex-basis: 28px;
    width: 28px;
  }
  .pg-format-menu-content .pg-format-sample {
    max-width: 28px;
  }
}

/* SWELL cell-background toolbar: two tabs, instant choices, grouped sizes. */
.pg-format-popover--cell .components-popover__content{width:256px}
.pg-format-popover--cell .pg-format-body{width:256px;padding:0}
.pg-format-popover--cell .components-tab-panel__tab-content{min-height:300px;padding:16px}
.pg-format-popover--cell .pg-cell-title{font-weight:700;margin-bottom:6px}
.pg-format-popover--cell .pg-cell-background{margin-bottom:1.5em}
.pg-format-popover--cell .pg-cell-symbols{margin-bottom:1em}
.pg-format-popover--cell .pg-cell-button-group{display:flex}
.pg-format-popover--cell .pg-cell-button-group .components-button{border-radius:0;margin:0;box-shadow:inset 0 0 0 1px #ddd}
.pg-format-popover--cell .pg-cell-button-group .components-button.is-primary{box-shadow:none}
.pg-format-popover--cell .pg-cell-button-group .components-button + .components-button{margin-left:-1px}
.pg-format-popover--cell .pg-cell-symbols .components-button{width:33px;height:36px;min-width:0;padding:6px}
.pg-format-popover--cell .pg-cell-symbols svg{width:20px;height:20px;fill:currentColor}
.pg-format-popover--cell .pg-cell-options .pg-cell-button-group{margin-bottom:1.5em}
.pg-format-popover--cell .pg-cell-options .components-button{height:36px;padding:6px 12px;flex:1;justify-content:center}
.pg-format-popover--cell [data-disabled]{opacity:.5;pointer-events:none}
.pg-format-popover--cell .pg-cell-clear{text-align:right;padding:0 8px 8px}
.pg-format-popover--cell .pg-cell-clear .components-button{padding:8px}
