/**
 * Shared front-end normalize for every DHCL component.
 *
 * Server-rendered components live inside the site's own markup, so the active
 * theme's global rules land on the elements we own: button:hover repaints our
 * carousel arrows, a palette rule recolours the Read more link, ul gets discs
 * and indents inside a flip card. This neutralizes the elements we own, scoped
 * to .dhcl-scope so nothing outside a component is touched. It is registered as
 * a DEPENDENCY of each component stylesheet, so it loads only when a component
 * actually renders.
 *
 * Specificity ladder, which is what makes this work:
 *
 *   theme        button:hover                     (0,1,1)
 *   theme        .entry-content button:hover      (0,2,1)
 *   this file    .dhcl-scope button:hover         (0,2,1)
 *   component    .dhcl-scope .dhcl-tst__more:hover (0,3,0)  <- wins
 *
 * The class column is compared before the element column, so a component's own
 * .dhcl-scope-prefixed rule always outranks the neutralize rule below it. Every
 * interactive rule in the component stylesheets carries that prefix for exactly
 * this reason.
 *
 * Deliberately NOT reset: font-family, font-size and text colour on ordinary
 * copy. Component TEXT is meant to inherit the site's typography; this file is
 * about controls and structure only.
 */

.dhcl-scope,
.dhcl-scope *,
.dhcl-scope *::before,
.dhcl-scope *::after {
	box-sizing: border-box;
}

/* ---- Controls ---------------------------------------------------------- */

/*
 * Strip the theme's button skin back to nothing. Each component then re-adds
 * its own padding, colour and radius through its .dhcl-scope-prefixed classes.
 */
.dhcl-scope button,
.dhcl-scope [type="button"],
.dhcl-scope [type="submit"],
.dhcl-scope [type="reset"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	min-height: 0;
	min-width: 0;
	width: auto;
	transform: none;
	transition: none;
}

/*
 * A control that cannot be used must not claim it can. The rule above hands
 * every button the pointer, which is correct right up to the moment the button
 * is switched off, and a faded arrow still offering the hand is a worse signal
 * than no hand at all.
 *
 * Stated once here rather than per component. Four components already override
 * the cursor on their own disabled arrow or toggle, and those rules are more
 * specific so they still win; this covers everything they do not, including any
 * control that gains a disabled state later. Both mechanisms are matched: the
 * real attribute, and aria-disabled for a control that has to stay focusable.
 *
 * cursor: default rather than not-allowed, matching what those four components
 * already use, so the whole plugin says the same thing.
 */
.dhcl-scope button:disabled,
.dhcl-scope button[aria-disabled='true'],
.dhcl-scope [type='button']:disabled,
.dhcl-scope [type='submit']:disabled,
.dhcl-scope [type='reset']:disabled {
	cursor: default;
}

/*
 * The interactive states are where themes are most aggressive (Kadence ships
 * background, box-shadow and transform on button:hover). Neutralize all three
 * states; components define their real hover above this.
 */
.dhcl-scope button:hover,
.dhcl-scope button:focus,
.dhcl-scope button:active,
.dhcl-scope button:focus-visible,
.dhcl-scope [type="button"]:hover,
.dhcl-scope [type="button"]:focus,
.dhcl-scope [type="button"]:active,
.dhcl-scope [type="submit"]:hover,
.dhcl-scope [type="submit"]:focus,
.dhcl-scope [type="submit"]:active {
	background: none;
	border: 0;
	color: inherit;
	box-shadow: none;
	text-decoration: none;
	transform: none;
	outline: none;
}

/*
 * Anchors we style as buttons or tiles. Plain prose links inside a quote or an
 * event description are intentionally left alone so they keep matching the
 * site.
 */
.dhcl-scope .dhcl-cards__btn,
.dhcl-scope .dhcl-flipcard__btn,
.dhcl-scope .dhcl-flipcard__link,
.dhcl-scope .dhcl-gallery__link,
.dhcl-scope .dhcl-marquee__link,
.dhcl-scope .dhcl-events__link,
.dhcl-scope .dhcl-events__page-link,
.dhcl-scope .dhcl-event__cal-link,
.dhcl-scope .dhcl-event__place-link {
	box-shadow: none;
	text-shadow: none;
	transform: none;
}

/* ---- Structure --------------------------------------------------------- */

/*
 * Themes give lists discs and indents through global rules. Every list we
 * render is a layout construct (event details, flip-card bullets, carousel
 * dots), and each re-adds any marker it wants itself.
 */
.dhcl-scope ul,
.dhcl-scope ol,
.dhcl-scope li {
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
}

.dhcl-scope img {
	max-width: 100%;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/*
 * Figures and their captions pick up theme margins that break card alignment.
 */
.dhcl-scope figure {
	margin: 0;
}
