/**
 * webtrees: online genealogy
 * Copyright (C) 2023 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 -- */
 
/* set check and radio boxes background for colors theme */

 [dir] .wt-theme-colors .form-check-input:checked {
	background-color: var(--color-1);
	border-color: var(--color-1);
}

[dir] .wt-theme-colors .form-control-check:checked[type=checkbox] {
	accent-color: var(--color-1);
}

[dir] .wt-theme-colors #HTML:checked[type=radio] {
	accent-color: var(--color-1);
}

.wt-theme-colors #PDF:checked[type=radio] {
	accent-color: var(--color-1);
}


/* 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-body {
	padding: .25rem .25rem .25rem 1.25rem;
	}
	
[dir] .card-body dd {
	margin-bottom: 0;
	}
	
/* Inline Individual data for FAB theme */
[dir] .card-body dt {
	clear: both;
	margin-right: 0;
}	

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

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

/* Ensure that custom-css person box sizes only apply to standard webtrees themes */

[class*="wt-theme-c"] .wt-chart .wt-chart-box, /* relationship chart */
[class*="wt-theme-fab"] .wt-chart .wt-chart-box, /* relationship chart */
[class*="wt-theme-minimal"] .wt-chart .wt-chart-box, /* relationship chart */
[class*="wt-theme-webtrees"] .wt-chart .wt-chart-box, /* relationship chart */
[class*="wt-theme-xenea"] .wt-chart .wt-chart-box, /* relationship chart */

[class*="wt-theme-c"] .w-100 td .wt-chart-box, /* compact chart */
[class*="wt-theme-fab"] .w-100 td .wt-chart-box, /* compact chart */
[class*="wt-theme-minimal"] .w-100 td .wt-chart-box, /* compact chart */
[class*="wt-theme-webtrees"] .w-100 td .wt-chart-box, /* compact chart */
[class*="wt-theme-xenea"] .w-100 td .wt-chart-box, /* compact chart */

[class*="wt-theme-c"] .d-flex .wt-chart-box,   /* all other charts */
[class*="wt-theme-fab"] .d-flex .wt-chart-box, /* all other charts */
[class*="wt-theme-minimal"] .d-flex .wt-chart-box, /* all other charts */
[class*="wt-theme-webtrees"] .d-flex .wt-chart-box, /* all other charts */
[class*="wt-theme-xenea"] .d-flex .wt-chart-box /* all other charts */
	{  
	width: 16.25rem; /* 260px */
	height: 5rem; /* 80px */
	line-height: 1.05;
}

.wt-chart .small, .wt-chart-box-facts .small {
	font-size: 11px;
}

.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 {
    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: 12.8px;
    padding: 5px 0;
}

.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: 14px;
}

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: 95%;
	}
}

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

/* Control printing on Facts 
 */
@media print {
	#sidebar, 
	.wt-tabs-individual .nav-item .nav-link,
	.wt-page-menu,
	#add-fact, .wt-quick-facts, .input-group-append,
	.wt-footers,
	.wt-facts-table tbody tr:first-child,
	.accordion .card,
	.story_edit,
	.col-sm-3 .text-center,
	.editfacts 
		{display:none;}
	.col-sm-8 {
		-webkit-box-flex: 0;
		flex: 0 0 96.666667%;
		max-width: 96.666667%;
		}
	.nav-link.active 
		{display: block!important;}
	a:link
		{text-decoration: none;}
}
