/* Reset y estilos de elementos HTML. Nada aqui debe depender de una clase.
   Orden: de lo mas general a lo mas especifico.
	1. Reset universal
	2. Raiz del documento (html, body)
	3. Layout de nivel superior (main)
	4. Tipografia
	5. Listas
	6. Tablas
	7. Contenido embebido (imagenes, video, etc.)
	8. Formularios y botones
	9. Elementos interactivos y de estado
	10. Scrollbar
	11. Animaciones
	12. Clases del framework Blazor
*/
@layer base {

	/* ---------------------------------- */
	/* 1. Reset universal                 */
	/* ---------------------------------- */
	/*
	1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
	2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
	3. Remove default spacing; force styling of type through styling, rather than elements.
	*/
	*,
	*::before,
	*::after {
		box-sizing: border-box; /* 1 */
		border-width: 0; /* 2 */
		border-style: solid; /* 2 */
		border-color: #E4E7EC; /* 2 */
		margin: 0; /* 3 */
		padding: 0; /* 3 */
		font: inherit; /* 3 */
	}

	::before,
	::after {
		--tw-content: '';
	}

	/* ---------------------------------- */
	/* 2. Raiz del documento              */
	/* ---------------------------------- */
	/*
	1. Use a consistent sensible line-height in all browsers.
	2. Prevent adjustments of font size after orientation changes in iOS.
	3. Use a more readable tab size.
	4. Use the user's configured `sans` font-family by default.
	5. Use the user's configured `sans` font-feature-settings by default.
	*/
	html {
		/*color-scheme: dark light;*/
		line-height: 1.5; /* 1 */
		-webkit-text-size-adjust: 100%; /* 2 */
		-moz-tab-size: 4; /* 3 */
		-o-tab-size: 4;
		tab-size: 4; /* 3 */
		font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
		font-feature-settings: normal; /* 5 */
		overflow-x: hidden;
		scroll-behavior: smooth;
		scroll-padding-top: 2rem;
	}

	/* Inherit line-height from `html` so users can set them as a class directly on the `html` element. */
	body {
		min-height: 100svh;
		min-width: 23rem;
		color: var(--nrh-ink);
		background-color: var(--nrh-ink-dark);
		font-family: 'Hanken Grotesk', system-ui, sans-serif;
		font-size: 1rem;
		line-height: inherit;
		-webkit-font-smoothing: antialiased;
	}

	/* ---------------------------------- */
	/* 3. Layout de nivel superior        */
	/* ---------------------------------- */
	main {
		overflow-x: auto;
		min-width: 370px;
		transition: margin-left 0.3s ease;
		flex: 1;
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}

	/* ---------------------------------- */
	/* 4. Tipografia                      */
	/* ---------------------------------- */
	/* Remove the default font size and weight for headings. */
	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-size: inherit;
		font-weight: inherit;
		text-wrap: balance;
		letter-spacing: 0.025em;
	}

	h1 {
		font-weight: 600;
		color: var(--nrh-ink);
		font-size: 2.00rem;
		line-height: 2.50rem;
		text-align: center;
	}

	h2 {
		font-weight: 600;
		color: var(--nrh-ink);
		font-size: 1.75rem;
		line-height: 2.50rem;
		text-align: center;
	}

	h3 {
		font-weight: 600;
		font-size: 1.25rem;
		line-height: 1.75rem;
	}

	p {
		letter-spacing: 0.005em;
	}

	/* improve readability with max-width on paragraphs and lists */
	/* prevent orphans in supported browsers */
	/*p,
	li {
		max-width: var(--p-max-width, 65ch);
		text-wrap: pretty;
	}*/
	/* Reset links to optimize for opt-in styling instead of opt-out. */
	a {
		color: inherit;
	}

	/* Add the correct font weight in Edge and Safari. */
	b,
	strong {
		font-weight: bolder;
	}

	/* Add the correct font size in all browsers. */
	small {
		font-size: 80%;
	}

	/* Prevent `sub` and `sup` elements from affecting the line height in all browsers. */
	sub,
	sup {
		font-size: 75%;
		line-height: 0;
		position: relative;
		vertical-align: baseline;
	}

	sub {
		bottom: -0.25em;
	}

	sup {
		top: -0.5em;
	}

	/* Add the correct text decoration in Chrome, Edge, and Safari. */
	abbr:where([title]) {
		-webkit-text-decoration: underline dotted;
		text-decoration: underline dotted;
	}

	/*
	1. Use the user's configured `mono` font family by default.
	2. Correct the odd `em` font sizing in all browsers.
	*/
	code,
	kbd,
	samp,
	pre {
		font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
		font-size: 1em; /* 2 */
	}

	/*
	1. Add the correct height in Firefox.
	2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
	3. Ensure horizontal rules are visible by default.
	*/
	hr {
		height: 0; /* 1 */
		color: inherit; /* 2 */
		border-top-width: 1px; /* 3 */
	}

	/* ---------------------------------- */
	/* 5. Listas                          */
	/* ---------------------------------- */
	ol,
	ul,
	menu {
		list-style: none;
	}

	li {
		text-wrap-mode: wrap;
		overflow-wrap: break-word;
	}

	/* Add the correct display in Chrome and Safari. */
	summary {
		display: list-item;
	}

	/* ---------------------------------- */
	/* 6. Tablas                          */
	/* ---------------------------------- */
	/*
	1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
	2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
	3. Remove gaps between table borders by default.
	*/
	table {
		text-indent: 0; /* 1 */
		border-color: inherit; /* 2 */
		border-collapse: collapse; /* 3 */
	}

	/* ---------------------------------- */
	/* 7. Contenido embebido              */
	/* ---------------------------------- */
	/*
	1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
	2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
	   This can trigger a poorly considered lint error in some tools but is included by design.
	3. Constrain images and videos to the parent width. (https://github.com/mozdevs/cssremedy/issues/14)
	*/
	img,
	svg,
	video,
	canvas,
	audio,
	iframe,
	embed,
	object {
		display: block; /* 1 */
		vertical-align: middle; /* 2 */
		max-width: 100%; /* 3 */
	}

	/* Preserve the intrinsic aspect ratio. */
	img,
	video {
		height: auto;
	}

	img {
		font-style: italic;
		background-repeat: no-repeat;
		background-size: cover;
		shape-margin: 0.75rem;
	}

	/* ---------------------------------- */
	/* 8. Formularios y botones           */
	/* ---------------------------------- */
	/*
	1. Change the font styles in all browsers.
	2. Remove the margin in Firefox and Safari.
	3. Remove default padding in all browsers.
	*/
	button,
	input,
	optgroup,
	select,
	textarea {
		font-family: inherit; /* 1 */
		font-size: 100%; /* 1 */
		font-weight: inherit; /* 1 */
		line-height: inherit; /* 1 */
		color: inherit; /* 1 */
		margin: 0; /* 2 */
		padding: 0; /* 3 */
	}

	input,
	optgroup,
	select,
	textarea {
		color: var(--nrh-text);
	}

	/* Prevent resizing textareas horizontally by default. */
	textarea {
		resize: vertical;
	}

	/*
	1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
	2. Set the default placeholder color to the user's configured gray 400 color.
	*/
	input::-moz-placeholder,
	textarea::-moz-placeholder {
		opacity: 1; /* 1 */
		color: #98A2B3; /* 2 */
	}

	input::placeholder,
	textarea::placeholder {
		opacity: 1; /* 1 */
		color: #98A2B3; /* 2 */
	}

	/*
	1. Correct the odd appearance in Chrome and Safari.
	2. Correct the outline style in Safari.
	*/
	[type='search'] {
		-webkit-appearance: textfield; /* 1 */
		outline-offset: -2px; /* 2 */
	}

	/* Remove the inner padding in Chrome and Safari on macOS. */
	::-webkit-search-decoration {
		-webkit-appearance: none;
	}

	/* Correct the cursor style of increment and decrement buttons in Safari. */
	::-webkit-inner-spin-button,
	::-webkit-outer-spin-button {
		height: auto;
	}

	/*
	1. Correct the inability to style clickable types in iOS and Safari.
	2. Change font properties to `inherit` in Safari.
	*/
	::-webkit-file-upload-button {
		-webkit-appearance: button; /* 1 */
		font: inherit; /* 2 */
	}

	/* Remove the inheritance of text transform in Edge and Firefox. */
	button,
	select {
		text-transform: none;
	}

	/*
	1. Correct the inability to style clickable types in iOS and Safari.
	2. Remove default button styles.
	*/
	button,
	[type='button'],
	[type='reset'],
	[type='submit'] {
		-webkit-appearance: button; /* 1 */
		background-image: none; /* 2 */
	}

	/* Set the default cursor for buttons. */
	button,
	[role="button"] {
		cursor: pointer;
	}

	button {
		border-radius: 0.375rem;
		border-width: 2px;
		padding: 0.5rem 1rem;
		background-color: var(--nrh-green-dark);
		color: #fff;
		transition: transform 0.2s ease;
	}

	button[disabled="disabled"] {
		opacity: 0.5;
	}

	button:active {
		animation: zoomInOut 1s ease;
	}

	button[type='submit']:active:not(:disabled) {
		transform: scale(0.9);
	}

	/* ---------------------------------- */
	/* 9. Elementos interactivos y estado */
	/* ---------------------------------- */
	/* Use the modern Firefox focus style for all focusable elements. */
	:-moz-focusring {
		outline: auto;
	}

	/* Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) */
	:-moz-ui-invalid {
		box-shadow: none;
	}

	/* Make sure disabled elements don't get the pointer cursor. */
	:disabled {
		cursor: default;
	}

	h1:focus {
		outline: none;
	}

	/* Add the correct vertical alignment in Chrome and Firefox. */
	progress {
		vertical-align: baseline;
	}

	/* Make elements with the HTML hidden attribute stay hidden by default */
	[hidden] {
		display: none;
	}

	/* ---------------------------------- */
	/* 10. Scrollbar                      */
	/* ---------------------------------- */
	::-webkit-scrollbar {
		width: 10px;
		height: 10px;
	}

	::-webkit-scrollbar-thumb {
		background: #cfdbd5;
		border-radius: 8px;
		border: 2px solid transparent;
		background-clip: padding-box;
	}

	/* ---------------------------------- */
	/* 11. Animaciones                    */
	/* ---------------------------------- */
	@keyframes zoomInOut {
		0% {
			transform: scale(.9);
		}

		25% {
			transform: scale(.8);
		}

		50% {
			transform: scale(.7);
		}

		75% {
			transform: scale(.9);
		}

		100% {
			transform: scale(1);
		}
	}

	/* ---------------------------------- */
	/* 12. Clases del framework Blazor    */
	/* ---------------------------------- */
	.valid.modified:not([type=checkbox]) {
		outline: 1px solid #26b050;
	}

	.invalid {
		outline: 1px solid #e50190;
	}

	.validation-message {
		color: #e50190;
	}

	.blazor-error-boundary {
		background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwL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