/*******************************************************************************
 * Resources CMS
 *
 * A modification for SMF 2.1 that <does stuff>
 *
 * Copyright (c) 2020 Jon Stovell
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 ******************************************************************************/

#resources_cms_header {
	margin: 2em 0;
	display: flex;
	flex-flow: row wrap;
	justify-content: space-between;
}
#resources_cms_header .button {
	float: none;
}

#resource_search > summary {
	font-size: 1.4em;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-left: 36px;
	min-height: 38px;
}
#resource_search > summary::-webkit-details-marker {
	display: none;
}
#resource_search .fa-search {
	position: absolute;
	left: 0;
}
#resource_search .fa-search::before {
	position: relative;
	top: -0.1em;
}
span.filter_param {
	font-size: 0.8em;
	display: inline-block;
	white-space: nowrap;
	padding: 5px 8px 0;
	background: #eee;
	margin: 3px;
	border-radius: 8px;
}
#rsrc_filter_none {
	background: none;
	font-size: 1em;
}
#resource_search_form {
	border-top: 1px solid #ddd;
	padding-top: 12px;
	margin-top: 9px;
}

.resources_category {
	padding: 0 0 3em 0;
}
.resources_list {
	display: flex;
	flex-flow: row wrap;
	margin: 0 -10px;
}
.resources_list_item {
	width: 300px;
	min-height: 300px;
	box-sizing: border-box;
	padding: 1em;
	margin: 1em;
	border: 1px solid #ddd;
	display: flex;
	flex-flow: column nowrap;
}
@media (min-width: 640px) and (max-width: 999px) {
	.resources_list_item {
		flex: 1 1 auto;
		max-width: calc(50% - 2em);
	}
}
@media (max-width: 639px) {
	.resources_list_item {
		flex: 1 1 auto;
	}
}
.resources_list_item .display_title {
	font-size: 1.5em;
}
.resources_list_item .resource_preview_image {
 	height: 200px;
	width: 100%;
	max-width: 300px;
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
}
.resource_preview_image img {
	object-fit: contain;
	max-width: 100%;
	max-height: 200px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"] {
	width: 100%;
	margin-bottom: 3px;
	flex: 1 1 auto;
}
input[type="text"]:read-only,
input[type="email"]:read-only,
input[type="tel"]:read-only,
input[type="url"]:read-only {
	background-color: #f8f8f8;
	color: #777;
}

.cat_bar {
	margin: 2em 0 1em;
	padding-bottom: 8px;
}
.cat_bar h4 {
	line-height: 1.5em;
	padding: 8px 1px;
}
fieldset {
	margin: 1em 0;
}

.input_group {
	display: inline-flex;
	align-items: center;
	min-width: 12.25ch;
	box-sizing: border-box;
	padding-right: 2ch;
}
.dd_initiatives .input_group {
	min-width: 10ch;
}
.dd_categories .input_group {
	min-width: 20.5ch;
}
.input_group label:first-child {
	margin-right: 1ch;
}

#attachment_previews {
	border-top: none;
	padding: 0;
	margin: 10px 0;
}
div.attached_BBC, div.linktext {
	margin-top: 10px;
}
input[name="attachBBC"] {
	margin-top: 0;
}
div.attached_BBC {
	display: none !important;
}

@media (min-width: 480px) {
	dl.settings dt {
		max-width: 30ch;
		width: 38%;
	}
	dl.settings dd {
		min-width: calc(100% - 32ch);
		width: 60%;
	}
}
@media (max-width: 479px) {
	th.address_level1, th.address_level2,
	td.address_level1, td.address_level2 {
		display: none;
	}
}