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

html {
	font-size: $font_size_base;
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	-ms-overflow-style: scrollbar;
	-webkit-tap-highlight-color: transparent;
	overflow-x: hidden;
}

@-ms-viewport {
	width: device-width;
}

article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
	display: block;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-family: var(--g5-body-font);
	font-weight: var(--g5-body-font-weight);
	font-size: var(--g5-body-font-size);
	line-height: var(--g5-body-line-height);
	color: var(--g5-color-text-main);
	text-transform: var(--g5-body-text-transform);
	letter-spacing: var(--g5-body-letter-spacing);
	background-color: $color_background_body;
	font-style: var(--g5-body-font-style);
	text-rendering: optimizeLegibility;
	text-align: left;
	overflow-x: hidden;
}


[tabindex="-1"]:focus {
	outline: 0 !important;
}

hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
	margin-top: $margin_element;
	margin-bottom: $margin_element;
	border: 0;
	border-top: solid 1px;
	border-color: var(--g5-color-border);
}


h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	margin-top: 0;
	margin-bottom: $margin_element/2;
	clear: both;
}

h1 {
	@include h1();
}

h2{
	@include h2();
}

h3  {
	@include h3();
}


h4 {
	@include h4();
}

h5{
	@include h5();
}

h6{
	@include h6();
}

p {
	margin-top: 0;
	margin-bottom: $margin_element;
}

abbr[title],
abbr[data-original-title] {
	text-decoration: underline;
	-webkit-text-decoration: underline dotted;
	text-decoration: underline dotted;
	cursor: help;
	border-bottom: 0;
}

address {
	margin-bottom: $margin_element;
	font-style: normal;
	line-height: inherit;
}

ol ol,
ol ul,
ul ol,
ul ul,
ol,
ul,
dl {
	margin-top: 0;
	margin-bottom: $margin_element;
}

li > ol,
li > ul,
li > ul,
li > ol {
	margin-bottom: 0;
}

dt {
	font-weight: 700;
}

dd {
	margin-bottom: .5rem;
	margin-left: 0;
}

blockquote {
	position: relative;
	color: var(--g5-color-heading);
	margin-bottom: $margin_element;
	border-left: 4px solid;
	border-color: var(--g5-color-accent);
	padding: 5px 0 5px 20px;

	p {
		font-size: 16px;
		font-weight: 500;
		margin-bottom: 0;
		line-height: 2;
	}

	a {
		color: inherit;
	}

	cite {
		font-size: 12px;
	}
}

dfn {
	font-style: italic;
}

b,
strong {
	font-weight: bolder;
}

small {
	font-size: 80%;
}

sub,
sup {
	position: relative;
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
}

sub {
	bottom: -.25em;
}

sup {
	top: -.5em;
}

a {
	color: $color_link;
	text-decoration: none;
	background-color: transparent;
	-webkit-text-decoration-skip: objects;
}

a:hover {
	color: $color_link_hover;
	text-decoration: none;
}

a:not([href]):not([tabindex]) {
	color: inherit;
	text-decoration: none;
}

a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
	color: inherit;
	text-decoration: none;
}

a:not([href]):not([tabindex]):focus {
	outline: 0;
}

a:focus {

}


a > code {
	color: inherit;
}

pre {
	font-size: 87.5%;
	margin-top: 0;
	margin-bottom: $margin_element;
	padding: 1rem;
	overflow: auto;
	-ms-overflow-style: scrollbar;
	background-color: rgba(0, 0, 0, 0.05);
	color: inherit;
}

figure {
	margin-bottom: $margin_element;
}

img {
	vertical-align: middle;
	border-style: none;
	max-width: 100%;
	height: auto;
}

svg:not(:root) {
	overflow: hidden;
}

table {
	border-collapse: collapse;
	margin-bottom: $margin_element;
	width: 100%;
	max-width: 100%;
	background-color: transparent;
}

table th,
table td {
	padding: 0.4rem;
	vertical-align: top;
	border: solid 1px;
	border-color: var(--g5-color-border);
}

table thead th {
	vertical-align: bottom;
	border: solid 2px;
	border-color: var(--g5-color-border);
}

caption {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	color: var(--g5-color-gray);
	text-align: left;
	caption-side: bottom;
}

th {
	text-align: inherit;
}

label {
	display: inline-block;
	margin-bottom: 0.5rem;
}

input,
button,
select,
optgroup,
textarea {
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

button,
input {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

button,
html [type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	padding: 0;
	border-style: none;
}


input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
	-webkit-appearance: listbox;
}

textarea {
	overflow: auto;
	resize: vertical;
}

fieldset {
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
}

legend {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin-bottom: .5rem;
	font-size: 1.5rem;
	line-height: inherit;
	color: inherit;
	white-space: normal;
}

progress {
	vertical-align: baseline;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

[type="search"] {
	outline-offset: -2px;
	-webkit-appearance: none;
}

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	font: inherit;
	-webkit-appearance: button;
}

output {
	display: inline-block;
}

summary {
	display: list-item;
	cursor: pointer;
}

template {
	display: none;
}

[hidden] {
	display: none !important;
}

@include selection() {
	background-color: var(--g5-color-accent);
	color: var(--g5-color-accent-foreground);
}


big {
	font-size: 125%;
}

/* Form style */
form {

}

.form-control,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select{
	height: $height__input;
	line-height: $height__input - 2px;
	border: 1px solid $color_border_input;
	padding: 0 20px;
	max-width: 100%;
	background-color: $color_background_input;
	font-weight: 500;
	@include border-radius(0.25rem);

	&:focus {
		outline: none;
		border-color: var(--g5-color-accent);
	}
}

.form-group textarea {
	border-color: $color_border_input;
	@include input-placeholder() {
		color: $color_placeholder;
	}
}

.form-control {
	font-size: inherit;
	color: inherit;
}

.form-control:focus {
	@include box-shadow(none);
}

textarea,
select,
input[type] {
	@include input-placeholder() {
		color: $color_placeholder;
	}
}

textarea.form-control,
textarea {
	height: auto;
	line-height: $font_line_height_body;
	padding-top: 10px;
}
