/*!
 * This file is part of the Semantic MediaWiki Extension
 * @see https://semantic-mediawiki.org/
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 *
 * Factbox related CSS rules
 *
 * @file
 * @ingroup semantic-mediawiki
 *
 * @license GNU GPL v2+
 * @since 3.0
 *
 * @author mwjames
 */
.smwfact {
	clear: both;
	background-color: #f9f9f9;
	padding: 5px;
	border: 1px solid #aaa;
	font-size: 95%;
	min-height: 23px; /* required by SMW_FACTBOX_SHOWN */
}

.smwfact td,
.smwfact tr,
.smwfact table {
	background-color: #f9f9f9;
}

.smwfact .smwfactboxhead {
	font-size: 110%;
	font-weight: bold;
	float: left;
	margin-bottom: 2px;
	max-width: 90%;
}

.smwfact .smwfacttable {
	border-top: 1px dotted #aaa;
	width: 100%;
	clear: both;
}

.smwfact .smw-table-cell {
	border:none;
}

.smw-table-row .smwpropname,
.smw-table-row .smwpropname,
.smw-table-row .smwspecname {
	text-align: right;
	vertical-align: top;
	padding-right: 1em;
	width: 33%;
}

.smwfact .smw-table-row:nth-child(odd) {
	background-color: #f9f9f9;
}

.smwfact .smw-table-row:nth-child(even) {
	background-color: #fff;
}

.smwfact .smwpropname {
	width: 33%;
}

.smwfact .smwprops,
.smwfact .smwspecs {
	width: 100%;
}

.swmfactboxheadbrowse a {
	background-image: url( ../assets/smw-icon-browse-subtle.svg );
	background-position: right center;
	background-repeat: no-repeat;
	padding-right: 20px;
	text-decoration: none;
	margin-right: 4px;
}

.swmfactboxheadbrowse a:hover {
	background-image: url( ../assets/smw-icon-browse.svg );
	padding-right: 22px;
	text-decoration: none;
	margin-right: 2px;
}

.rdflink {
	float: right;
	margin-top:2px;
}

.rdflink a {
	padding-top: 2px;
	padding-right: 15px;
	color: #888;
	background-image: url( ../assets/smw-icon-factbox-rdf-subtle.svg );
	background-position: center right;
	background-repeat: no-repeat
}

.rdflink a:hover {
	text-decoration: none;
	color: #0000ff;
	background-image: url( ../assets/smw-icon-factbox-rdf.svg );
}

.smwrdflink {
	float: right;
	font-size: small;
	padding: 2px 0 0 0;
}

.smwprops, .smwpropname {
	word-break: break-word;
	word-wrap: break-word;
	-webkit-hyphens: auto;
	-moz-hyphens: auto;
	hyphens: auto;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/**
 * Tabbed factbox
 */
.smw-factbox #tab-facts-list:checked ~ #tab-content-facts-list,
.smw-factbox #tab-facts-attachment:checked ~ #tab-content-facts-attachment,
.smw-factbox #tab-facts-derived:checked ~ #tab-content-facts-derived {
	display: block;
}

.smw-factbox label.nav-label {
	padding: 3px 25px 3px 25px;
}

.smw-factbox input.nav-tab:checked + label.nav-label {
	border: 1px solid #aaa;
	border-top: 2px solid orange;
	border-bottom: 1px solid #fff;
	background: #fff;
}

.smw-factbox input.nav-tab:checked + label#tab-label-facts-attachment.nav-label {
	border: 1px solid #aaa;
	border-top: 2px solid #42c0fb;
	border-bottom: 1px solid #fff;
}

.smw-factbox .smwfact {
	border:none;
	background-color: #fff;
	padding: 0 0 0 0;
	padding-top: 10px;
}

.smw-factbox .smwrdflink {
	padding: 1px 5px 1px 5px;
	margin-bottom: 8px;
}

.smw-factbox .smwfactboxhead {
	padding: 1px 5px 1px 25px;
	margin-bottom: 8px;
	font-weight: normal;
	max-width: 75%;
}

.smw-factbox .smwpropname, .smw-factbox .smwprops, .smw-factbox .smwspecname, .smw-factbox .smwspecs {
	padding: 0.4em;
}

/**
 * #4146
 *
 * `#mw-data-after-content` defines when the content is outside of the
 * `#bodyContent`
 *
 * `#bodyContent #mw-data-after-content` negates previous CSS when it is part of
 * the #bodyContent (being inside)
 */
.smw-factbox-view.skin-vector #mw-data-after-content .smw-factbox {
	background: #fff;
	padding: 0px 24px 24px 24px;
	border-left: 1px solid #a7d7f9;
	/*border-top: 1px solid #a7d7f9;*/
	border-bottom: 1px solid #a7d7f9;
	font-size: 0.875em;
	line-height: 1.6;
	margin-top: -10px;
}

.smw-factbox-view.skin-vector #bodyContent #mw-data-after-content .smw-factbox {
	background: unset;
	padding: unset;
	border-left: 0px solid #a7d7f9;
	/* border-top: 0px solid #a7d7f9; */
	border-bottom: 0px solid #a7d7f9;
	font-size: unset;
	line-height: unset;
	margin-top: 15px;
}

/**
 * Responsive settings (#see smw.table.css)
 */
@media screen and (max-width: 980px) {
	.smw-factbox-view.skin-vector #mw-data-after-content .smw-factbox {
		padding: 16px;
		margin-top: -16px;
	}

	.smw-factbox-view.skin-vector #bodyContent #mw-data-after-content .smw-factbox {
		padding: unset;
		margin-top: 16px;
	}
}

@media screen and (max-width: 800px) {
	.smw-factbox .smwfactboxhead {
		padding: 1px 5px 1px 5px;
	}

	.smw-factbox label {
		padding: 3px 5px 1px 5px;
	}

	.smwfact .smwpropname, .smwfact .smwspecname {
		width: auto;
		font-weight: bold;
	}

	.smw-factbox label.nav-label {
		padding: 5px 25px 5px 5px;
	}
}

@media screen and (max-width: 600px) {
	.smw-factbox .smwfactboxhead {
		padding: 1px 5px 1px 5px;
		width: 50%;
	}
}
