/******************************************************************************
 *                                                                            *
 *    This file is part of RPB Chessboard, a WordPress plugin.                *
 *    Copyright (C) 2013-2015  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 {
	border-collapse: collapse;
}

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

.rpbchessboard-adminPage table th {
	background-color: #555;
	color: white;
	font-weight: bold;
}

.rpbchessboard-adminPage 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-startPositionIcon {
	width : 96px;
	height: 96px;
	background-image: url(../images/board-start.png);
}

.rpbchessboard-emptyPositionIcon {
	width : 96px;
	height: 96px;
	background-image: url(../images/board-empty.png);
}

.rpbchessboard-undoIcon {
	width : 32px;
	height: 32px;
	background-image: url(../images/undo.png);
	/**
	 * Source: http://findicons.com/icon/263268/undo
	 * Author: MomentIcons <http://momentumdesignlab.com/>
	 * License: Creative Commons Attribution [CC-BY]
	 */
}

.rpbchessboard-redoIcon {
	width : 32px;
	height: 32px;
	background-image: url(../images/redo.png);
	/**
	 * Source: http://findicons.com/icon/263449/redo
	 * Author: MomentIcons <http://momentumdesignlab.com/>
	 * License: Creative Commons Attribution [CC-BY]
	 */
}

.rpbchessboard-deleteIcon {
	width : 30px;
	height: 30px;
	background-image: url(../images/delete.png);
	/**
	 * Source: http://findicons.com/icon/263490/delete
	 * Author: MomentIcons <http://momentumdesignlab.com/>
	 * License: Creative Commons Attribution [CC-BY]
	 */
}

.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-squareMarkerGreenIcon,
.rpbchessboard-squareMarkerRedIcon,
.rpbchessboard-squareMarkerYellowIcon,
.rpbchessboard-arrowMarkerGreenIcon,
.rpbchessboard-arrowMarkerRedIcon,
.rpbchessboard-arrowMarkerYellowIcon {
	width : 30px;
	height: 30px;
}

.rpbchessboard-squareMarkerGreenIcon  { background-image: url(../images/square-marker-g.png); }
.rpbchessboard-squareMarkerRedIcon    { background-image: url(../images/square-marker-r.png); }
.rpbchessboard-squareMarkerYellowIcon { background-image: url(../images/square-marker-y.png); }
.rpbchessboard-arrowMarkerGreenIcon   { background-image: url(../images/arrow-marker-g.png); }
.rpbchessboard-arrowMarkerRedIcon     { background-image: url(../images/arrow-marker-r.png); }
.rpbchessboard-arrowMarkerYellowIcon  { background-image: url(../images/arrow-marker-y.png); }



/* -------------------------------------------------------------------------- */
/* Tool-bar */
/* -------------------------------------------------------------------------- */

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-toolbar {
	display: flex;
	display: -webkit-flex;
	flex-direction: row;
	-webkit-flex-direction: row;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-toolbarGroup {
	display: flex;
	display: -webkit-flex;
	flex-direction: column;
	-webkit-flex-direction: column;
	justify-content: space-between;
	-webkit-justify-content: space-between;
}



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

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

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

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-graphicButton.ui-button {
	height: auto;
	border-radius: 8px;
	padding: 2px 3px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-graphicButton.ui-button.ui-button-text-only .ui-button-text {
	padding: 0px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-buttonSet .rpbchessboard-graphicButton.ui-button {
	border-radius: 0px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-buttonRow:first-child .rpbchessboard-graphicButton.ui-button:first-of-type {
	border-top-left-radius: 8px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-buttonRow:last-child .rpbchessboard-graphicButton.ui-button:first-of-type {
	border-bottom-left-radius: 8px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-buttonRow:first-child .rpbchessboard-graphicButton.ui-button:last-of-type {
	border-top-right-radius: 8px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-buttonRow:last-child .rpbchessboard-graphicButton.ui-button:last-of-type {
	border-bottom-right-radius: 8px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-toolbar .ui-button {
	margin-right: 0px;
}

.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-toolbar > * + *,
.rpbchessboard-jQuery-enableSmoothness .rpbchessboard-toolbar .rpbchessboard-toolbarGroup .ui-button + .ui-button {
   margin-left: 8px;
}



/* -------------------------------------------------------------------------- */
/* 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-tuningMoveAnimationParameterColumn {
	width: 500px;
}

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

#rpbchessboard-optionPage .rpbchessboard-squareSizeField,
#rpbchessboard-optionPage .rpbchessboard-animationSpeedField {
	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-navigationBoardFields {
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	flex-direction: row;
	margin-bottom: 0.5em;
}

#rpbchessboard-navigationBoardFields > div {
	margin-left: 30px;
}

#rpbchessboard-navigationBoardFields > div:first-child {
	margin-left: 0px;
}

#rpbchessboard-navigationBoardFields input[name="navigationBoard"] {
	display: none;
}

#rpbchessboard-navigationBoardFields input[name="navigationBoard"] + label {
	display: block;
	padding: 14px;
	line-height: 0px;
}

#rpbchessboard-navigationBoardFields input[name="navigationBoard"]:checked + label {
	border: solid 4px rgb(0, 116, 162);
	padding: 10px;
}

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



/* -------------------------------------------------------------------------- */
/* 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-fenAttributeSquareSize-content.rpbchessboard-columns > div:nth-child(1) { width: 35%; }
#rpbchessboard-fenAttributeSquareSize-content.rpbchessboard-columns > div:nth-child(2) { width: 65%; }



/* -------------------------------------------------------------------------- */
/* 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;
}



/* -------------------------------------------------------------------------- */
/* Edit FEN dialog */
/* -------------------------------------------------------------------------- */

#rpbchessboard-editFENDialog-addPiecesSelector .ui-button.ui-state-active,
#rpbchessboard-editFENDialog-turnSelector .ui-button.ui-state-active,
#rpbchessboard-editFENDialog-addSquareMarkersSelector .ui-button.ui-state-active,
#rpbchessboard-editFENDialog-addArrowMarkersSelector .ui-button.ui-state-active {
	box-shadow: 0px 0px 2px 3px #5b9dd9 inset;
}

#rpbchessboard-editFENDialog-undo,
#rpbchessboard-editFENDialog-redo {
	padding: 4px 7px;
}

#rpbchessboard-editFENDialog-flipSelector {
	padding-bottom: 0.2em;
}

#rpbchessboard-editFENDialog-flip {
	margin-top: 0px;
	margin-bottom: 0px;
}

#rpbchessboard-editFENDialog-chessboard {
	margin-top: 20px;
}

.rpbchessboard-editFENDialog-buttonColumn {
	text-align: center;
}

.rpbchessboard-editFENDialog-buttonColumn div + div {
	margin-top: 12px;
}

#rpbchessboard-editFENDialog-startPosition,
#rpbchessboard-editFENDialog-emptyPosition {
	padding: 8px 20px;
}

.rpbchessboard-editFENDialog-sectionTitle,
.rpbchessboard-editFENDialog-sectionContent {
	font-size: 13px;
	line-height: 1.5em;
}

.rpbchessboard-editFENDialog-sectionTitle {
	font-weight: bold;
}

* + .rpbchessboard-editFENDialog-sectionContent {
	margin-top: 0.3em;
}

.rpbchessboard-editFENDialog-sectionContent + .rpbchessboard-editFENDialog-sectionTitle {
	margin-top: 1.3em;
}

.rpbchessboard-editFENDialog-turnField {
	display: inline-block;
}

.rpbchessboard-editFENDialog-turnField + .rpbchessboard-editFENDialog-turnField,
.rpbchessboard-editFENDialog-sectionContent .button + .button {
	margin-left: 16px;
}

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

#rpbchessboard-editFENDialog-castleRights td {
	vertical-align: middle;
	text-align: center;
	padding: 0px 5px 0px;
}

#rpbchessboard-editFENDialog-castleRights input[type="checkbox"] {
	margin: 0px;
}

#rpbchessboard-editFENDialog-enPassantRights {
	list-style-type: none;
}

#rpbchessboard-editFENDialog-enPassantRights,
#rpbchessboard-editFENDialog-enPassantRights li,
#rpbchessboard-editFENDialog-enPassantRights input[type="radio"] {
	margin-top: 0px;
	margin-bottom: 0px;
}
