/**
 * webtrees: online genealogy
 * Copyright (C) 2017 webtrees development team
 * 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/>.
 */

 /* list options 
.wt-initials-list {
	display: inline!important;
}
*/
 /* Override Bootstrap formatting */
 .row .select2-selection--single {
	height: auto;
}

.card-block {
	padding: 1.25rem;
}

.table-responsive {
    display: block;
    overflow: auto;
    width: 100%;
}

/* Mobile device enhancements */
/* -- home page scrolling */

.nav {
	display: flex;
    flex-wrap: wrap;
}
.wt-main-container .row {
	flex-wrap: wrap;
	margin: 0;
}

.wt-side-blocks .card {
	display: flex;
	overflow: auto;
}

.wt-main-container .row .wt-block-content {
	padding: .25rem;
}

.wt-side-blocks .dataTables_wrapper div[class*='col']  {
	padding: 0;
}

/* -- chart page scrolling */
.wt-chart {
	position: relative;
	padding: .25rem;
}

/*
 * Pages have the following high-level structure:
 *
 * wt-global
 * +---wt-header-wrapper
 *     +---wt-header-container
 *     |   +---wt-header-content
 *     |       +---wt-accessibility-links
 *     |       +---wt-site-logo
 *     |       +---wt-site-title
 *     |       +---wt-header-search
 *     |       |   +---wt-header-search-form
 *     |       +---wt-secondary-navigation
 *     |       |   +---wt-secondary-menu
 *     |       +---wt-primary-navigation
 *     |           +---wt-primary-menu
 *     +---wt-main-container
 *     |   +---wt-main-content
 *     |       +---wt-messages
 *     |       +---wt-page-title
 *     |       +---wt-page-options wt-page-options-xxxxx
 *     |       +---wt-page-content
 *     +---wt-footer-container
 *         +---wt-footer-content
 *             +---wt-contact-links
 *             +---wt-powered-by-webtrees
 *             +---wt-page-views
 *             +---wt-cookie-warning
 */

.wt-global {
	/* Prevent redraws when dynamic content requires a scrollbar. */
	overflow-y: scroll;
	/* Keep the page as tall as the window, so the footer can remain at the bottom. */
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.wt-header-wrapper {
}

.wt-header-container {
}

.wt-header-content {
}

.wt-accessibility-links {
	/* When we focus on the links, they should appear without changing the layout. */
	position: fixed;
}

.wt-site-logo {
}

.wt-site-title {
}

.wt-header-search {
}

.wt-header-search-form {
}

.wt-secondary-navigation {
}

.wt-secondary-menu {
	flex-wrap: nowrap;
}

.wt-primary-navigation {
}

.wt-primary-menu {
}

.wt-main-container {
	/* Grow to fill content, to allow footer to stay at bottom of page. */
	flex: 1;
	/* Space between the header/footer and the main content. */
	padding: 1rem 0;
}

.wt-main {
}

.wt-messages {
}

.wt-page-title {
}

.wt-page-options {
	flex: 1 1 0;
	padding: 1rem 0;
}

.wt-page-content {
}

.wt-page-options-label {
	text-align: center;
}

.wt-footer-container {
}

.wt-footer-content {
	text-align: center;
}

.wt-contact-links {
}

.wt-powered-by-webtrees {
}

.wt-page-views {
}

.wt-cookie-warning {
}

/*
 * The home/my pages
 *
 * wt-home-page / wt-my-page
 * +---wt-main-blocks
 * |   +---wt-block, wt-block-AAA
 * |   +---wt-block, wt-block-BBB
 * |   +---wt-block, wt-block-CCC
 * +---wt-side-blocks
 *     +---wt-block, wt-block-XXX
 *     +---wt-block, wt-block-YYY
 *     +---wt-block, wt-block-ZZZ
 *
 * Each block as the structure
 * wt-block, wt-block-XXX
 * +---wt-block-header, wt-block-header-XXX
 * +---wt-block-content, wt-block-content-XXX
 */

 /* my page chart enhancements */
.wt-block-content-charts-block {
	display: flex;
    flex-flow: column-reverse;
    overflow: auto;
}

.wt-block-content-todays-events-block {
	padding: .25rem;
}

[dir=rtl] .wt-block-content-charts-block {
    flex-flow: row;
}

/*
 * Any element that is loaded dynamically has the class wt-ajax-load.
 * We can provide a "loading" placeholder for empty elements with this class.
 */
.wt-ajax-load:empty {
}

/*
 * Drag and drop sortable lists
 */
.wt-sortable-list {
}

.wt-sortable-item {
	cursor: move;
}

/*
 *  These selectors control how the short horizontal lines are positioned in the Charts
 *  Optimized for Win10 and FF, Chrome and Edge browsers
 *  	Ancestors
 *  	Descendants
 *  	amily book
 *  	Hourglass chart
 *
 * */
/* My Page Charts */

.myCharts {
	position: relative;
}

/* Ascentors */
.wt-ancestors-chart .linea1 {margin-bottom: 4px;}
.wt-ancestors-chart .linea2 {margin-bottom: 7px;}
.wt-ancestors-chart .linea3 {margin-bottom: 4px;}
.wt-ancestors-chart .linea4 {margin-bottom: 7px;}
.wt-ancestors-chart .linea5 {vertical-align: top;}

/* Descendants */
.wt-descendants-chart .lined1 {margin-bottom: 4px;}
.wt-descendants-chart .lined2 {margin-bottom: 7px;}
.wt-descendants-chart .lined3 {margin-bottom: 4px;}
.wt-descendants-chart .lined4 {margin-bottom: 7px;}
.wt-descendants-chart .linea5 {vertical-align: top;}

/* Family book */
.linef1 {margin-bottom: 3px;}
.linef2 {margin-bottom: 3px;}
.linef3 {margin-bottom: 7px;}

/* Hourglass */
.lineh1 {margin-bottom: 4px;}
.lineh2 {margin-bottom: 4px;}
.lineh3 {margin-bottom: 7px;}

/*
 * Ancestors chart
 *
 * wt-chart, wt-ancestors-chart
 * +---wt-ancestors-chart-list
 *     +---wt-ancestors-chart-list-item
 */
.wt-ancestors-chart-list {
}

.wt-ancestors-chart .family-break { 
	page-break-before: always;
}

/*
 * Compact chart
 *
 * wt-chart, wt-compact-chart
 */

.wt-ancestors-chart-list-item {
	list-style: none outside none;
}

.wt-ancestors-chart .person_box_template {
	line-height: 1.0;
}

/*
 * Descendants chart
 *
 * wt-chart, wt-descendants-chart
 * +---wt-descendants-chart-list
 *     +---wt-descendants-chart-list-item
 */
.wt-descendants-chart-list {
}

.wt-descendants-chart-list-item {
	list-style: none outside none;
}

#descendancy_chart .person_box_template, .wt-descendants-chart .person_box_template {
	line-height: 1.0;
}

.wt-descendants-chart .family-break { 
	page-break-before: always;
}

/*
 * Family book chart
 *
 * wt-chart, wt-family-book-chart
 */
 .wt-family-book-chart .person_box_template {
	line-height: 1.0;
}

.wt-family-book-chart hr {
	page-break-after: always;
}
/*
 * Fan chart
 *
 * wt-chart, wt-fan-chart
 */

/*
 * Hourglass chart
 *
 * wt-chart, wt-hourglass-chart
 */
.hourglassChart .person_box_template {
	line-height: 1.0;
}

/*
 * Hourglass chart
 *
 * wt-chart, wt-interactive-tree
 */

/*
 * Lifespans chart
 *
 * wt-chart, wt-lifespans-chart
 */

/*
 * Pedigree chart
 *
 * wt-chart, wt-pedigree-chart
 */

.pedigree_form {
	width: 45px;
}

#pedigree_chart {
	position: relative;
	margin: 20px auto;
}

#pedigree_canvas {
	z-index: -1000;
}
 
.wt-pedigree-chart .person_box_template {
	line-height: 1.0;
}

#childbox-pedigree {
	border: 1px solid;
	background-color: #fff;
}

#pedigree-page #childbox-pedigree {
	border: 1px solid;
	background-color: #fff;
}

#childbox-pedigree {
	padding: 5px;
	position: absolute;
	display: none;
	text-align: start;
	white-space: nowrap;
	left: 0;
	z-index: 9999;
}
wt-pedigree-chart .spacer {
	background-image: url(images/spacer.png);
	height:           20px;
	width:            1px;
}

#childarrow,
.ancestorarrow {
	text-align: center;
	display: inline-block;
	vertical-align: middle;
}

.layout3 #childbox-pedigree {
	top: auto;
}

#childbox-pedigree a.name1 {
	display: block;
	margin-left: 5px;
}

[dir=rtl] #childbox-pedigree a.name1 {
	left: auto;
	margin-right: 5px;
}
/*
 * Pedigree map
 *
 * wt-chart, wt-pedigree-map
 */

/*
 * Relationships chart
 *
 * wt-chart, wt-relationships-chart
 */
#relationship-page .person_box_template {
	line-height: 1.0;
}
.vline-text, .hline-text {	font-size: 0.7rem;
}

/*
 * Statistics chart
 *
 * wt-chart, wt-statistics-chart
 */

/*
 * Timeline chart
 *
 * wt-chart, wt-timeline-chart
 */

/*
 * Family list
 *
 * wt-list, wt-individual-list
 * +---wt-initials, wt-surname-initials
 *     +---wt-initial, wt-surname-initial
 * +---wt-initials, wt-given-name-initials
 *     +---wt-initial, wt-given-name-initial
 */
.text-muted {
	color: #999!important;  /* for all lists */
}
/*
 * Individual list
 *
 * wt-list, wt-individual-list
 * +---wt-initials, wt-surname-initials
 *     +---wt-initial, wt-surname-initial
 * +---wt-initials, wt-given-name-initials
 *     +---wt-initial, wt-given-name-initial
 */

/*
 * Media object list
 *
 * wt-list, wt-media-list
 */

/*
 * Note object list
 *
 * wt-list, wt-note-list
 */

/*
 * Source list
 *
 * wt-list, wt-source-list
 */

/*
 * Repository list
 *
 * wt-list, wt-repository-list
 */

/*
 * Branches list
 *
 * wt-branches-page
 */

/*
 * Place hierarchy
 *
 * wt-place-hierarchy-page
 */

 #place_hierarchy ul {
	margin-right: 15px;
}
[dir=rtl] #place_hierarchy ul {
	margin-left: 15px;
}

/*
 * Calendar
 *
 * wt-calendar-page
 */

/*
 * Reports
 *
 * wt-reports-page
 */

/*
 * Search
 *
 * wt-search-page, wt-general-serach-page/wt-phonetic-search-page/wt-advanced-search-page/wt-search-replace-page
 */

/* Some menus (e.g. languages) can be longer than a page */
.dropdown-menu {
	max-height: 30rem;
	overflow-x: hidden;
}

/* Clipping cart */
.clipping-cart h2 {
	margin: 20px;
	text-align: center;
 }
.clipping-cart .wt-page-options {
	max-width: 25rem;
}

.clipping-cart .topbottombar, .clipping-cart .optionbox, .add-to .topbottombar {
	font-size: 1rem;
}

.clipping-cart .add-to {
	text-align: left;
}

/* Census assistant */
.wt-census-assistant-table .wt-census-assistant-field,
.wt-census-assistant-form-control {
	font-size: small;
	padding: 0.1rem;
}
.wt-census-assistant-form-control:focus {
	min-width: 12rem;
}

/* Temporary hack/workaround for https://github.com/twbs/bootstrap/issues/21666 */
fieldset.row {
	display: block;
}
fieldset.row > legend, fieldset.row > div {
	display: inline-block;
	float: left;
}

/* Forms */
.col-form-label,
.col-form-legend {
	font-weight: bold;
}

/* Popups */
.popup .nav-link {
	display: inline;
	vertical-align: top;
	padding: 5px;
}

/*
 * On-screen keyboard, for entering characters that are not on the keyboard
 */
.wt-osk {
	position: fixed;
	z-index: 1000;
	top: 1rem;
	display: none;
}
.wt-osk-keys {
	background: #eee;
	padding: 0.25rem;
	font-size: larger;
}
.wt-osk-group {
	display: inline-block;
	margin: 0.25rem;
	padding: 0.25rem 0;
}
.wt-osk-key {
	background: #ddd;
	border-radius: .25rem;
	padding: 0.25rem;
	cursor: pointer;
}
.wt-osk-key-shift {
	color: #aaa;
	font-size: smaller;
}
.wt-osk-keys.shifted .wt-osk-key {
	color: #aaa;
}
.wt-osk-keys.shifted .wt-osk-key-shift {
	color: #555;
}

/*
 * Google Maps
 */

.gm-events .optionbox  {
	font-size: .75em;
}

.gm-events *[class^='person_box'] {
	font-size: .813em;
}

@media (max-width:1025px)  {
	body {
		font-size: 14px;
	}

	.col-sm-8,.col-sm-4 {
		padding-left: 5px;
		padding-right: 5px;
	}

	#individual-tabs .nav-link {
		padding: .5em;
	}

.col-form-label,
.col-form-legend {
	text-align: center;
}
}
