/*
Theme Name: Websavers Theme
Version: 2.3.2
Description: Custom theme for Websavers builds
Author: Websavers Inc.
Author URI: https://websavers.ca
template: bb-theme

Changelog
v2.3.3: Modify includes/archive-header.php to always show tag/category description when available (and CSS to match)
v2.3.2: Restructure custom functions and move ws credit link to copyright.php
v2.3.1: Add includes/copyright.php override from BB theme, setting *only* copyright text.
v2.3.0: Set colours in theme Customizer UI now to have them sync with BB plugin and theme
v2.2.0: Improve default WordPress gallery styles and add custom JS file to theme dir
v2.1.3: Add CSS to better support Impress Listings (realtor) plugin
v2.1.2: Repair colour sync -- it works now.
v2.1.1: Minor WPForms PowerPack tweaks to box sizing/padding
v2.1.0: Add colour sync. Set colours in functions.php to be shown in pallettes everywhere
v2.0.1: Repair yoast filter code to actually remove woocomm pages from sitemap
v2.0: Add Yoast filter to remove checkout/cart/my-account pages from sitemap XML
v1.9: Add '.cta' class which we can use on farthest right menu item to style it differently.
v1.8: Unload FontAwesome4 -- we will only be using v5 from now on
v1.7: Better selector for PayPal radio button, restore button sizing for woocommerce checkout
v1.6: Add fixes for WP Forms select field visibility
v1.5: Add custom font code
v1.4: Remove replacements for old social icons as BB has switched to FA for them
v1.3: Added replacements for old social icons
v1.2: Remove certain button overrides to allow customization in BB plugin
*/

/**
 * Define Custom Fonts
 */
/*
@font-face {
  font-family: 'Avenir';
  src: url('/wp-content/themes/ws-theme/font/avenir.otf');
	src: url('/wp-content/themes/ws-theme/font/avenir.woff');
}
*/
/**
 * Mobile Nav Fixes 
 */
.fl-page-nav-toggle-button.fl-page-nav-toggle-visible-mobile .fl-page-nav-collapse{
	padding-bottom: 0 !important; /* Smooth open/close animation */
}
.fl-page-nav-collapse ul.navbar-nav > li:last-child{
	border-bottom: none !important;
}

/**
 * Button Overrides
 */
input,textarea{ border-radius: 0 !important; }
input[type=submit], input[type=submit].button, input[type=button], button, .btn,
.woocommerce .woocommerce-message a.button, .woocommerce .woocommerce-info a.button, .woocommerce .woocommerce-error a.button, .woocommerce-page .woocommerce-message a.button, .woocommerce-page .woocommerce-info a.button, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #review_form #respond .form-submit input{
    border-radius: 0;
    border-color: transparent;
/*    color: white; */
    transition: color 0.3s, background-color 0.3s, opacity 0.3s !important;
}

input[type=submit]:hover, input[type=submit].button:hover, input[type=button]:hover, button:hover, .fl-button:hover,
.woocommerce .woocommerce-message a.button:hover, .woocommerce .woocommerce-info a.button:hover, .woocommerce .woocommerce-error a.button:hover, .woocommerce-page .woocommerce-message a.button:hover, .woocommerce-page .woocommerce-info a.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce #review_form #respond .form-submit input:hover{
    border-color: transparent;
}

.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce-page button.button.alt:hover{ background-color: #c3c3c3; }

.fl-button.fl-button-icon-animation:hover i.fl-button-icon-after{
    margin-right: 1em;
}

/** Contact Form button and recaptcha more app-like on mobile **/
@media screen and (min-width: 600px){
	.fl-recaptcha{ float:left; }
	.fl-recaptcha + .fl-button-width-auto.fl-button-right{ float:right; }
}

@media screen and (max-width: 599px){
	.fl-recaptcha .g-recaptcha div{ margin: auto; }
	.fl-recaptcha + .fl-button-width-auto{ text-align:center; }
	.fl-recaptcha + .fl-button-width-auto a{ width: 100% }
}

/**
* Archive Category/Tag Title Overrides to Handle Display of Descriptions
*/
.fl-archive .fl-archive-header h1.fl-archive-title{
	margin-bottom: 5px;
	border-bottom-style: dashed;
}
.fl-archive .fl-archive-header h1.fl-archive-title + .fl-archive-description{
	margin-bottom: 30px;
	padding-bottom: 5px;
	border-bottom: 1px dashed #e6e6e6;
}
.fl-archive .fl-archive-header h1.fl-archive-title + .fl-archive-description p:last-child{
	margin-bottom: 0;
}

/** 
 * Remove 'separator' borders from columns when on mobile. They don't work here.
 */
@media screen and (max-width: 768px){
	.fl-builder-content .fl-col + .fl-col > .fl-col-content{
		border: none;
	}
}

/**
 * WP Forms PowerPack Module Overrides
 */
 
/* Select field Fixes */
.pp-wpforms-content div.wpforms-container-full .wpforms-form select{
    padding: 0 7px !important;
}
/* Box Padding */
@media screen and (max-width: 450px){
	.pp-wpforms-content{
		padding: 10px 15px !important;
	}
}

/**
 * WordPress Galleries: [gallery]
 */
.gallery .gallery-item{
	margin: 5px 0 !important;
	padding: 0 5px !important;
}
.gallery .gallery-item img{
	border: none !important;
}
@media screen and (max-width: 450px){
	.gallery .gallery-item{
		float: none !important;
		width: 100% !important;
	}
}
/* Gallery lightbox tweaks */
.mfp-iframe-holder .mfp-close, .mfp-image-holder .mfp-close{
	right: 6px;
}

/**
 * Impress Listings Overrides
 */

.single-listing .fl-sidebar-right,
.post-type-archive-listing .fl-sidebar-right{
	display:none;
}
.listing .label{ 
	color: black;
}

.wplistings-single-listing td{
	border-top: none; 
	font-size: inherit;
	line-height: 1.5;
}
.listing td.label{ /** Override bootstrap .label styles **/
	display:block;
	text-align:left;
	padding-right: 10px;
	border-radius: 0;
	line-height: 1.5;
	font-size: inherit;
}

.fl-sidebar .listing + .listing{
	margin-top: 45px;
}
.fl-sidebar .listing .more-link{
	padding: 5px 15px 6px;
	text-transform: uppercase;
}

#listing-contact .g-recaptcha{ 
 margin-bottom: 15px; 
}

@media screen and (max-width: 400px){
	#listing-agent, #listing-contact{
		padding: 16px; /* ensures recaptcha isn't offscreen on mobile */
	}
}
/* Hide in widget if title = address */
/*.listing-widget-details p.listing-address{ display:none; }*/

/**
 * WooCommerce Overrides
 */
 
/* Cart Remove Buttons: Fixes non-centred "x" spacing issues */
.woocommerce-cart a.remove{
	height: 1.1em;
	width: 1.14em;
}

/* Cart Proceed Button spacing issues */
.woocommerce-cart .wc-proceed-to-checkout a.button.alt{
	padding-top: 1em;
	padding-bottom: 1em;
}
 
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error, .woocommerce-page .woocommerce-message, .woocommerce-page .woocommerce-info, .woocommerce-page .woocommerce-error{
    font-weight: normal;
}

/** Full Width Order Button **/
.woocommerce #payment #place_order, .woocommerce-page #payment #place_order{
    width: 100%;
    font-size: 1.5em;
    padding: 0.8em;
    height: auto;
    text-transform: uppercase;
}

.woocommerce form .form-row select{ display: inline; }

.woocommerce-checkout .select2-container .select2-selection{
  height: 31px;
}
.woocommerce-checkout #payment div.payment_box:before{
	border: 1em solid #f7f7f7;
	border-right-color: transparent;
	border-left-color: transparent;
	border-top-color: transparent;
}

.woocommerce table.cart td.actions .coupon .input-text, .woocommerce-page table.cart td.actions .coupon .input-text{ height: 30px; }

.woocommerce table.shop_table, .woocommerce-page table.shop_table,
.woocommerce #order_review, .woocommerce-page #order_review,
.woocommerce #payment, .woocommerce-page #payment{
	background-color: transparent;
	border: none;
	padding: 0;
}

.woocommerce table.cart a.remove:hover, .woocommerce-page table.cart a.remove:hover{ background: red; }

/* PayPal Radio Button on checkout */
.woocommerce-checkout #payment ul.payment_methods li input#payment_method_paypal.input-radio{ vertical-align: top; margin-top: 15px; }
/* Fixed font size for select2 dropdowns */
.woocommerce form .form-row.woocommerce-validated .select2-container{
  font-size: 15px;
}

/* Client Area Dashboard Pages */
.woocommerce-account table.shop_table tr.order_item td.product-name > a{
	pointer-events: none;
	cursor: default;
}
.woocommerce-account table.shop_table tr.order_item td.product-name .download-url a{
	text-decoration: underline;
}

/* Select dropdowns font color. Ensures dark backgrounds, light text doesn't have a problem */
.woocommerce .woocommerce-ordering select{ color: black; }

/* Single Product: Hide Extended Description Header */
.woocommerce div.product .woocommerce-tabs .panel h2:first-child, .woocommerce-page div.product .woocommerce-tabs .panel h2:first-child{
	display:none;
}

/*===================================*/

/**
 * Nav CTA Class which can be applied to any menu entry: .cta
 */
@media screen and (min-width: 795px){
	ul.navbar-nav{ width: 95%; } /* Accommodates for search icon */
	li.menu-item.cta{
		display: block;
		border-radius: 5px;
		background-color: #fff;
		margin: 0.5em;
		float:right;
		transition: background-color 0.3s;
	}

	li.menu-item.cta a{
		padding: 7px 10px 4px;
		line-height: 1;
		color: #000;
		transition: color 0.3s;
	}
	li.current-menu-item.cta>a{ color: #000 !important; }
	/* Fixed Header Tweaks */
	.fl-page-header-fixed li.menu-item.cta{ margin: 0.3em 0.1em; }
	.fl-page-header-fixed li.menu-item.cta a{ padding: 7px 10px 4px !important; }
}
