/******************************************************************************
 *                                                                            *
 *    This file is part of RPB Chessboard, a WordPress plugin.                *
 *    Copyright (C) 2013-2021  Yoann Le Montagner <yo35 -at- melix.net>       *
 *                                                                            *
 *    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 3 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, see <http://www.gnu.org/licenses/>.   *
 *                                                                            *
 ******************************************************************************/


/* -------------------------------------------------------------------------- */
/* Vertical spacing */
/* -------------------------------------------------------------------------- */

.rpbchessboard-columns,
div.rpbchessboard-sourceCode,
.rpbchessboard-tabs,
.rpbchessboard-slider {
	margin: 1em 0px;
}

.rpbchessboard-columns:first-child,
div.rpbchessboard-sourceCode:first-child,
.rpbchessboard-tabs:first-child,
.rpbchessboard-slider:first-child,
.rpbchessboard-adminPage p:first-child {
	margin-top: 0px;
}

.rpbchessboard-columns:last-child,
div.rpbchessboard-sourceCode:last-child,
.rpbchessboard-tabs:last-child,
.rpbchessboard-adminPage p:last-child {
	margin-bottom: 0px;
}

.rpbchessboard-adminPage .error p,
.rpbchessboard-adminPage .updated p {
	padding-top   : 0.5em;
	padding-bottom: 0.5em;
}

.rpbchessboard-adminPage p + p.description {
	margin-top: -0.75em;
}



/* -------------------------------------------------------------------------- */
/* Bullet lists */
/* -------------------------------------------------------------------------- */

.rpbchessboard-adminPage ul {
	list-style: square outside;
	padding-left: 1.5em;
}

.rpbchessboard-adminPage ul.subsubsub {
	list-style: none outside;
	padding-left: 0px;
}



/* -------------------------------------------------------------------------- */
/* Tables */
/* -------------------------------------------------------------------------- */

.rpbchessboard-adminPage table:not(.wp-list-table) {
	border-collapse: collapse;
}

.rpbchessboard-adminPage table:not(.wp-list-table) th,
.rpbchessboard-adminPage table:not(.wp-list-table) td {
	border: solid 1px #555;
	padding: 0.25em 0.5em 0.25em;
}

.rpbchessboard-adminPage table:not(.wp-list-table) th {
	background-color: #555;
	color: white;
	font-weight: bold;
}

.rpbchessboard-adminPage table:not(.wp-list-table) td {
	background-color: white;
}



/* -------------------------------------------------------------------------- */
/* Buttons */
/* -------------------------------------------------------------------------- */

.rpbchessboard-adminPage .button.rpbchessboard-disabled {
	color: #bbb;
}

.rpbchessboard-adminPage .button.rpbchessboard-disabled:hover,
.rpbchessboard-adminPage .button.rpbchessboard-disabled:focus,
.rpbchessboard-adminPage .button.rpbchessboard-disabled:active {
	border-color: #ccc;
	background-color: #f7f7f7;
	cursor: default;
	box-shadow: 0px 1px 0px #fff inset, 0px 1px 0px rgba(0, 0, 0, 0.08);
}



/* -------------------------------------------------------------------------- */
/* Column layout */
/* -------------------------------------------------------------------------- */

.rpbchessboard-columns {
	display: flex;
	display: -webkit-flex;
	display: -ms-flexbox;
	flex-direction: row;
	-webkit-flex-direction: row;
	-ms-flex-direction: row;
}

.rpbchessboard-columns > div {
	margin-left : 10px;
	margin-right: 10px;
}

.rpbchessboard-columns > div:first-child {
	margin-left: 0px;
}

.rpbchessboard-columns > div:last-child {
	margin-right: 0px;
}

.rpbchessboard-columns .rpbchessboard-stretchable {
	flex-grow: 1;
	-webkit-flex-grow: 1;
	-ms-flex-grow: 1;
}



/* -------------------------------------------------------------------------- */
/* Floating objects */
/* -------------------------------------------------------------------------- */

.rpbchessboard-floatLeft {
	float: left;
	margin-right: 1em;
}

.rpbchessboard-floatRight {
	float: right;
	margin-left: 1em;
}

.rpbchessboard-clearfix:after {
	display: block;
	visibility: hidden;
	content: " ";
	clear: both;
}



/* -------------------------------------------------------------------------- */
/* Sub-page selector */
/* -------------------------------------------------------------------------- */

#rpbchessboard-subPageSelector {
	float: none;
	margin-bottom: 1em;
}

#rpbchessboard-subPageSelector li:after {
	content: "|";
}

#rpbchessboard-subPageSelector li:last-child:after {
	content: none;
}



/* -------------------------------------------------------------------------- */
/* Source code, visualization blocks, and screenshots */
/* -------------------------------------------------------------------------- */

.rpbchessboard-sourceCode {
	font-family: Consolas, Monaco, monospace;
	font-style : normal;
}

div.rpbchessboard-sourceCode {
	border: solid 1px #bbb;
	background-color: #ffd;
	padding: 8px 10px 8px;
}

.rpbchessboard-visuBlock {
	border: solid 1px #bbb;
	background-color: white;
	margin-right : 5px;
	margin-bottom: 5px;
	box-shadow: 5px 5px 3px #888;
	padding: 10px 15px 10px;
	font-family: Times, serif;
	font-size  : 17px;
	line-height: 1.3em;
}

.rpbchessboard-visuBlock > * {
	font-family: inherit;
	font-size  : inherit;
	line-height: inherit;
	margin-top   : 15px;
	margin-bottom: 15px;
}

.rpbchessboard-visuBlock > *:first-child {
	margin-top: 0px;
}

.rpbchessboard-visuBlock > *:last-child {
	margin-bottom: 0px;
}

.rpbchessboard-screenshot {
	border: solid 1px #bbb;
	box-shadow: 0px 0px 8px #888;
	margin: 0.5em 0em;
}



/* -------------------------------------------------------------------------- */
/* Icons */
/* -------------------------------------------------------------------------- */

.rpbchessboard-tickIcon {
	display: inline-block;
	width : 16px;
	height: 16px;
	background-image: url(../images/tick.png);
	/**
	 * Source: http://findicons.com/icon/263450/accept1
	 * Author: MomentIcons <http://momentumdesignlab.com/>
	 * License: Creative Commons Attribution [CC-BY]
	 */
}

.rpbchessboard-helpIcon {
	display: inline-block;
	width : 20px;
	height: 20px;
	background-image: url(../images/help.png);
	/**
	 * Source: http://findicons.com/icon/26233/help
	 * Author: Ruby Software <http://www.rubysoftware.nl/>
	 * License: Freeware (link required)
	 */
}



/* -------------------------------------------------------------------------- */
/* Customize jQuery */
/* -------------------------------------------------------------------------- */

.ui-front {
	z-index: 100000;
}

.rpbchessboard-jQuery-enableSmoothness .ui-accordion .ui-accordion-content {
	padding-left: 1.25em;
	padding-right: 1.25em;
}



/* -------------------------------------------------------------------------- */
/* Memo page */
/* -------------------------------------------------------------------------- */

#rpbchessboard-memoPage {
	margin-top: 1em;
}

#rpbchessboard-memoPage .rpbchessboard-columns > div {
	width: 50%;
}



/* -------------------------------------------------------------------------- */
/* Options page */
/* -------------------------------------------------------------------------- */

#rpbchessboard-optionPage * + h3 {
	margin: 2em 0px 1em;
}

#rpbchessboard-optionPage #rpbchessboard-tuningChessboardParameterColumn {
	width: 250px;
}

#rpbchessboard-optionPage #rpbchessboard-tuningNavigationToolbarParameterColumn,
#rpbchessboard-optionPage #rpbchessboard-tuningMoveAnimationParameterColumn {
	width: 300px;
}

#rpbchessboard-optionPage span.rpbchessboard-slider {
	display: inline-block;
	width: 240px;
	margin-left: 3em;
	margin-top: 0px;
	margin-bottom: 0px;
}

#rpbchessboard-optionPage .rpbchessboard-squareSizeField {
	text-align: right;
}

#rpbchessboard-optionPage input[name="pieceSymbols"] {
	margin-left: 3em;
}

#rpbchessboard-optionPage input[name="pieceSymbols"]:first-child {
	margin-left: 0px;
}

.rpbchessboard-pieceSymbolLabel {
	display: inline-block;
	vertical-align: middle;
}

.rpbchessboard-pieceSymbolField {
	vertical-align: middle;
	text-align: center;
	margin-right: 3em;
}

.rpbchessboard-pieceSymbolField:last-child {
	margin-right: 0px;
}

.rpbchessboard-graphicRadioButtonFields {
	margin-bottom: 0.5em;
}

.rpbchessboard-graphicRadioButtonFields > div {
	display: inline-block;
	margin-right: 30px;
}

.rpbchessboard-graphicRadioButtonFields input[type="radio"] {
	display: none;
}

.rpbchessboard-graphicRadioButtonFields input[type="radio"] + label {
	display: block;
	padding: 14px;
	line-height: 0px;
}

.rpbchessboard-graphicRadioButtonFields input[type="radio"]:checked + label {
	border: solid 4px rgb(0, 116, 162);
	padding: 10px;
}

.rpbchessboard-graphicRadioButtonFields label img {
	pointer-events: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}



/* -------------------------------------------------------------------------- */
/* Theming pages */
/* -------------------------------------------------------------------------- */

.rpbchessboard-setCodeEditor,
#rpbchessboard-setCodeCreator {
	display: none;
}

form.rpbchessboard-inlineForm {
	padding-left: 0.5em;
	padding-right: 0.5em;
}

form.rpbchessboard-inlineForm > * {
	margin-top: 0px;
	margin-bottom: 0px;
}

form.rpbchessboard-inlineForm div.rpbchessboard-inlineFormTitle {
	margin-bottom: 0.5em;
	font-weight: 600;
	text-transform: uppercase;
}

form.rpbchessboard-inlineForm label {
	display: flex;
	display: -webkit-flex;
	flex-direction: row;
	-webkit-flex-direction: row;
	align-items: baseline;
	-webkit-align-items: baseline;
	margin: .2em 0;
}

form.rpbchessboard-inlineForm label > span {
	margin-right: 0.5em;
	font-style: italic;
}

form.rpbchessboard-inlineForm label > input {
	flex-grow: 1;
	-webkit-flex-grow: 1;
}

form.rpbchessboard-inlineForm .rpbchessboard-colorFieldAndSelector {
	display: flex;
	display: -webkit-flex;
	flex-direction: column;
	-webkit-flex-direction: column;
}

form.rpbchessboard-inlineForm .rpbchessboard-colorFieldAndSelector > *:nth-child(2) {
	align-self: flex-end;
	-webkit-align-self: flex-end;
	padding-top: 1px;
	padding-right: 1px;
}

form.rpbchessboard-inlineForm .iris-border {
	border-radius: 0px;
	border: 1px solid #ddd;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
}

form.rpbchessboard-inlineForm .rpbchessboard-coloredPieceButton {
	display: inline-block;
	margin-top: 1px;
	margin-bottom: 1px;
	line-height: 0px;
	vertical-align: middle;
	border: 1px solid #ddd;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
}

form.rpbchessboard-inlineForm .rpbchessboard-piecesetEditionErrorMessage {
	font-weight: bold;
	font-style: italic;
	color: #800;
}

form.rpbchessboard-inlineForm p.submit.rpbchessboard-inlineFormButtons {
	margin-top: 1em;
	padding-top: 0px;
	padding-bottom: 0px;
}

.rpbchessboard-inlinedRowActions {
	margin-left: 2em;
}

.rpbchessboard-rowActionsDisabled .rpbchessboard-inlinedRowActions {
	display: none;
}

#rpbchessboard-setCodeList td:nth-child(3) {
	padding-left: 2em;
}



/* -------------------------------------------------------------------------- */
/* Help pages */
/* -------------------------------------------------------------------------- */

.rpbchessboard-helpPage * + h3 {
	margin: 2em 0px 1em;
}

ol.rpbchessboard-outline {
	display: inline-block;
	border: 1px solid #ddd;
	background-color: white;
	padding: 1em 2em 1.25em 1.5em;
	list-style-position: inside;
	margin-left: 0px;
}

ol.rpbchessboard-outline li:last-child {
	margin-bottom: 0px;
}

table.rpbchessboard-attributeTable {
	width: 100%;
}

table.rpbchessboard-attributeTable td:nth-child(2) {
	text-align: center;
	padding: 3px 0px 0px;
}

.rpbchessboard-helpPage .rpbchessboard-columns > div {
	width: 50%;
}

#rpbchessboard-pgnAttributeNavigationBoard-content.rpbchessboard-columns > div:nth-child(1) { width: 40%; }
#rpbchessboard-pgnAttributeNavigationBoard-content.rpbchessboard-columns > div:nth-child(2) { width: 60%; }
#rpbchessboard-pgnAttributeNavigationButtons-content.rpbchessboard-columns > div:nth-child(1) { width: 40%; }
#rpbchessboard-pgnAttributeNavigationButtons-content.rpbchessboard-columns > div:nth-child(2) { width: 60%; }

#rpbchessboard-fenAttributeSquareSize-content.rpbchessboard-columns > div:nth-child(1) { width: 35%; }
#rpbchessboard-fenAttributeSquareSize-content.rpbchessboard-columns > div:nth-child(2) { width: 65%; }
#rpbchessboard-fenAttributeColorsetPieceset-content.rpbchessboard-columns > div:nth-child(1) { width: 35%; }
#rpbchessboard-fenAttributeColorsetPieceset-content.rpbchessboard-columns > div:nth-child(2) { width: 65%; }

#rpbchessboard-fenAttributeDiagramAlignment-clearFloats::after {
	content: "";
	clear: both;
	display: table;
}



/* -------------------------------------------------------------------------- */
/* About page */
/* -------------------------------------------------------------------------- */

.rpbchessboard-translatorList {
	display: flex;
	display: -webkit-flex;
	flex-direction: row;
	-webkit-flex-direction: row;
}

.rpbchessboard-translatorList > div {
	display: table;
}

.rpbchessboard-translatorList > div + div {
	margin-left: 50px;
}

.rpbchessboard-translatorList > div > div {
	display: table-row;
}

.rpbchessboard-translatorList dt,
.rpbchessboard-translatorList dd {
	display: table-cell;
}

.rpbchessboard-translatorList dd {
	padding-left: 1em;
}

.rpbchessboard-translatorList img {
	vertical-align: middle;
	margin-right: 0.25em;
}

#rpbchessboard-aboutPage .button img {
	vertical-align: middle;
	margin-right: 0.4em;
	margin-bottom: 3px;
}
