/*
 *
 * This file contains CSS for: 
 * 1. Overall IGW Window (dialog CSS is in attach_to_post_dialog.css)
 * 2. IGW Sidebar 
 * 3. Display Tab: General CSS
 * 3a. Display Tab: "Choose Display" Subtab
 * 3b. Display Tab: "Customize Display Settings" Subtab
 * 3c. Display Tab: "Sort & Exclude Images" (ie, Preview) Subtab
 * 4. Other Tabs
 * 5. Media Queries
 * 
 * Note that much of the CSS in #2 is duplicated in iframely.css. The css here cannot 
 * reach into the iframe of the Add Gallery, Manage Gallery, and Manage Album pages. 
 * So overrides for those pages go in iframely.css. 
 * 
 * Almost every time you make a change here, you may need to make an equivalent change
 * in iframely.css for the other main tabs in the IGW other than the Display Tab.
 * 
 */

/* 1. Overall IGW Window */

html, body {
	width: 100%;
	height: 100%;
	padding: 0px;
	margin: 0px;
	font-size: 13px;
	overflow: hidden;
}

body {
	position: absolute;
	visibility: hidden;
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
	filter: alpha(opacity=0);
	opacity: 0.0;
    height: 100%;
}

.entity_errors {
	color: red;
}

.entity_errors ul {
	margin-left: 30px;
}
.entity_errors ul li{
	list-style-type: disc;
}

.ui-helper-reset {
	font-size: 13px;
}

#attach_to_post_tabs {
	border: 0px;
	background: none;
	height: 100%;
    overflow: hidden;
    padding: 0;
    position: relative;
    visibility: visible;
}

#attach_to_post_tabs
#attach_to_post_tabs.ui-tabs-hide {
	display: block !important;
	visibility: hidden;
	position: absolute;
	top: -5000px;
}

#attach_to_post_tabs h3 {
	text-transform: uppercase;
	color: #666;
    margin-top: 0;
}

h3#choose_display {
    margin-bottom: 24px;
}

#attach_to_post_tabs .main_menu_tab {
    padding: 0;
	position: absolute;
	left: 200px;
	right: 0;
	top: 0;
	bottom: 0;
}

#attach_to_post_tabs.ngg_atp_ios_detected {
	overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

#attach_to_post_tabs .ui-widget-header {
	border: 0px;
	border-bottom: 1px solid #dfdfdf;
	background: none;
}

iframe {
	width: 100%;
	min-height: 100%;
	border: none;
	padding: 0px;
	margin: 0px;
	background: transparent;
}

.clear {
	clear: both;
	float: none;
}

table {
	font-size: 13px;
}

.select2-search input {
	width: 100% !important;
}

.select2-result-label {
	white-space: nowrap;
}

.select2-results {
	font-family: 'segoe ui', Arial, sans-serif;
	font-size: 13px;
}

.select2-container a {
    color: #444 !important;
}

/* thanks to nextgen_admin_page.css */
#ngg_page_content .ngg_page_content_main .select2-container {
	width: 100% !important;
	max-width: 500px !important;
}

/* 2. IGW Sidebar */

#attach_to_post_tabs .ui-tabs-icon {
	/*background: #2a343d;*/
	background: #133148;
	border-right: 3px solid #9fbb1a;
	box-sizing: border-box;
    color: #fff;
    font-family: Lato, sans-serif;
    float: none;
    font-size: 20px;
    font-weight: bold;
    height: 100%;
    letter-spacing: 1px;
    line-height: 60px;
    margin-bottom: 0;
    position: fixed;
    padding: 10px 25px 30px 10px;
    text-transform: uppercase;
    width: 200px;
}

#attach_to_post_tabs img.attach_to_post_logo {
    height: 45px;
    padding: 20px 0 10px;
    float: right;
}

#attach_to_post_tabs .ui-tabs-nav {
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 90px;
    list-style: ordered;
}

#attach_to_post_tabs .ui-tabs-nav li {
	background: transparent;
	border: none;
	display: block;
	height: auto;
	margin: 0;
	padding: 0;
	width: 100%;
}

/* The next couple of rules are all a workaround to disable the "Insert Into Page" tab just for iOS */
/* TODO: consolidate when plupload is upgraded */
#attach_to_post_tabs ul.ui-tabs-nav li:nth-of-type(1) {
    list-style: ordered;
}
#attach_to_post_tabs:not(.ngg_atp_ios_detected) ul.ui-tabs-nav li:nth-of-type(2) {
    list-style: ordered;
}

#attach_to_post_tabs:not(.ngg_atp_ios_detected) ul.ui-tabs-nav li:nth-of-type(1) a {
    display: list-item;
}
#attach_to_post_tabs ul.ui-tabs-nav li:nth-of-type(2) a {
    display: list-item;
}

/* Because the upload-images tab is removed on iOS we must position this divider bar differently */
#attach_to_post_tabs.ngg_atp_ios_detected .ui-tabs-nav li:nth-of-type(1)::after {
	border-bottom: 1px solid rgba(255,255,255,.2);
	content: "";
	display: block;
	float: right;
	margin: 24px 4px 20px 0;
	position: static;
	width: 90%;
}

/* This rule applies for all non-iOS browsers */
#attach_to_post_tabs:not(.ngg_atp_ios_detected) .ui-tabs-nav li:nth-of-type(2)::after {
    border-bottom: 1px solid rgba(255,255,255,.2);
    content: "";
    display: block;
    float: right;
    margin: 24px 4px 20px 0;
    position: static;
    width: 90%;
}

#attach_to_post_tabs .ui-tabs-nav li a {
    color: #fff;
    float: right;
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1;
    padding: 10px 5px 5px 0 !important;
    text-transform: none;   
    font-family: lato, sans-serif;
}

#attach_to_post_tabs .ui-tabs-nav li.ui-tabs-active a, 
#attach_to_post_tabs .ui-tabs-nav li.ui-state-disabled a, 
#attach_to_post_tabs .ui-tabs-nav li.ui-tabs-loading a {
	cursor: pointer;
}

#attach_to_post_tabs .ui-tabs-nav li a.active_tab::before {
	border-right: solid .75em #9fbb1a;
    border-top: solid .75em transparent;
    border-bottom: solid .75em transparent;
	content: '';
	/*left: 3.1em;*/
	right: -25px;
	position: absolute;
	top: 8px;
}

#attach_to_post_tabs .ui-tabs-nav li a.active_tab {
	color: #9fbb1a;
	font-weight: 600;
}

/* 3. Display Tab: General CSS */

#displayed_tab.main_menu_tab {
	overflow-y: scroll;
	overflow-x: hidden;
}

#displayed_tab #ngg_page_content {
    margin: 0;
    width: 100%;
}

#displayed_tab #attach_to_post_tabs .ngg_page_content_header {
	display: none;
}

#displayed_tab #ngg_page_content .ngg_page_content_menu {
    background: transparent;
    border: none;
    padding: 10px 20px 10px 0;
    float: none;
    height: 25px;
    margin-top: 0;
    width: auto;
}

#displayed_tab #ngg_page_content .ngg_page_content_menu a {
    border: none;
    color: #bbb;
    display: inline;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    line-height: 25px;
    padding: 15px 20px;
    /*border-left: 1px solid #f7f8f3;
    border-right: 1px solid #f7f8f3;*/
}

#displayed_tab #ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active {
	color: #9fbb1a;
	border-right: 1px solid #edeeeb;
	border-left: 1px solid #edeeeb;
}

#displayed_tab #ngg_page_content .ngg_page_content_menu a:before {
	display: none;
}

#displayed_tab #ngg_page_content .ngg_page_content_main {
    padding: 30px;
    width: 100%;
    border-top: 1px solid #edeeeb;
}

#displayed_tab #ngg_page_content.ngg_settings_page {
	border: none;
}

#displayed_tab .ngg_igw_promo {
    display: block !important;
    padding: 10px 20px;
    position: relative;
    top: -187px;
    left: 608px;
    background: #123248;
    color: #fff;
    border-bottom: 5px solid #9ebc1b;
    font-family: Lato,sans-serif;
    letter-spacing: .5px;
    box-sizing: border-box;
    width: 200px;
    height: 172px;
    margin-bottom: -170px;
}

#displayed_tab .ngg_igw_promo a {
    text-decoration: none;
    font-weight: 600;
}

#displayed_tab .ngg_igw_coupon {
    font-size: 12px;
    margin-top: 10px;
    margin-top: 47px;
    color: #7298b1;
}


#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main > div.ngg_igw_video {
	display: block !important;
	position: absolute;
	left: 175px;
    top: 69px;
}

#displayed_tab .ngg_igw_video_open {	
	background: #9ebc1b;
	color: #fff;
	cursor: pointer;
	font-family: Lato, sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 8px 10px;  
}

#displayed_tab .ngg_igw_video_inner {
	display: none;
	box-shadow: 0 0 10px 5px rgba(0,0,0,.2);
	background: #fff;
}

#displayed_tab .ngg_igw_video_close {
    color: #9ebc1b;
    width: 100%;
    height: 50px;
    display: block;
    background: #123248;
    text-align: center;
    line-height: 50px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    font-family: Lato, sans-serif;
    letter-spacing: .5px;
    background: #9ebc1b;
    color: #fff;
}

#displayed_tab .ngg_igw_video iframe {
    width: 525px;
    height: 295px !important;
    min-height: auto;
    margin-bottom: -3px;
}

/* 3a. Display Tab: "Choose Display" Subtab **/

#displayed_tab #displayed_gallery_source {
	width: 400px;
}

#displayed_tab #display_tip {
	color: rgba(42,52,61,.6);
	display: block;
	font-size: 14px;
	width: 960px;
	max-width: 100%;
	padding: 10px 0 0;
}

#displayed_tab #slug_configuration {
    display: none;
}

#displayed_tab #source_configuration td,
#displayed_tab #slug_configuration td {
	vertical-align: top;
	padding: 4px 0 !important;
	min-width: 200px;
}

#displayed_tab #source_configuration label {
    color: #777 !important;
    font-size: 13px !important;
}

#attach_to_post_tabs #displayed_tab #ngg_page_content #source_configuration tr td:first-of-type {
	white-space: normal;
	line-height: 1.2;
	width: 265px;
}

#displayed_tab #ngg_page_content .select2-container {
	width: 250px !important;
	line-height: 20px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #9fbb1a;
}

#displayed_tab #slug_configuration #slug_label {
    width: 52px;
}

#displayed_tab #slug_configuration #slug_column input[type=text] {
    width: 498px;
}

#displayed_tab #display_type_selector {
	margin-top: 14px;
}

#displayed_tab .display_type_preview {
	float: left;
    margin: 0 5px 5px 0;
    border: 1px solid #ddd;
    background: #fff;
    width: 145px;
    height: 170px;
}

#displayed_tab .display_type_preview .image_container {
	width: 100%;
	vertical-align: middle;
	text-align: center;
	font-size: 12px;
	font-weight: 500;
	padding: 8px;
    box-sizing: border-box;
}

#displayed_tab .display_type_preview .image_container img {
	margin-top: 10px;
	margin-bottom: 10px;
    box-sizing: border-box;
    max-width: 100px;
    /*border: 1px solid #eee;*/
}

#displayed_tab .display_type_preview .image_container p {
	display: inline-block;
}

.display_type_preview label > div {
    font-size: 12px;
}

#displayed_tab .select2-chosen {
	color: #666 !important;
}

#ngg_page_content #save_displayed_gallery.button {
	font-weight: bold;
	height: 60px !important;
	line-height: 60px !important;
	text-transform: uppercase;
	padding: 0 40px !important;
}

/* 3b. Display Tab: "Customize Display Settings" Subtab */

#display_settings_tab #display_settings_form table tr td:first-child {
    vertical-align: top;
    text-align: right;
    padding-right: 7px;
    width: 180px;
}

#display_settings_tab #display_settings_form table td {
    text-align: left;
}

#display_settings_tab #display_settings_form table textarea {
    height: 60px;
}

#display_settings_tab #display_settings_form textarea,
#display_settings_tab #display_settings_form input[type=text],
#display_settings_tab #display_settings_form input[type=number],
#display_settings_tab #display_settings_form select {
    width: 157px;
}

#display_settings_tab #display_settings_form .ngg_slideshow_gallery_width,
#display_settings_tab #display_settings_form .ngg_slideshow_gallery_height,
#display_settings_tab #display_settings_form .ngg_thumbnail_dimension_width,
#display_settings_tab #display_settings_form .ngg_thumbnail_dimension_height {
    width: 65px !important;
}

#display_settings_tab #display_settings_form .nextgen_settings_colorpicker {
    width: 85px !important;
    text-align: center;
}

/* 3c. Display Tab: "Sort & Exclude Images" (ie, Preview) Subtab */

h3#preview_tab {
    margin-bottom: 0;
}

#preview_tab_content {
	padding: 10px 0;
}

#preview_tab_content a {
    text-decoration: none;
    font-weight: 300;
}

#preview_tab_content .previewed_entity {
	width: 100%;
	border-bottom: solid 1px #E0E0D6;
	background-color: #FAFAF0;
}

#preview_tab_content .previewed_entity .container {
	padding-top: 15px;
}

#preview_tab_content .previewed_entity.header {
	background-color: #F0F0E6;
	padding-bottom: 5px;
	padding-top: 5px;
}

#preview_tab_content .header label {
	font-size: 12px;
	color: rgb(100,150,100);
	font-weight: 600;
}

#preview_tab_content .ui-sortable-helper {
	background: none;
}

#preview_tab_content ul {
	list-style-type: none;
	display: block;
	padding: 0px;
	position: relative;
	margin-top: 20px;
}

#preview_tab_content .inclusion_checkbox {
	margin-right: 7px;
	display: block;
	float: left;
}

#preview_tab_content .preview_item {
	background-color: white;
	width: 100px;
	padding: 10px 10px 30px 10px;
    margin: 0 5px 5px 0;
	border: solid 1px #eee;
	display: block;
	vertical-align: middle;
	text-align: center;
	position: relative;
}

#preview_tab_content .image_container {
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	display: block;
	width: 100%;
	height: 75px;
}

#preview_tab_content .image_container img {
	border: 0px;
}

#preview_tab_content #entity_list  li{
	float: left;
}

#preview_tab_content #entity_list .ui-state-default {
	background: none;
	border: none;
}

#preview_tab_content .placeholder {
	background-color: #e0ddc1;
	position: relative;
}

#preview_tab_content #entity_list .exclude_container {
	background: white;
	display: block;
	text-align: center;
	margin: 0 auto;
	color: black;
	font-weight: normal;
	height: 1.4em;
	line-height: 1.1em;
	font-size: 0.8em;
	position: absolute;
	bottom: 0.2em;
	left: 0px;
	width: 100%;
	padding: 5px 0;
}

#preview_tab_content #entity_list .exclude_container input {
	vertical-align: middle;
	line-height: 1.2em;
	margin: 0 0.5em;
}

#preview_tab_content .header_row {
	margin-bottom: 5px;
	font-weight: 300;
}
#preview_tab_content .header_row strong {
	width: 70px;
	display: inline-block;
}
#preview_tab_content .header_row .separator {
	display: inline-block;
	margin: 0px 5px;
}

#preview_tab_content .header_row .selected {
	font-weight: bold;
}

#preview_tab_content #entity_list li.clear {
	float: none;
	clear: both;
}

#preview_tab_content .refresh_button {
	float: right;
}

/* 4. Overall IGW Window */

#ngg-iframe-galleries_tab {
}

/* 5. Media Queries */

@media (max-width: 1120px) {
	#displayed_tab .ngg_igw_promo {
	    position: static;
	    width: 602px;
	    height: 125px;
	    max-width: 100%;
	    margin-bottom: 10px;
	}
	#displayed_tab .ngg_igw_coupon {
	    margin-top: 10px;
	}
	#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main > div.ngg_igw_video,
	#displayed_tab .ngg_igw_video_inner {
		display: none !important;
	}
}

@media (max-width: 800px) {
	#attach_to_post_tabs .ui-tabs-icon {
	    width: 100%;
	    position: static;
	    border-right: none;
	    border-bottom: 3px solid #9fbb1a;
	    text-align: center;
		/* Also update #attach_to_post_tabs .main_menu_tab's top position when changing height */
		/*height: 280px;*/
		height: 150px;
		padding: 20px;
	}
	#attach_to_post_tabs img.attach_to_post_logo {
	    /*float: none;*/
    	display: none;
	}

	#attach_to_post_tabs .ui-tabs-nav {
	    /*margin-top: -15px;*/
	    margin-top: 0;
	}
	#attach_to_post_tabs .ui-tabs-nav li {
	    padding: 5px;
	    list-style: none !important;
	}
	#attach_to_post_tabs:not(.ngg_atp_ios_detected) .ui-tabs-nav li:nth-of-type(2)::after {
		display: none;
	}
	#attach_to_post_tabs .ui-tabs-nav li a {
	    float: none;
	    padding: 0 !important;
	}
	#attach_to_post_tabs .main_menu_tab {
	    margin-left: 0;
	    min-height: auto;
		position: absolute;
		/*top: 280px;*/
		top: 150px;
		right: 0;
		left: 0;
		bottom: 0;
		height: auto;
	}
	#displayed_tab #ngg_page_content .ngg_page_content_menu {
		padding: 5px 0 0;
	}
	#displayed_tab #ngg_page_content .ngg_page_content_menu a {
	    display: block;
	    width: 100%;
	    float: left;
	    padding: 0;
    	text-align: center;
    	box-sizing: border-box;
	}
	#displayed_tab #ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active, 
	#displayed_tab #ngg_page_content .ngg_page_content_menu a:active {
		background: transparent;
	}
	#displayed_tab #ngg_page_content .ngg_page_content_menu a:last-of-type {
	    padding-bottom: 5px;
	}
	#displayed_tab #source_configuration tr,
	#displayed_tab #slug_configuration tr {
		margin-bottom: 24px;
	}
	#ngg_page_content #save_displayed_gallery.button {
	    position: static;
	    margin-left: 0;
	    padding: 0;
	}
}

@media (max-width: 781px) {
    #attach_to_post_tabs.ngg_atp_ios_detected .ui-tabs-nav li:nth-of-type(1)::after {
        display:none;
    }
	#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td {
	    width: 100% !important;
	}
	#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main #source_configuration {
		display: table !important;
	}
	#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main #source_configuration tbody {
		display: table-row-group !important;
	}
}

@media (max-width: 400px) {
	#displayed_tab .display_type_preview {
    	float: none;
    	margin: 20px auto;
    	width: 170px;
    }
}
