/*
 * Base element styling for the FusionCommerce redesign.
 *
 * First migration pass:
 * - move safe global element rules out of the legacy layer;
 * - keep values compatible with legacy.css for now;
 * - do not add aggressive selectors that can break Joomla/VirtueMart extensions.
 */

html,
body {
	overflow-x: clip;
}

@supports not (overflow-x: clip) {
	html,
	body {
		overflow-x: hidden;
	}
}

body,
button,
input,
select,
textarea {
	font-family: var(--font-sans);
}

body {
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	color: var(--color-text-strong);
	font-family: var(--font-heading);
	font-weight: 500;
	line-height: 1.25;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
	margin-top: 0;
}

p:last-child,
ul:last-child,
ol:last-child,
dl:last-child,
figure:last-child,
blockquote:last-child {
	margin-bottom: 0;
}

b,
strong {
	font-weight: 600;
}

a,
.btn-link {
	color: var(--color-link);
}

a:hover,
a:focus,
.btn-link:hover,
.btn-link:focus {
	color: var(--color-link-hover);
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
	max-width: 100%;
}

img {
	height: auto;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
	cursor: not-allowed;
}

:focus-visible {
	outline: var(--focus-outline-primary);
	outline-offset: var(--focus-outline-offset);
}

::selection {
	background: var(--color-primary);
	color: var(--color-primary-soft);
}
