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

/* ---- custom.css -- */

/* Limit size of media object on Individual page for large monitors */
#individual-images .gallery img {
  max-width: 200px;
  margin-left: auto;
  display: flex;
  margin-right: auto;
}

/* Reduce spacing on Individual page */
[dir] .card-header {
	padding: .5rem .5rem;
}

[dir] .card-body {
	padding: .5rem .5rem .5rem .5rem;
	}
	
[dir] .card-body dd {
	margin-bottom: 0;
	}
	
/* Inline Individual data for FAB theme */
[dir] .card-body dt {
	clear: both;
	margin-right: 0;
}

/*
[dir] .table td, [dir] .table th {
	padding:.5rem;
}
*/

/* slid show controls */
.svg-inline--fa.fa-w-14, .svg-inline--fa {
	opacity: .7;
}

/* Adjust height for webtrees theme pirimay menu */
[dir] .dropdown-menu.show {
    max-height: 60rem;
}

/* move style from code to css for tables in Hourglass Chart */
.wt-chart-hourglass table {
	border-collapse: collapse;
	border: none;
}
.wt-chart-hourglass th, .wt-chart-hourglass td {
	padding: 0;
}

#childbox .person_box {
	border: thin solid #aaa!important;
}

.wt-facts-table tbody {
	font-size:.75rem;
}

.wt-facts-table th {
	width:100px;
}

.wt-facts-table td {
	font-size:.9rem;
}

/* Person box style changes before padding 2 and border 1 are added.
 * w-100 for Family and spouse and compact charts */

.wt-chart .wt-chart-box, .w-100 td .wt-chart-box, .d-flex .wt-chart-box {
	width: 22rem; /* 260px */
	height: 6rem; /* 80px */
	line-height: 1.05;
	border: thin solid #aaa;
}

.wt-chart .small, .wt-chart-box-facts .small {
	font-size: .75rem;
}

.wt-icon-sex{
	height: 1em;
}

.svg-inline--fa.fa-fw {
    width: .75em;
}

.wt-icon-zoom-in {
    width: 25px;
    height: 25px;
}

[dir] [class^=fact_] {
    margin-bottom: 0;
}

#childbox .person_box {
    border: thin solid #aaa!important;
}

/* fix dropdowns on person box */

[dir] .wt-chart-box .dropdown-menu {
    padding:4px;
    max-height: 50rem; /* all charts */
}

.wt-chart-pedigree .wt-chart-box .wt-chart-box-zoom-dropdown {
    max-height: 20rem; /* only for zoom on pedigree */
}

.wt-chart-box .dropdown-menu {
    font-size: 12px;
}

.wt-chart-box .dropdown-menu .NAME {
    padding-left: 20px;
    padding-top: 5px;
    line-height: 1.5;
}

[dir=rtl] .wt-chart-box .dropdown-menu .NAME {
    padding-right: 20px;
}

.wt-chart-box .wt-chart-box-name, .wt-chart-box .wt-chart-box-lifespan {
    font-size: .9rem;
}

.wt-chart-box-lifespan {
    display:none;
}

.wt-chart-box-thumbnail {
    height:100%;
    margin-right:4px;
}

div [class^="menu-chart-"] {
    padding-top: 3px!important;
}

.wt-chart-box-zoom-dropdown div {
    padding: 3px 5px 0 5px!important;
}

div [class^="menu-chart-"] {
    padding-left: 10px!important;
}

[dir=rtl] div [class^="menu-chart-"] {
    padding-right: 10px!important;
}

div [class^="menu-chart-"] a {
    padding-left: 5px;
    vertical-align: top;
    font-size: .83rem!important;
}

[dir=rtl] div [class^="menu-chart-"] a {
    padding-right: 5px;
}

.wt-family-navigator-child  ul span {
    margin: 0 5px;
}

/* Center text on forms */

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

/* widen table for places */
.w-25.list_table {
    width: 35%!important;
}

/* Add horizontal scrolling to small block displays */
.hourglassChart .lineh1 {
    margin-bottom: 0px;
}

/* Add horizontal scrolling to small block displays */
.wt-block-content-todays_events,
.wt-block-content-todo,
.wt-block-content-top10_givnnames,
.wt-block-content-user_messages,
.wt-block-content-user_blog,
.wt-block-content-yahrzeit {
    overflow-y: hidden;
}

/* Add vertical scrolling to small block displays */
.wt-block-content-todays_events,
.wt-block-content-todo,
.wt-block-content-top10_givnnames,
.wt-block-content-user_messages,
.wt-block-content-user_blog,
.wt-block-content-yahrzeit {
    max-height: 500px;
    overflow: scroll;
} 

/* add horizontal scroll bars to Lists */

#place-hierarchy, .indi-list, .fam-list {
    overflow-x: auto;
}

/* touch devices - icons larger */

@media (any-hover: none) {

    .wt-icon-zoom-in, .icon-pedigree {
        width: 35px;
        height: 35px;
    }

    .wt-chart-box .wt-chart-box-name {
        font-size: 16px;
    }

    .icon-plus, .icon-minus {
        width: 18px;
        height: 18px;
    }
}

/* Adjust for various display sizes */

@media (max-width:500px) {
	.img-thumbnail {
		width: 35% !important;
		height: auto;
		display: block;
		margin: auto;
	}

	.col {
		min-width: auto;
	}

	#sidebar {
		width: auto!important;
	}
}

@media (min-width:501px) and (max-width:1679px) {
	.container, .container-lg {
		max-width: 96%;
	}
}

/* The following selector sets the webtrees screen utilization to 75% of the available screen size -- for large screen monitors.
 * If you wish webtrees to uitilize all the available screen then change the max-width: to 100%
 */
@media (min-width: 1680px) {
	.container, .container-lg, .wt-theme-fab .jc-fancy-imagebar {
		max-width: 96%;
	}
}
