/**
 * Styles for the featured page widget entry form
 */

/* For screen reader-only text */
.fpw-visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* Widget Customizer Icon */
:not(.wp-admin) #available-widgets [class*=fpw_widget] .widget-title::before {
	content: "\f123";
}

/* Widget Form Tweaks
 * ------------------------------------------------------------- */
.fpw-form-field {
	display: inline-block; /* keep label+field/value together */
}

.fpw-widget-heading,
.fpw-advanced legend,
.fpw-advanced label  {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.fpw-advanced label {
	font-weight: normal;
}
.fpw-advanced label:last-of-type {
	margin-bottom: 0;
}


/* "Hide" the select list */
.fpw-page-select {
	visibility: hidden;
	opacity: 0;
}

.fpw-advanced {
	width: auto;
	clear: both;
	margin: 5px 0;
}

/* Fallback for no JS or accessibility mode */
.no-js .fpw-page-select,
.widgets_access .fpw-page-select {
	visibility: visible;
	opacity: 1;
}


/* Page Status Changes
 * ------------------------------------------------------------- */
/* General styles */
.fpw-page-status {
	display: none;
	margin-bottom: 1em !important;
	padding: 10px;
	background-color: #FAFAFA;
	border: 1px solid #E5E5E5;
}
/* ^^^ we'll display this with javascript as it requires that to update. there's a <noscript> alternative help message */

.fpw-page-status img {
	vertical-align: bottom;
}

.fpw-help-button {
	text-decoration: none;
}
.fpw-help-icon,
.fpw-edit-icon {
	font-size: 20px;
}

/* dynamic colors */
.fpw-page-status-excerpt,
.fpw-page-status-image {
	color: #A91616;
}

.featured-image .fpw-page-status-image,
.excerpt .fpw-page-status-excerpt {
	color: #008211;
}

/* dynamic icons */
.fpw-page-status-set {
	display: none;
}

.featured-image .fpw-page-status-image .fpw-page-status-set,
.excerpt .fpw-page-status-excerpt .fpw-page-status-set {
	display: inline;
}

.featured-image .fpw-page-status-image .fpw-page-status-missing,
.excerpt .fpw-page-status-excerpt .fpw-page-status-missing {
	display: none;
}

/* Edit Link */
.fpw-page-status-edit-link {
	text-decoration: none;
}
.fpw-page-status .dashicons:not(.dashicons-editor-help,.dashicons-edit) {
	width: 30px;
	height: 30px;
	font-size: 30px;
	vertical-align: middle;
}


 /* Layouts Preview
 * ------------------------------------------------------------- */
.fpw-layouts {
 	position: relative;
}

.fpw-layouts .layout-option {
	margin-bottom: 7px;
	line-height: 1.5;
}

.fpw-layouts label {
	vertical-align: text-bottom;
}

.fpw-layouts::before,
.fpw-layouts label::after {
	display: block;
	content: '';
	top: 1.5em;
	width: 92px;
	height: 84px;
}

.fpw-layouts::before {
	float: right;
	position: relative;
}

.fpw-layouts label::after {
	display: none;
	position: absolute;
	right: 0;
	width: 91px;
	height: 82px;
	border: 1px solid #E5E5E5;
	background-attachment: scroll;
	background-position: 0 82px;
	background-repeat:  no-repeat;
	background-image: url(../img/layoutsIcons.png);
	background-image: url(../img/layoutIcons.svg), linear-gradient( transparent, transparent );
}

.fpw-layouts input:checked + label::after {
	display: block;
}

.fpw-layouts .fpw-layout-wrapped:checked + label::after {
	background-position: 0 0;
}
.fpw-layouts .fpw-layout-banner:checked + label::after {
	background-position: 0 -82px;
}
.fpw-layouts .fpw-layout-big:checked + label::after {
	background-position: 0 -164px;
}

/* 1.X Template Warning */
.fpw-error {
	outline: 1px solid #eee;
	border-left: 4px solid #DD3D36;
	background: #FFF;
	-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
	box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
	padding: 5px 10px 5px 40px;
	text-indent: -22px;
}
.fpw-error .dashicons {
	color: #DD3D36;
}


/* Chosen Styles
 * ------------------------------------------------------------- */
/* Remove default styles & Make More WP3.8+ Native */
.fpw-featured-page-id .chosen-container {
	font-size: 14px;
}
.fpw-featured-page-id .chosen-container .chosen-single {
	background: #fff;
	border-radius: 0;
	border-color: #ddd;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
}
.fpw-featured-page-id .chosen-container-single .chosen-search input[type="text"] {
	background-color: #fff;
}
.fpw-featured-page-id .chosen-drop {
	border-color: #ddd;
	border-radius: 0;
}
.chosen-container .chosen-drop .chosen-results li {
	position: relative;
	padding: 3px 55px 3px 5px;
	line-height: 1.6;
	overflow: hidden;
	text-overflow: ellipsis;
}

.chosen-drop li::before,
.chosen-drop li::after {
	/* Dashicon stuff */
	position: absolute;
	top: 0;
	right: 5px;
	display: inline-block;
	width: 20px;
	height: 20px;
	-webkit-font-smoothing: antialiased;
	font-size: 20px;
	line-height: 1;
	font-family: "dashicons";
	text-decoration: inherit;
	font-weight: normal;
	font-style: normal;
	vertical-align: top;
	-moz-transition: color .1s ease-in 0;
	-webkit-transition: color .1s ease-in 0;
	text-align: center;
	color: #A91616;
	opacity: .3;
}

.chosen-drop li.no-results::before,
.chosen-drop li.no-results::after,
.chosen-drop li.group-result::before,
.chosen-drop li.group-result::after {
	content:'';
}

/* Featured Image */
.chosen-drop li::before {
	content: '\f128';
	right: 30px;
}
.chosen-drop li.featured-image::before {
	color: #28AB38;
	opacity: 1;
	text-shadow: 1px 1px 0 rgba(0,0,0,.2);
}

/* Excerpt */
.chosen-drop li::after {
	content:'\f214';
}
.chosen-drop li.excerpt::after {
	color: #28AB38;
	opacity: 1;
	text-shadow: 1px 1px 0 rgba(0,0,0,.2);
}

/* Fix 100% width
 * Fix for this issue in widget admin interface:
 * https://github.com/harvesthq/chosen/issues/92#issuecomment-8566813 */
.chosen-container, .chosen-drop, .chosen-drop .chosen-search, .chosen-drop .chosen-search input {
  min-width: 100% !important;
  max-width: 100%;
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}


/* Contextual Help
 * ------------------------------------------------------------- */
#tab-panel-fpw_help_tab img {
	vertical-align: bottom;
}

#tab-panel-fpw_help_tab a[target="_blank"]::after {
	display: inline-block;
	content: "\f504";
	vertical-align: bottom;
	font-family: 'Dashicons';
}