@import 'bourbon';

// Susy
// Susy grid system. See: http://susydocs.oddbird.net/en/latest/
@import '../../../node_modules/susy/sass/susy';

// Utilities
// Sass tools and helpers used across the project.
@import '../sass/utils/variables';
@import '../sass/utils/mixins';
@import '../sass/vendors/font-awesome/font-awesome';
@import '../sass/vendors/modular-scale';

.site-search {
	.widget_product_search {
		form {
			input[type=search],
			input[type=text] {
				padding-left: ms(5);
			}
		}
	}
}

#comments {
	.commentlist {
		.bypostauthor {
			> .comment-body cite {
				&::after {
					@include fa-icon();
					margin-left: ms(-3);
					content: '\f0f6';
				}
			}
		}

		.reply {
			a {
				&::after {
					@include fa-icon();
					content: '\f112';
					margin-left: ms(-3);
				}

				&.comment-edit-link {
					&::after {
						content: '\f040';
					}
				}
			}
		}
	}
}

#respond {
	#cancel-comment-reply-link {
		&::before {
			@include fa-icon();
			content: '\f057';
			display: block;
		}
	}
}

.sticky {
	.entry-title {
		&::before {
			@include fa-icon();
			margin-right: ms(-3);
			content: '\f08d';
		}
	}
}

button,
input[type='button'],
input[type='reset'],
input[type='submit'],
.button,
.added_to_cart {
	&.loading {
		position: relative;

		&::after {
			@include fa-icon();
			content: '\f110';
			animation: fa-spin 0.75s linear infinite;
			height: 20px;
			width: 20px;
			line-height: 20px;
			font-size: 20px;
			position: absolute;
			top: 50%;
			left: 50%;
			margin-left: -10px;
			margin-top: -10px;
		}
	}
}

.main-navigtion {
	ul {
		li {
			a {
				&::before {
					@include fa-icon();
					content: '\f0f6';
					margin-right: ms(-3);
				}
			}
		}
	}
}

.site-main {
	nav.navigation {
		.nav-previous {
			a {
				&::before {
					@include fa-icon();
					content: '\f177';
					margin-right: ms(-3);
				}
			}
		}

		.nav-next {
			a {
				&::after {
					@include fa-icon();
					content: '\f178';
					margin-left: ms(-3);
				}
			}
		}
	}
}

.widget_search,
.widget_product_search {
	form {
		&::before {
			@include fa-icon();
			content: '\f002';
			position: absolute;
			top: 1em;
			left: 1em;
		}

		input[type=text],
		input[type=search] {
			padding-left: ms(5);
		}
	}
}

.stock {
	&::before {
		@include fa-icon();
		margin-right: ms(-3);
	}

	&.in-stock {
		&::before {
			content: '\f118';
		}
	}

	&.out-of-stock {
		&::before {
			content: '\f119';
		}
	}
}

a.reset_variations {
	&::before {
		@include fa-icon();
		content: '\f021';
		margin-right: ms(-3);
	}
}


.widget_recent_entries,
.widget_pages,
.widget_categories,
.widget_archive,
.widget_recent_comments,
.widget_nav_menu,
.widget_links,
.widget_product_categories,
.widget_layered_nav,
.widget_layered_nav_filters {
	ul {
		margin: 0;

		li {
			padding-left: ms(3);

			&::before {
				font-family: 'FontAwesome';
				margin-right: ms(-3);
				display: block;
				float: left;
				opacity: 0.35;
				margin-left: - ms(3);
				width: 1em;
			}
		}
	}
}

.widget_layered_nav {
	li {
		&::before {
			content: '\f0c8';
		}
	}

	.chosen {
		&::before {
			content: '\f14a';
		}
	}
}

.widget_layered_nav_filters {
	ul {
		li {
			&.chosen {
				&::before {
					content: '\f00d';
					color: $error;
					opacity: 1;
				}
			}
		}
	}
}

.widget_recent_entries,
.widget_pages {
	ul {
		li {
			&::before {
				content: '\f0f6';
			}
		}
	}
}

.widget_categories {
	ul {
		li {
			&::before {
				content: '\f114';
			}

			&.current-cat {
				&::before {
					content: '\f115';
				}
			}
		}
	}
}

.widget_archive {
	ul {
		li {
			&::before {
				content: '\f115';
			}
		}
	}
}

.widget_recent_comments {
	ul {
		li {
			&::before {
				content: '\f0e5';
			}
		}
	}
}

.widget_nav_menu {
	ul {
		li {
			&::before {
				content: '\f0f6';
			}
		}
	}
}

.widget_links {
	ul {
		li {
			&::before {
				content: '\f08e';
			}
		}
	}
}

@include susy-media($desktop) {
	.main-navigation {
		ul.menu,
		ul.nav-menu {
			> li {
				&.menu-item-has-children,
				&.page_item_has_children {
					> a {
						&::after {
							// The dropdown indicator
							@include fa-icon();
							content: '\f107';
							margin-left: 1em;
						}
					}
				}
			}
		}
	}

	.main-navigation {
		ul.menu,
		ul.nav-menu {
			ul {
				li {
					&.menu-item-has-children,
					&.page_item_has_children {
						> a {
							&::after {
								// The dropdown indicator
								@include fa-icon();
								content: '\f105';
								float: right;
								line-height: 1.618;
							}
						}
					}
				}
			}
		}
	}
}
