/**
 * Theme T&B — third-party plugin UI isolation.
 *
 * Neutral rendering surface for shortcodes, flipbooks, calculators, and builder widgets.
 *
 * @package Theme_TB
 * @since 1.0.0
 */

.tb-shortcode-surface,
.tb-plugin-surface {
  isolation: isolate;
  contain: layout style;
  width: 100%;
  max-width: none;
  overflow: visible;
  position: relative;
}

.tb-tool-embed__frame.tb-plugin-surface,
.tb-ebook-reader__frame.tb-plugin-surface {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  overflow: visible;
}

/* Theme styles must not cascade into plugin output. */
.tb-plugin-surface :where(button, input, select, textarea, img, iframe, canvas, video, embed, object, svg, table, figure, ul, ol, li, a, div, section, article) {
  all: revert;
}

.tb-entry-content.tb-plugin-surface :where(button:not(.tb-button), input:not(.tb-search-form__input):not(.tb-newsletter-form__input), select, textarea) {
  all: revert;
}

.elementor,
.elementor-widget,
.woocommerce,
.wpcf7,
.wpforms-container,
.wp-block-group,
.wp-block-columns,
[class*="wp-block-"] {
  isolation: isolate;
}

.elementor button,
.elementor input,
.elementor select,
.elementor textarea,
.woocommerce button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea,
.wpcf7 button,
.wpcf7 input,
.wpcf7 select,
.wpcf7 textarea,
.wpforms-container button,
.wpforms-container input,
.wpforms-container select,
.wpforms-container textarea,
[class*="wp-block-"] button,
[class*="wp-block-"] input,
[class*="wp-block-"] select,
[class*="wp-block-"] textarea {
  all: revert;
  font-family: inherit;
}

.tb-plugin-surface img,
.elementor img,
.woocommerce img,
.wpcf7 img,
.wpforms-container img,
[class*="wp-block-"] img {
  max-width: none;
  height: auto;
}

.tb-plugin-surface iframe,
.elementor iframe,
.woocommerce iframe,
.wpcf7 iframe,
.wpforms-container iframe {
  max-width: none;
  border: 0;
}

.tb-plugin-surface canvas,
.elementor canvas,
.woocommerce canvas {
  max-width: none;
}

.tb-plugin-surface table,
.elementor table,
.woocommerce table,
.wpcf7 table,
.wpforms-container table {
  width: auto;
  border-collapse: separate;
}

.tb-plugin-surface svg,
.elementor svg,
.woocommerce svg,
.wpcf7 svg,
.wpforms-container svg {
  display: inline;
  max-width: none;
}

.tb-plugin-surface ul,
.tb-plugin-surface ol,
.elementor ul,
.elementor ol,
.woocommerce ul,
.woocommerce ol {
  list-style: revert;
  margin: revert;
  padding: revert;
}

.tb-plugin-surface video,
.elementor video,
.woocommerce video {
  max-width: none;
  height: auto;
}