/**
 * Mahis Commerce foundation styles.
 */

:root {
	color-scheme: light;
}

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

html {
	font-family: var(--mc-font-family);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
	font-family: inherit;
	font-size: var(--mc-font-size-md);
	font-weight: var(--mc-font-weight-regular);
	line-height: var(--mc-line-height-normal);
}

body,
button,
input,
select,
textarea {
	font-synthesis: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: var(--mc-font-weight-bold);
	line-height: var(--mc-line-height-tight);
}

strong,
b {
	font-weight: var(--mc-font-weight-bold);
}

button,
input,
optgroup,
select,
textarea {
	font: inherit;
	line-height: var(--mc-line-height-control);
}

.woocommerce,
.woocommerce-page {
	font-family: inherit;
}

.mc-button {
	display: inline-flex;
	gap: var(--mc-space-xs);
	align-items: center;
	justify-content: center;
	padding: var(--mc-button-padding-block) var(--mc-button-padding-inline);
	color: var(--mc-color-button-text);
	font-weight: var(--mc-button-font-weight);
	line-height: var(--mc-line-height-control);
	text-align: center;
	text-decoration: none;
	background: var(--mc-color-primary);
	border: 1px solid var(--mc-color-primary);
	border-radius: var(--mc-radius-button);
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.mc-button:hover {
	color: var(--mc-color-button-text);
	background: var(--mc-color-primary-hover);
	border-color: var(--mc-color-primary-hover);
}

.mc-button--primary {
	color: var(--mc-color-button-text);
	background: var(--mc-color-primary);
	border-color: var(--mc-color-primary);
}

.mc-button--secondary {
	color: var(--mc-color-primary);
	background: transparent;
	border-color: var(--mc-color-primary);
}

.mc-button--secondary:hover {
	color: var(--mc-color-button-text);
	background: var(--mc-color-primary);
}

.mc-button--icon {
	width: calc((var(--mc-button-padding-block) * 2) + 1.5rem);
	height: calc((var(--mc-button-padding-block) * 2) + 1.5rem);
	padding: 0;
}

.mc-button:focus-visible {
	outline: 2px solid var(--mc-color-primary);
	outline-offset: 2px;
}

.mc-button[disabled],
.mc-button[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	z-index: 100000;
	inset-block-start: var(--mc-space-md);
	inset-inline-start: var(--mc-space-md);
	width: auto;
	height: auto;
	padding: var(--mc-space-sm) var(--mc-space-md);
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--mc-color-surface);
	color: var(--mc-color-text-primary);
}

@media (max-width: 47.999rem) {
	body {
		font-size: var(--mc-mobile-font-size-body);
		line-height: var(--mc-mobile-line-height-body);
	}

	.mc-button {
		font-size: var(--mc-mobile-font-size-body);
		line-height: var(--mc-mobile-line-height-control);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mc-button {
		transition: none;
	}
}
