/* Ultimate Blocks "Tabbed Content" (.wp-block-ub-tabbed-content) active-tab
   title color fix. Forces the active tab title wrap transparent and
   re-colors the actual title text separately, falling back to the theme's
   contrast color when the site doesn't define its own
   --ub-tabbed-active-title-color. Plain CSS, not JS - var()'s second
   argument is a native fallback (used if the custom property is undefined),
   so the same conditional logic applies before first paint instead of after
   DOMContentLoaded, with no flash of the wrong color.

   !important + doubled last class on both rules (same trick WP core itself
   uses, e.g. .wp-block-navigation-item__content.wp-block-navigation-item__content)
   to guarantee these always win regardless of load order or future
   theme/plugin CSS - not just against what Ultimate Blocks ships today
   (dist/style-ultimate_blocks-style.css only ever sets `color` on the
   *wrapper* elements below, plain declarations with no !important; the
   inner .wp-block-ub-tabbed-content-tab-title itself only gets
   `word-break: initial` from the plugin, never a color of its own - so
   today this would already win without the extra insurance, but "highest
   priority" should hold up even if that ever changes). */
.wp-block-ub-tabbed-content .wp-block-ub-tabbed-content-tab-title-wrap.active.active,
.wp-block-ub-tabbed-content .wp-block-ub-tabbed-content-tab-title-vertical-wrap.active.active {
	color: transparent !important;
}
.wp-block-ub-tabbed-content-tab-title.wp-block-ub-tabbed-content-tab-title {
	color: var(--ub-tabbed-active-title-color, var(--wp--preset--color--contrast)) !important;
	white-space: nowrap;
}

.wp-block-ub-tabbed-content:not(.wp-block-ub-tabbed-content-pills):not(.wp-block-ub-tabbed-content-underline) .wp-block-ub-tabbed-content-tab-title-wrap,
.wp-block-ub-tabbed-content:not(.wp-block-ub-tabbed-content-pills):not(.wp-block-ub-tabbed-content-underline) .wp-block-ub-tabbed-content-tab-title-vertical-wrap {
	border-bottom: 0;
}

.wp-block-ub-tabbed-content-tabs-content {
	padding: 0;
}

/* Restores default paragraph/heading spacing inside tab panels specifically
   (internal comments #2, 2026-07-25 - designer: "since the last padding
   adjustment, the default paragraph styling was all zero").
   cuhk-shared/reset.css's site-wide `:root :where(.wp-block-group-is-layout-
   flow) > * { margin-block-start: 0; }` zeroes default inter-block spacing
   everywhere, because every OTHER pattern in this project manages its own
   spacing via flex/grid gap instead of relying on it. Tab panel content is
   the exception: it's ordinary flow-layout content (headings/paragraphs
   authored freely by an editor) that DOES rely on the normal default
   spacing - so that site-wide reset was silently stripping it. Verified
   this predates any recent padding edit (the reset.css rule itself is
   dated 2026-07-04); the padding change likely just drew attention to an
   area that had already been broken for weeks.
   Scoped narrowly to inside tab panels only - the site-wide rule stays
   untouched everywhere else, since every other pattern still needs it. */
:root :where(.wp-block-ub-tabbed-content-tab-content-wrap .wp-block-group-is-layout-flow) > * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.wp-block-ub-tabbed-content-tab-content-wrap {
	margin-left: 15px;
	margin-right: 15px;
}
