
html
{
	
	--document-font: serif;
	--code-font: monospace;
	--font-size: 1rem;
	--indent: 0;

	--bg-color: white;
	--text-color: black;
	--text-color-secondary: white;
	--h1-color: #62a0ea;
	--h2-color: #57e389;
	--h3-color: #c061cb;
	--h4-color: #ffa348;
	--h5-color: #ed333b;
	--h6-color: #b5835a;
	--code-bg: #C9DFFC;
	--comment-color: #77767b;
}

body
{
	margin: 0;
	padding: 0;
	border: 0;

	line-height: 1.8em;
	overflow-wrap: break-word;
	font-family: system-ui;
	color: var(--text-color);
	background-color: var(--bg-color);
}

dialog::backdrop
{
	background-color: #C9DFFC;
}

dialog
{
	border: 0;
	background-color: white;
	border-radius: 0.5rem;
	text-align: center;
}

#dropzone
{
	width: 20rem;
	height: 10rem;
	line-height: 10rem;
	text-align: center;
	border: 2px solid #57e389;
	border-radius: 0.5rem;
}

#dropzone i
{
	pointer-events: none;
}

.drag
{
	background-color: #57e389;
}

header
{
	background-color: #f0f0f0;
	display: flex;
	justify-content: center;

	/* Para que los temas no afecten al header, se pone aquí el tema por defecto*/
	--bg-color: white;
	--text-color: black;
	--h1-color: #62a0ea;
	--h2-color: #57e389;
	--h3-color: #c061cb;
	--h4-color: #ffa348;
	--h5-color: #ed333b;
	--h6-color: #b5835a;
	--code-bg: #C9DFFC;
	--comment-color: #77767b;
}

header .header
{
	max-width: 80ch;
	width: 100%;
}

header .header-btn
{
	display: block-inline;
	width: 100%;
	text-align: right;
}

header button
{
	background-color: transparent;
	border: 0;
	margin-top: 0.2rem;
	padding: 0;
}

header button:hover,
header button:active,
header .header-menu-font button:hover,
header .header-menu-font button:active
{
	background-color: #deddda;
	cursor: pointer;
}

header button img
{
	width: 2rem;
}

header .header-menu-font,
#settingsMenu,
#documentSettingsMenu,
#colorthemeMenu
{
	padding: 1rem 0;
}

.fontlist button
{
	background-color: transparent;
	border: 0;
	padding: 0.2rem;
	width: 100%;
	text-align: left;
}

.grid
{
	display: grid;
	grid-template-columns: 50% 50%;
	grid-template-rows: auto;
}

.grid > div
{
	margin: 0.2rem;
	padding: 0.2rem;
}

.bigSquareButton
{
	margin: 1ch;
	padding: 1ch;
}

.bigSquareButton img
{
	height: 4rem;
	max-width: 4rem;
	min-width: 4rem;
}

input[type="Number"]
{
	width: 6ch;
	text-align: right;
}

input[type="radio"]:hover
{
	cursor: pointer;
}

.viewer
{
	width: 100%;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--document-font);
	font-size: var(--font-size);
	line-height: calc(var(--font-size) * 1.8);
	padding-bottom: 5rem;
}

.limit-width /*Para que el viewer no ocupe toda la pantalla horizontalmente, quitar esta clase para imprimir*/
{
	max-width: 80ch;
}

.titleContainer
{
	break-inside: avoid;
	page-break-inside: avoid;
}

.viewer p
{
	text-indent: var(--indent);
}

.codeblock
{
	background-color: var(--code-bg);
	font-family: var(--code-font);
	padding: 0.5rem;
	border-radius: 0.5rem;
	font-size: calc(var(--font-size) * 1.1);
	text-indent: 0 !important;
}

.minicodeblock
{
	font-family: var(--code-font);
	font-size: calc(var(--font-size) * 1.1);
	background-color: var(--code-bg);
	padding: 0.2em;
	margin: 0.2em;
}

.imgContainer
{
	text-align: center;
	margin: 1rem 0 1rem 0;
}

img
{
	max-width: 80%;
	min-width: 50%;
}

.imgFootnote
{
	font-style: italic;
	color: var(--comment-color);
}

p
{
	color: var(--text-color);
}

/*
Algunos estilos de los títulos se definen aparte del viewer porque se usan para algunos menús,
y hay algunas propiedades que no queremos que se apliquen a los títulos en los menús,
como pueden ser algunas de las configuraciones
*/
h1
{
	text-decoration: underline;
	text-decoration-color: var(--h1-color);
	text-align: center;
	margin-top: 1.2em;
	color: var(--text-color);
}

h2
{
	text-decoration: underline;
	text-decoration-color: var(--h2-color);
	color: var(--text-color);
}

h3
{
	text-decoration: underline;
	text-decoration-color: var(--h3-color);
	color: var(--text-color);
}

h4
{
	text-decoration: underline;
	text-decoration-color: var(--h4-color);
	color: var(--text-color);
}

h5
{
	text-decoration: underline;
	text-decoration-color: var(--h5-color);
	color: var(--text-color);
}

h6
{
	text-decoration: underline;
	text-decoration-color: var(--h6-color);
	color: var(--text-color);
}

.viewer h1
{
	font-size: calc(var(--font-size) * 2);
	line-height: calc(1em * 1.8);
}

.viewer h2
{
	font-size: calc(var(--font-size) * 1.5);
	line-height: calc(1em * 1.8);
}

.viewer h3
{
	font-size: calc(var(--font-size) * 1.17);
	line-height: calc(1em * 1.8);
}

.viewer h4
{
	font-size: var(--font-size);
	line-height: calc(1em * 1.8);
}

.viewer h5
{
	font-size: calc(var(--font-size) * 0.83);
	line-height: calc(1em * 1.8);
}

.viewer h6
{
	font-size: calc(var(--font-size) * 0.67);
	line-height: calc(1em * 1.8);
}

a
{
	color: var(--h1-color);
	text-decoration: underline;
	font-weight: bold;
}

li
{
	margin: 1em;
}

.comment-container
{
	border: 0;
	border-left: 0.2em solid var(--h1-color);
	padding-left: 0.5em;
}

.comment-container p
{
	color: var(--comment-color);
}

label
{
	color: var(--text-color);
}

.align-center
{
	text-align: center !important;
}

.align-right
{
	text-align: right !important;
}

.underline
{
	text-decoration: underline;
}

.tableContainer
{
	width: 100%;
	overflow-x: auto;
}

table
{
	background-color: var(--code-bg);
}

thead td
{
	background-color: var(--h1-color);
	color: var(--text-color-secondary);
	font-weight: bold;
	border-radius: 0.5rem;
	padding: 0.2rem 0.4rem;
}

tbody td
{
	border-bottom: 1px solid var(--h1-color);
	padding: 0.2rem 0.4rem;
}
