/*
	WET-BOEW
	@title: Bootstrap overrides for WET-BOEW - Components
 */

/*! Placeholders */
%glyphicon-inline-icons {
	content: " ";
	font-family: "Glyphicons Halflings";
	font-weight: 400;
	line-height: 1em;
	position: relative;
	top: .1em;
}

%pagination-left-arrow {
	@extend %glyphicon-inline-icons;
	content: "\e091";
	margin-right: .5em;
}

%pagination-right-arrow {
	@extend %glyphicon-inline-icons;
	content: "\e092";
	margin-left: .5em;
}

/*
 * btn-xs should be equal to btn-sm in >v4.0.*
*/
.btn-group-xs .btn,
.btn.btn-xs {
	min-height: 0;
}

.dropdown-menu {
	> {
		li {
			> {
				a {
					&:visited {
						color: $dropdown-link-color;
					}
				}
			}
		}
	}
}

.nav {
	> {
		li {
			> {
				a {
					&:visited {
						color: $link-color;
					}
				}
			}
		}
	}

	a {
		@extend %no-decoration;
	}
}

.nav-pills {
	> {
		li {
			&.active {
				> {
					a {
						&:visited {
							color: $nav-pills-active-link-hover-color;
						}
					}
				}
			}
		}
	}
}

.navbar-default {
	.navbar-nav {
		> {
			li {
				> {
					a {
						&:visited {
							color: $navbar-default-link-color;
						}
					}
				}
			}
		}
	}

	@media (max-width: $grid-float-breakpoint-max) {
		.open {
			.dropdown-menu {
				> {
					li {
						> {
							a {
								color: $navbar-default-link-color;
							}
						}
					}
				}
			}
		}
	}

	.navbar-link {
		&:visited {
			color: $navbar-default-link-color;
		}
	}
}

.navbar-inverse {
	.navbar-nav {
		> {
			li {
				> {
					a {
						&:visited {
							color: $navbar-inverse-link-color;
						}
					}
				}
			}
		}
	}

	@media (max-width: $grid-float-breakpoint-max) {
		.open {
			.dropdown-menu {
				> {
					li {
						> {
							a {
								&:visited {
									color: $navbar-inverse-link-color;
								}
							}
						}
					}
				}
			}
		}
	}

	.navbar-link {
		&:visited {
			color: $navbar-inverse-link-color;
		}
	}
}


/*
 *  Pagination
 *    * Add left/right arrows to previous/next buttons
 *    * Increase size of the pagination buttons
 *    * Prevent contrast ratio issues on active placeholder links
 */

.pagination,
.pager {
	&.disabled {
		@extend %global-display-none;
	}

	> li {
		> {
			a {
				cursor: pointer;
				display: inline-block;
				margin-bottom: .5em;
				padding: $padding-large-vertical $padding-large-horizontal;
			}
		}

		&:first-child {
			[rel="prev"] {
				&:before {
					@extend %pagination-left-arrow;
				}
			}
		}

		&:last-child {
			[rel="next"] {
				&:after {
					@extend %pagination-right-arrow;
				}
			}
		}

		&.active {
			> {
				a {
					cursor: default;
				}
			}
		}

		&.disabled {
			@extend %global-display-none;

			+ {
				li {
					> {
						a {
							@include border-left-radius($border-radius-base);
						}
					}
				}
			}
		}
	}
}

.pager {
	> {
		li {
			> {
				a {
					text-decoration: none;
				}

				a,
				span {
					&:hover,
					&:focus {
						border-color: $pagination-hover-border;
						color: $pagination-hover-color;
					}
				}
			}
		}
	}
}

.pagination {
	> {
		.active {
			color: $pagination-active-color;
		}
	}
}

/*
 *  Right-to-left support
 */
[dir=rtl] {

	.pagination,
	.pager {
		[rel="prev"] {
			@include border-left-radius(0);
			@include border-right-radius($border-radius-base);

			&:after {
				@extend %pagination-right-arrow;
			}

			&:before {
				@extend %global-display-none;
			}
		}

		[rel="next"] {
			@include border-left-radius($border-radius-base);
			@include border-right-radius(0);

			&:after {
				@extend %global-display-none;
			}

			&:before {
				@extend %pagination-left-arrow;
			}
		}

		> li {
			float: right;

			&.disabled {
				+ {
					li {
						> {
							a {
								@include border-left-radius(0);
								@include border-right-radius($border-radius-base);
							}
						}
					}
				}
			}
		}
	}
}
