// -----------------------------------------------------------------------------
// $Typography reset
// -----------------------------------------------------------------------------
@mixin evolvethemes_typography_reset() {
	// Remove top margins from headings
	// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
	// margin for easier control within type scales as it avoids margin collapsing.
	h1, h2, h3, h4, h5, h6 {
		margin-top: 0;
	}

	// Reset margins on paragraphs
	//
	// Similarly, the top margin on `<p>`s get reset.
	p {
		margin-top: 0;
	}

	// Abbreviations
	//
	// 1. Remove the bottom border in Firefox 39-.
	// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
	// 3. Add explicit cursor to indicate changed behavior.
	// 4. Duplicate behavior to the data-* attribute for our tooltip plugin

	abbr[title],
	abbr[data-original-title] { // 4
		text-decoration: underline; // 2
		text-decoration: underline dotted; // 2
		cursor: help; // 3
		border-bottom: 0; // 1
	}

	address {
		font-style: normal;
		line-height: inherit;
	}

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

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

	dd {
		margin-left: 0; // Undo browser default
	}

	blockquote {
		margin: 0;
	}

	dfn {
		font-style: italic; // Add the correct font style in Android 4.3-
	}

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

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

	//
	// Prevent `sub` and `sup` elements from affecting the line height in
	// all browsers.
	//

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

	sub { bottom: -.25em; }
	sup { top: -.5em; }

// -----------------------------------------------------------------------------
// $Links

	a {
		background-color: transparent; // Remove the gray background on active links in IE 10.
		-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
	}

	// And undo these styles for placeholder links/named anchors (without href)
	// which have not been made explicitly keyboard-focusable (without tabindex).
	// It would be more straightforward to just use a[href] in previous block, but that
	// causes specificity issues in many other styles that are too complex to fix.
	// See https://github.com/twbs/bootstrap/issues/19402

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

		&:hover,
		&:focus {
			// color: inherit;
			text-decoration: none;
		}

		&:focus {
			outline: 0;
		}
	}

// -----------------------------------------------------------------------------
// $Code

	pre,
	code,
	kbd,
	samp {
		font-family: monospace, monospace;
		font-size: 1em; // Correct the odd `em` font sizing in all browsers.
	}

	pre {
		// Remove browser default top margin
		margin-top: 0;
		// Don't allow content to break outside
		overflow: auto;
		// We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
		// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
		-ms-overflow-style: scrollbar;
	}

// -----------------------------------------------------------------------------
// $Tables

	table {
		border-collapse: collapse; // Prevent double borders
	}

	caption {
		text-align: left;
		// caption-side: bottom;
	}

	th {
		// Matches default `<td>` alignment by inheriting from the `<body>`, or the
		// closest parent with a set `text-align`.
		text-align: inherit;
	}
}

// -----------------------------------------------------------------------------
// $Typography spacing
// -----------------------------------------------------------------------------
@mixin evolvethemes_typography_spacing( $lh : 1rem ) {
	h1, h2, h3, h4, h5, h6 {
		margin-top: $lh*2;
		margin-bottom: $lh*1.5;

		&:first-child {
			margin-top: 0;
		}
	}

	p,
	ol,	ul,	dd,	dl,
	pre,
	address,
	label,
	table {
		margin-bottom: $lh;

		// &:last-child {
		// 	margin-bottom: 0;
		// }
	}
}

// -----------------------------------------------------------------------------
// $Font mixin
// -----------------------------------------------------------------------------
@mixin evolvethemes-font( $type ) {
	@each $t, $v in $font-sizes {
		@if map-has-key( $font-sizes, $type ) {
			@if $t == $type {
				@each $prop, $val in $v {
					@if str-slice( $prop, 1, 1 ) != '_' {
						#{$prop}: $val;
					}
				}
			}
		}
	}
}
