/*
 * Material 3 Expressive buttons.
 *
 * Component values are adapted from AndroidX Compose Material3 Button.kt and
 * generated button tokens at commit 39bdbe03eef999f4c1352f31a90526adad9245ae.
 */

.vortexg-m3-button {
	--vortexg-m3-button-height: 40px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-small);
	--vortexg-m3-button-inline-start: 16px;
	--vortexg-m3-button-inline-end: 16px;
	--vortexg-m3-button-icon-size: 20px;
	--vortexg-m3-button-icon-gap: 8px;
	--vortexg-m3-button-outline-width: 1px;
	--vortexg-m3-button-rest-shadow: var(--md-sys-elevation-level-0);
	--vortexg-m3-button-hover-shadow: var(--md-sys-elevation-level-1);
	--vortexg-m3-button-pressed-shadow: var(--md-sys-elevation-level-0);
	--vortexg-m3-button-current-radius: calc(var(--vortexg-m3-button-height) / 2);
	appearance: none;
	box-sizing: border-box;
	display: inline-grid;
	inline-size: max-content;
	min-inline-size: 58px;
	min-block-size: max(48px, var(--vortexg-m3-button-height));
	margin: 0;
	padding: 0;
	place-items: center;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	color: inherit;
	font: inherit;
	line-height: normal;
	text-align: center;
	text-decoration: none !important;
	text-decoration-line: none !important;
	text-shadow: none !important;
	vertical-align: middle;
	cursor: pointer;
	transition: none !important;
	-webkit-tap-highlight-color: transparent;
}

.vortexg-m3-button:is(:hover, :focus, :focus-visible, :active, :visited),
a.vortexg-m3-button:is(:hover, :focus, :focus-visible, :active, :visited) {
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	text-decoration: none !important;
	text-decoration-line: none !important;
	text-shadow: none !important;
	transition: none !important;
}

.vortexg-m3-button--full-width {
	inline-size: 100%;
}

.vortexg-m3-button__container {
	box-sizing: border-box;
	position: relative;
	display: grid;
	grid-template-areas: "content";
	inline-size: 100%;
	min-inline-size: 58px;
	block-size: var(--vortexg-m3-button-height);
	overflow: hidden;
	align-items: center;
	justify-items: center;
	border: 0 solid transparent;
	border-radius: var(--vortexg-m3-button-current-radius, var(--md-sys-shape-corner-full, 9999px));
	background: transparent;
	box-shadow: var(--vortexg-m3-button-rest-shadow);
	color: inherit;
	isolation: isolate;
}

.vortexg-m3-button__container > .vortexg-m3-state-layer,
.vortexg-m3-button__content {
	grid-area: content;
}

.vortexg-m3-button__container > .vortexg-m3-state-layer,
.vortexg-m3-button__container > .vortexg-m3-ripple-layer {
	pointer-events: none;
}

.vortexg-m3-button__content {
	z-index: 2;
	box-sizing: border-box;
	display: inline-flex;
	inline-size: max-content;
	max-inline-size: 100%;
	block-size: 100%;
	padding-inline: var(--vortexg-m3-button-inline-start) var(--vortexg-m3-button-inline-end);
	align-items: center;
	justify-content: center;
	gap: var(--vortexg-m3-button-icon-gap);
	white-space: nowrap;
}

.vortexg-m3-button--full-width .vortexg-m3-button__content {
	inline-size: 100%;
}

.vortexg-m3-button--align-start .vortexg-m3-button__container {
	justify-items: stretch;
}

.vortexg-m3-button--align-start .vortexg-m3-button__content {
	justify-content: flex-start;
}

.vortexg-m3-button__label {
	min-inline-size: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vortexg-m3-button__icon {
	display: inline-grid;
	flex: 0 0 var(--vortexg-m3-button-icon-size);
	inline-size: var(--vortexg-m3-button-icon-size);
	block-size: var(--vortexg-m3-button-icon-size);
	place-items: center;
}

.vortexg-m3-button__icon svg {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	fill: currentColor;
}

.vortexg-m3-button--extra-small {
	--vortexg-m3-button-height: 32px;
	--vortexg-m3-button-inline-start: 12px;
	--vortexg-m3-button-inline-end: 12px;
	--vortexg-m3-button-icon-size: 20px;
	--vortexg-m3-button-icon-gap: 4px;
	--vortexg-m3-button-outline-width: 1px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-small);
	font-family: var(--md-sys-typescale-label-large-font);
	font-size: var(--md-sys-typescale-label-large-size);
	font-weight: var(--md-sys-typescale-label-large-weight);
	line-height: var(--md-sys-typescale-label-large-line-height);
	letter-spacing: var(--md-sys-typescale-label-large-tracking);
}

.vortexg-m3-button--small {
	--vortexg-m3-button-height: 40px;
	--vortexg-m3-button-inline-start: 16px;
	--vortexg-m3-button-inline-end: 16px;
	--vortexg-m3-button-icon-size: 20px;
	--vortexg-m3-button-icon-gap: 8px;
	--vortexg-m3-button-outline-width: 1px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-small);
	font-family: var(--md-sys-typescale-label-large-font);
	font-size: var(--md-sys-typescale-label-large-size);
	font-weight: var(--md-sys-typescale-label-large-weight);
	line-height: var(--md-sys-typescale-label-large-line-height);
	letter-spacing: var(--md-sys-typescale-label-large-tracking);
}

.vortexg-m3-button--medium {
	--vortexg-m3-button-height: 56px;
	--vortexg-m3-button-inline-start: 24px;
	--vortexg-m3-button-inline-end: 24px;
	--vortexg-m3-button-icon-size: 24px;
	--vortexg-m3-button-icon-gap: 8px;
	--vortexg-m3-button-outline-width: 1px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-medium);
	font-family: var(--md-sys-typescale-title-medium-font);
	font-size: var(--md-sys-typescale-title-medium-size);
	font-weight: var(--md-sys-typescale-title-medium-weight);
	line-height: var(--md-sys-typescale-title-medium-line-height);
	letter-spacing: var(--md-sys-typescale-title-medium-tracking);
}

.vortexg-m3-button--large {
	--vortexg-m3-button-height: 96px;
	--vortexg-m3-button-inline-start: 48px;
	--vortexg-m3-button-inline-end: 48px;
	--vortexg-m3-button-icon-size: 32px;
	--vortexg-m3-button-icon-gap: 12px;
	--vortexg-m3-button-outline-width: 2px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-large);
	font-family: var(--md-sys-typescale-headline-small-font);
	font-size: var(--md-sys-typescale-headline-small-size);
	font-weight: var(--md-sys-typescale-headline-small-weight);
	line-height: var(--md-sys-typescale-headline-small-line-height);
	letter-spacing: var(--md-sys-typescale-headline-small-tracking);
}

.vortexg-m3-button--extra-large {
	--vortexg-m3-button-height: 136px;
	--vortexg-m3-button-inline-start: 64px;
	--vortexg-m3-button-inline-end: 64px;
	--vortexg-m3-button-icon-size: 40px;
	--vortexg-m3-button-icon-gap: 16px;
	--vortexg-m3-button-outline-width: 3px;
	--vortexg-m3-button-pressed-radius: var(--md-sys-shape-corner-large);
	font-family: var(--md-sys-typescale-headline-large-font);
	font-size: var(--md-sys-typescale-headline-large-size);
	font-weight: var(--md-sys-typescale-headline-large-weight);
	line-height: var(--md-sys-typescale-headline-large-line-height);
	letter-spacing: var(--md-sys-typescale-headline-large-tracking);
}

@media (hover: hover) and (pointer: fine) {
	.vortexg-m3-button--small {
		--vortexg-m3-button-height: 36px;
	}

	.vortexg-m3-button--small.vortexg-m3-button--has-leading-icon {
		--vortexg-m3-button-inline-start: 12px;
	}

	.vortexg-m3-button--small.vortexg-m3-button--has-trailing-icon {
		--vortexg-m3-button-inline-end: 12px;
	}
}

.vortexg-m3-button--filled,
a.vortexg-m3-button--filled,
.vortexg-m3-button--filled:is(:hover, :focus, :active, :visited),
a.vortexg-m3-button--filled:is(:hover, :focus, :active, :visited) {
	color: var(--md-sys-color-on-primary) !important;
}

.vortexg-m3-button--filled .vortexg-m3-button__container {
	background: var(--md-sys-color-primary);
}

.vortexg-m3-button--elevated,
a.vortexg-m3-button--elevated,
.vortexg-m3-button--elevated:is(:hover, :focus, :active, :visited),
a.vortexg-m3-button--elevated:is(:hover, :focus, :active, :visited) {
	--vortexg-m3-button-rest-shadow: var(--md-sys-elevation-level-1);
	--vortexg-m3-button-hover-shadow: var(--md-sys-elevation-level-2);
	--vortexg-m3-button-pressed-shadow: var(--md-sys-elevation-level-1);
	color: var(--md-sys-color-primary) !important;
}

.vortexg-m3-button--elevated .vortexg-m3-button__container {
	background: var(--md-sys-color-surface-container-low);
}

.vortexg-m3-button--tonal,
a.vortexg-m3-button--tonal,
.vortexg-m3-button--tonal:is(:hover, :focus, :active, :visited),
a.vortexg-m3-button--tonal:is(:hover, :focus, :active, :visited) {
	color: var(--md-sys-color-on-secondary-container) !important;
}

.vortexg-m3-button--tonal .vortexg-m3-button__container {
	background: var(--md-sys-color-secondary-container);
}

.vortexg-m3-button--outlined,
a.vortexg-m3-button--outlined,
.vortexg-m3-button--outlined:is(:hover, :focus, :active, :visited),
a.vortexg-m3-button--outlined:is(:hover, :focus, :active, :visited) {
	--vortexg-m3-button-hover-shadow: var(--md-sys-elevation-level-0);
	color: var(--md-sys-color-on-surface-variant) !important;
}

.vortexg-m3-button--outlined .vortexg-m3-button__container {
	border-width: var(--vortexg-m3-button-outline-width);
	border-color: var(--md-sys-color-outline-variant);
	background: transparent;
}

.vortexg-m3-button--text,
a.vortexg-m3-button--text,
.vortexg-m3-button--text:is(:hover, :focus, :active, :visited),
a.vortexg-m3-button--text:is(:hover, :focus, :active, :visited) {
	--vortexg-m3-button-hover-shadow: var(--md-sys-elevation-level-0);
	color: var(--md-sys-color-primary) !important;
}

.vortexg-m3-button--text .vortexg-m3-button__container {
	background: transparent;
}

.vortexg-m3-button[data-vortexg-m3-preview-state="hover"] .vortexg-m3-state-layer {
	opacity: var(--md-sys-state-hover-state-layer-opacity);
}

.vortexg-m3-button[data-vortexg-m3-preview-state="focus"] .vortexg-m3-state-layer {
	opacity: var(--md-sys-state-focus-state-layer-opacity);
}

.vortexg-m3-button:focus-visible .vortexg-m3-button__container,
.vortexg-m3-button[data-vortexg-m3-preview-state="focus"] .vortexg-m3-button__container {
	outline: 3px solid var(--md-sys-color-primary);
	outline-offset: 2px;
}

.vortexg-m3-button[data-vortexg-m3-pressed="true"] .vortexg-m3-state-layer,
.vortexg-m3-button[data-vortexg-m3-preview-state="pressed"] .vortexg-m3-state-layer {
	opacity: var(--md-sys-state-pressed-state-layer-opacity);
}

.vortexg-m3-button:hover:not(:disabled):not([aria-disabled="true"]) .vortexg-m3-button__container,
.vortexg-m3-button[data-vortexg-m3-preview-state="hover"] .vortexg-m3-button__container {
	box-shadow: var(--vortexg-m3-button-hover-shadow);
}

.vortexg-m3-button[data-vortexg-m3-pressed="true"] .vortexg-m3-button__container,
.vortexg-m3-button[data-vortexg-m3-preview-state="pressed"] .vortexg-m3-button__container {
	box-shadow: var(--vortexg-m3-button-pressed-shadow);
}

.vortexg-m3-button:disabled,
.vortexg-m3-button[aria-disabled="true"],
a.vortexg-m3-button[aria-disabled="true"],
.vortexg-m3-button[data-vortexg-m3-preview-state="disabled"] {
	cursor: default;
}

.vortexg-m3-button--filled:disabled,
.vortexg-m3-button--elevated:disabled,
.vortexg-m3-button--filled[aria-disabled="true"],
.vortexg-m3-button--elevated[aria-disabled="true"],
a.vortexg-m3-button--filled[aria-disabled="true"],
a.vortexg-m3-button--elevated[aria-disabled="true"],
.vortexg-m3-button--filled[data-vortexg-m3-preview-state="disabled"],
.vortexg-m3-button--elevated[data-vortexg-m3-preview-state="disabled"],
a.vortexg-m3-button--filled[data-vortexg-m3-preview-state="disabled"],
a.vortexg-m3-button--elevated[data-vortexg-m3-preview-state="disabled"] {
	color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 38%, transparent) !important;
}

.vortexg-m3-button--tonal:disabled,
.vortexg-m3-button--tonal[aria-disabled="true"],
a.vortexg-m3-button--tonal[aria-disabled="true"],
.vortexg-m3-button--tonal[data-vortexg-m3-preview-state="disabled"],
a.vortexg-m3-button--tonal[data-vortexg-m3-preview-state="disabled"] {
	color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent) !important;
}

.vortexg-m3-button--filled:disabled .vortexg-m3-button__container,
.vortexg-m3-button--elevated:disabled .vortexg-m3-button__container,
.vortexg-m3-button--filled[aria-disabled="true"] .vortexg-m3-button__container,
.vortexg-m3-button--elevated[aria-disabled="true"] .vortexg-m3-button__container,
.vortexg-m3-button--filled[data-vortexg-m3-preview-state="disabled"] .vortexg-m3-button__container,
.vortexg-m3-button--elevated[data-vortexg-m3-preview-state="disabled"] .vortexg-m3-button__container {
	background: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
	box-shadow: none;
}

.vortexg-m3-button--tonal:disabled .vortexg-m3-button__container,
.vortexg-m3-button--tonal[aria-disabled="true"] .vortexg-m3-button__container,
.vortexg-m3-button--tonal[data-vortexg-m3-preview-state="disabled"] .vortexg-m3-button__container {
	background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
	box-shadow: none;
}

.vortexg-m3-button--outlined:disabled,
.vortexg-m3-button--text:disabled,
.vortexg-m3-button--outlined[aria-disabled="true"],
.vortexg-m3-button--text[aria-disabled="true"],
a.vortexg-m3-button--outlined[aria-disabled="true"],
a.vortexg-m3-button--text[aria-disabled="true"],
.vortexg-m3-button--outlined[data-vortexg-m3-preview-state="disabled"],
.vortexg-m3-button--text[data-vortexg-m3-preview-state="disabled"],
a.vortexg-m3-button--outlined[data-vortexg-m3-preview-state="disabled"],
a.vortexg-m3-button--text[data-vortexg-m3-preview-state="disabled"] {
	color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 38%, transparent) !important;
}

.vortexg-m3-button--outlined:disabled .vortexg-m3-button__container,
.vortexg-m3-button--outlined[aria-disabled="true"] .vortexg-m3-button__container,
.vortexg-m3-button--outlined[data-vortexg-m3-preview-state="disabled"] .vortexg-m3-button__container {
	border-color: var(--md-sys-color-outline-variant);
}

/*
 * Gutenberg fallback: the public runtime upgrades these links to the complete
 * container markup. These rules preserve the correct variant and size in the
 * editor canvas before enhancement.
 */
.wp-block-button[class*="is-style-vortexg-m3-"] {
	--vortexg-m3-button-height: 40px;
	--vortexg-m3-button-inline: 16px;
	--vortexg-m3-button-radius: var(--md-sys-shape-corner-full);
	display: inline-flex;
	min-block-size: 48px;
	align-items: center;
}

.wp-block-button.vortexg-m3-size-extra-small {
	--vortexg-m3-button-height: 32px;
	--vortexg-m3-button-inline: 12px;
}

.wp-block-button.vortexg-m3-size-medium {
	--vortexg-m3-button-height: 56px;
	--vortexg-m3-button-inline: 24px;
}

.wp-block-button.vortexg-m3-size-large {
	--vortexg-m3-button-height: 96px;
	--vortexg-m3-button-inline: 48px;
}

.wp-block-button.vortexg-m3-size-extra-large {
	--vortexg-m3-button-height: 136px;
	--vortexg-m3-button-inline: 64px;
}

.wp-block-button[class*="is-style-vortexg-m3-"] > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	box-sizing: border-box;
	display: inline-flex;
	min-inline-size: 58px;
	block-size: var(--vortexg-m3-button-height);
	padding-inline: var(--vortexg-m3-button-inline);
	align-items: center;
	justify-content: center;
	border-radius: var(--vortexg-m3-button-radius);
	font-family: var(--md-sys-typescale-label-large-font);
	font-size: var(--md-sys-typescale-label-large-size);
	font-weight: var(--md-sys-typescale-label-large-weight);
	line-height: var(--md-sys-typescale-label-large-line-height);
	letter-spacing: var(--md-sys-typescale-label-large-tracking);
	text-decoration: none;
}

.wp-block-button.vortexg-m3-size-medium > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	font-size: var(--md-sys-typescale-title-medium-size);
	line-height: var(--md-sys-typescale-title-medium-line-height);
}

.wp-block-button.vortexg-m3-size-large > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	font-size: var(--md-sys-typescale-headline-small-size);
	font-weight: var(--md-sys-typescale-headline-small-weight);
	line-height: var(--md-sys-typescale-headline-small-line-height);
}

.wp-block-button.vortexg-m3-size-extra-large > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	font-size: var(--md-sys-typescale-headline-large-size);
	font-weight: var(--md-sys-typescale-headline-large-weight);
	line-height: var(--md-sys-typescale-headline-large-line-height);
}

.wp-block-button.is-style-vortexg-m3-filled > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	border: 0;
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
}

.wp-block-button.is-style-vortexg-m3-elevated > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	border: 0;
	background: var(--md-sys-color-surface-container-low);
	box-shadow: var(--md-sys-elevation-level-1);
	color: var(--md-sys-color-primary);
}

.wp-block-button.is-style-vortexg-m3-tonal > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	border: 0;
	background: var(--md-sys-color-secondary-container);
	color: var(--md-sys-color-on-secondary-container);
}

.wp-block-button.is-style-vortexg-m3-outlined > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	border: 1px solid var(--md-sys-color-outline-variant);
	background: transparent;
	color: var(--md-sys-color-on-surface-variant);
}

.wp-block-button.is-style-vortexg-m3-text > :is(.wp-block-button__link, .wp-element-button):not(.vortexg-m3-button) {
	border: 0;
	background: transparent;
	color: var(--md-sys-color-primary);
}

@media (prefers-reduced-motion: reduce) {
	.vortexg-m3-button__ripple {
		display: none;
	}
}

@media (forced-colors: active) {
	.vortexg-m3-button__container {
		border: 1px solid ButtonText;
		forced-color-adjust: auto;
	}

	.vortexg-m3-button:focus-visible .vortexg-m3-button__container {
		outline-color: Highlight;
	}
}
