/* Reusable components and registered native block-style variants. */

/* stylelint-disable selector-class-pattern -- WordPress core classes use underscores. */
/* stylelint-disable no-descending-specificity -- Variant state rules intentionally follow their foundations. */

:where(.wp-element-button, .wp-block-button__link, button, input[type="button"], input[type="submit"], input[type="reset"]) {
	display: inline-flex;
	min-height: var(--wp--custom--control--minimum-height);
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--medium);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--wp--custom--motion--fast) ease,
		border-color var(--wp--custom--motion--fast) ease,
		color var(--wp--custom--motion--fast) ease,
		box-shadow var(--wp--custom--motion--fast) ease;
}

:where(.wp-element-button, .wp-block-button__link, button, input[type="button"], input[type="submit"]):hover {
	background: var(--wp--custom--color--burgundy-hover);
	color: var(--wp--preset--color--base);
}

:where(button, input, select, textarea):disabled,
:where(.wp-element-button, .wp-block-button__link)[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.55;
}

.wp-block-button.is-style-primary .wp-block-button__link {
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-secondary .wp-block-button__link {
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background: var(--wp--custom--color--forest-hover);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--burgundy);
	background: transparent;
	color: var(--wp--preset--color--burgundy);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-text-link .wp-block-button__link {
	min-height: var(--wp--custom--control--minimum-height);
	padding-inline: var(--wp--preset--spacing--2-xs);
	background: transparent;
	color: var(--wp--preset--color--burgundy);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.wp-block-button.is-style-text-link .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--custom--color--burgundy-hover);
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select, textarea) {
	width: 100%;
	min-height: var(--wp--custom--control--minimum-height);
	border: 1px solid var(--wp--custom--color--border);
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--charcoal);
	font: inherit;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
}

:where(textarea) {
	min-height: 8rem;
	resize: vertical;
}

:where(label, legend) {
	display: block;
	margin-block-end: var(--wp--preset--spacing--xs);
	color: var(--wp--preset--color--charcoal);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
}

:where(input, select, textarea)::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

:where(input, select, textarea)[aria-invalid="true"] {
	border-color: var(--wp--custom--color--error);
}

:where(input, select, textarea)[data-state="success"] {
	border-color: var(--wp--custom--color--success);
}

:where(input, select, textarea):disabled {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--muted);
}

:where(input, textarea)[readonly] {
	border-style: dashed;
	background: var(--wp--preset--color--cream);
}

.mosaffron-field-error,
.mosaffron-field-success,
.mosaffron-help-text {
	display: block;
	margin-block-start: var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--sm);
}

.mosaffron-field-error {
	color: var(--wp--custom--color--error);
}

.mosaffron-field-success {
	color: var(--wp--custom--color--success);
}

.mosaffron-help-text {
	color: var(--wp--preset--color--muted);
}

.wp-block-group:is(.is-style-surface-card, .is-style-bordered-panel, .is-style-cream-section, .is-style-burgundy-section, .is-style-forest-section) {
	padding: var(--wp--preset--spacing--xl);
	border-radius: var(--wp--custom--radius--large);
}

.wp-block-group.is-style-surface-card,
.wp-block-group.is-style-bordered-panel {
	border: 1px solid var(--wp--custom--color--border);
	background: var(--wp--preset--color--base);
}

.wp-block-group.is-style-surface-card {
	box-shadow: var(--wp--preset--shadow--subtle);
}

.wp-block-group.is-style-cream-section {
	background: var(--wp--preset--color--cream);
}

.wp-block-group:is(.is-style-burgundy-section, .is-style-forest-section) {
	color: var(--wp--preset--color--base);
}

.wp-block-group.is-style-burgundy-section {
	background: var(--wp--preset--color--burgundy);
}

.wp-block-group.is-style-forest-section {
	background: var(--wp--preset--color--forest);
}

.wp-block-group:is(.is-style-burgundy-section, .is-style-forest-section) :where(h1, h2, h3, h4, h5, h6, p, li) {
	color: var(--wp--preset--color--base);
}

.wp-block-group:is(.is-style-burgundy-section, .is-style-forest-section) a {
	color: var(--wp--preset--color--base);
}

.wp-block-group:is(.is-style-burgundy-section, .is-style-forest-section) :focus-visible {
	box-shadow: 0 0 0 2px var(--wp--preset--color--base);
}

.mosaffron-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	min-height: 1.75rem;
	padding-inline: var(--wp--preset--spacing--sm);
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--custom--color--saffron-soft);
	color: var(--wp--preset--color--charcoal);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	line-height: 1.3;
}

.mosaffron-notice {
	padding: var(--wp--preset--spacing--lg);
	border-inline-start: 4px solid currentcolor;
	border-radius: var(--wp--custom--radius--small);
}

.mosaffron-notice.is-information {
	background: var(--wp--custom--color--information-soft);
	color: var(--wp--custom--color--information);
}

.mosaffron-notice.is-success {
	background: var(--wp--custom--color--success-soft);
	color: var(--wp--custom--color--success);
}

.mosaffron-notice.is-warning {
	background: var(--wp--custom--color--warning-soft);
	color: var(--wp--custom--color--warning);
}

.mosaffron-notice.is-error {
	background: var(--wp--custom--color--error-soft);
	color: var(--wp--custom--color--error);
}

.mosaffron-notice.is-neutral {
	border-color: var(--wp--custom--color--border);
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--charcoal);
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table :where(th, td) {
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--color--border);
	text-align: start;
	vertical-align: top;
}

.wp-block-table th {
	background: var(--wp--preset--color--cream);
	font-weight: 700;
}

.wp-block-table.is-style-specification-table th[scope="row"] {
	width: 35%;
	color: var(--wp--preset--color--burgundy);
}

.wp-block-table.is-style-comparison-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--cream);
}

.wp-block-quote.is-style-editorial-quote {
	margin-inline: 0;
	padding-inline-start: var(--wp--preset--spacing--lg);
	border-inline-start: 3px solid var(--wp--preset--color--saffron);
}

.wp-block-quote.is-style-editorial-quote cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--sm);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
}

.wp-block-list.is-style-check-list {
	padding-inline-start: 0;
	list-style: none;
}

.wp-block-list.is-style-check-list > li {
	position: relative;
	padding-inline-start: var(--wp--preset--spacing--xl);
}

.wp-block-list.is-style-check-list > li::before {
	position: absolute;
	inset-inline-start: 0;
	color: var(--wp--preset--color--forest);
	content: "✓";
	font-weight: 700;
}

.wp-block-image.is-style-framed img {
	border: 1px solid var(--wp--custom--color--border);
	border-radius: var(--wp--custom--radius--large);
}

.wp-block-image.is-style-soft-shadow img {
	border-radius: var(--wp--custom--radius--large);
	box-shadow: var(--wp--preset--shadow--raised);
}

.wp-block-separator.is-style-saffron-accent {
	width: min(100%, 8rem);
	border-color: var(--wp--preset--color--saffron);
}

.wp-block-separator.is-style-short-divider {
	width: 4rem;
	margin-inline-start: 0;
	border-color: var(--wp--custom--color--border);
}

.wp-block-details.is-style-faq-item {
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
	border: 1px solid var(--wp--custom--color--border);
	border-radius: var(--wp--custom--radius--medium);
}

.wp-block-details.is-style-faq-item summary {
	min-height: var(--wp--custom--control--minimum-height);
	cursor: pointer;
	font-weight: 600;
}

.wp-block-details.is-style-faq-item[open] summary {
	margin-block-end: var(--wp--preset--spacing--md);
}

.mosaffron-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: var(--wp--preset--spacing--lg);
}

@media (max-width: 37.5rem) {

	.wp-block-group:is(.is-style-surface-card, .is-style-bordered-panel, .is-style-cream-section, .is-style-burgundy-section, .is-style-forest-section) {
		padding: var(--wp--preset--spacing--lg);
	}

	.wp-block-buttons > .wp-block-button {
		width: 100%;
	}

	.wp-block-buttons > .wp-block-button .wp-block-button__link {
		width: 100%;
	}
}

/* stylelint-enable no-descending-specificity */
/* stylelint-enable selector-class-pattern */
