/* common.css for styles that I can use in the future for other projects */

/*=====================================
			  	General
=======================================*/

*
{
	box-sizing: border-box;
}

:root {
	--header-color:blue;
	--neutral-color:white;
}

body
{
	font-family: helvetica, arial, sans sans-serif;
	font-size: 100%; 
	/*This is for user to use their own set of browser, user choice*/
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: helvetica, arial, sans sans-serif;
}


header h1,
header p {
	margin: 0;
}

a {
	font-weight: bold;
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

header h1,
header p {
	margin: 0;
}


/*=====================================
			 class container
=======================================*/
.container {
	max-width: 1000px;
	margin-right: auto;
	margin-left: auto;
}

/*=====================================
			  Flex elements
=======================================*/
.flex-parent {
	display: flex;
}

.flex-child {
	flex: 1 1 auto;
}

.flex-none {
	flex: none;
}

.flex-align-center {
	align-items:center;
}
.flex-justify-center {
	justify-content:center;
}

.flex-wrap {
	flex-wrap: wrap;
}

.flex-vertical {
	flex-direction: column;
}

.flex-justify {
	justify-content: space-between;
}

/*=====================================
			  Card element
=======================================*/

.card {
    background-color: white;
    padding: 1em;
    border-radius: 0.3em;
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
    margin-top:1em;
    margin-bottom: 1em;
}
.card>:first-child {
	margin-top:0;
}
.card>:last-child {
	margin-bottom:0;
}

/*=====================================
			  view-window
=======================================*/
.view-window {
	height: 80vh;
	position: relative;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}

.view-window>img {
	max-height: calc(100% - 2em);
	max-width: calc(100% - 2em);
}

.centered-child {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}



/*=====================================
				Deflist
=======================================*/
.deflist {
	margin-top: 0;
	margin-bottom: 0;
	display: flex;
	flex-wrap: wrap;
}

.deflist dt {
	font-weight: bold;
	flex: 0 0 10em;
	text-align: right;
	padding-right: 1em;
}

.deflist dd {
	margin-left: 0;
	flex: 1 1 calc(100% - 10em);
}

/*=====================================
				For Grid
=======================================*/
.well {
	padding:1em;
	background-color:rgba(0,0,0,0.1);
}

.media-image {
	max-width:100%;
}

.hidden {
	display: none;
}

/*=====================================
				Navigation
=======================================*/
.collapsed,
.nav ul {
	list-style-type: none;
	margin-top: 0;
	margin-bottom: 0;
	padding-left: 0;
}

.nav a {
	display: block;
	padding: 0.2em 0.5em;
	text-decoration: none;
	background-color: transparent;
	color: inherit;
}

/*.nav li {
	margin-left: 1.5em;
}*/

.nav a:hover,
.nav .active>a {
	background-color: var(--header-color);
	color: var(--neutral-color);
}

.nav-flex ul,
.nav-flex-full ul,
.nav-pills ul,
.nav-tabs ul,
.nav-crumbs ul {
	display: flex;
}

.nav-flex-full li {
	flex: 1 1 auto;
}

.nav-pills a {
	border-radius: 1em;
	padding: 0.2em 1em;
	border: 2px solid transparent;
}

.nav-pills a:hover {
	border-color: white;
}

.nav-tabs a {
	position: relative;
}

.nav-tabs a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 0;
	background-color: var(--header-color);
	transition: all 300ms;
}

.nav-tabs .active>a {
	background-color: transparent;
	color: var(--header-color);
}

.nav-tabs .active>a::after {
	height: 3px;
}

.nav-crumbs a {
	color:inherit;
	background-color:transparent;
	font-weight:normal;
	display:inline-block; 
}

.nav-crumbs .active>a {
	color:inherit;
	background-color:transparent;
	font-weight:bold;
}

.nav-crumbs li:not(first-child)::before {
	content: '/';
}

.nav-crumbs a:hover {
	color:inherit;
	text-decoration: underline;
	background-color:transparent;
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th, 
.table td {
	text-align: left;
	padding: 0.2em 0.5em;
}

.table.striped tbody tr:nth-child(odd) {
	background-color: rgba(0,0,0,0.1);
}

.table.striped tbody tr:hover {
	background-color: rgba(0,0,0,0.15);
}
/*
.table.lined.horizontal tbody tr {
	border-top: 1px solid black;
}

.table.lined.vertical th:not(:first-child),
.table.lined.vertical td:not(:first-child) {
	border-left:1px solid black;
}

.table.lined.outer {
	border:1px solid black;
}
*/

.table.lined.all tbody tr,
.table.lined.horizontal tbody tr {
	border-top:1px solid black;
}

.table.lined.all th:not(:first-child),
.table.lined.all td:not(:first-child),
.table.lined.vertical th:not(:first-child),
.table.lined.vertical td:not(:first-child) {
	border-left:1px solid black;
}

.table.lined.all,
.table.lined.outer {
	border:1px solid black;
}



/*=====================================
			Checkbox//Toggle
=======================================*/

.toggle {
	display:inline-block;
}

.toggle label {
    display: inline-block;
    width: 2em;
    height: 1em;
    background-color: white;
    border: 0.1em solid #ddd;
    border-radius: 1em;
}

.toggle label::after {
    content: '';
    background-color: #bbb;
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    border-radius: 1em;
    vertical-align: top;
    transition:all 300ms;
    transform:translateX(0);
}

.toggle input:checked + label::after {
	transform:translateX(1em);
}

.daynight label {
	background-color: #888;
	transition:all 0.3s;
}
.daynight label::after {
	background-color: #fff;
	transition: all 0.3s;
}
.daynight input:checked + label {
	background-color: skyblue;
}
.daynight input:checked + label::after {
	background-color: yellow;
}

.checkbox label {
    width: 1em;
  	height: 1em;
    background-color: white;
    border: 0.1em solid #ddd;
    border-radius: 0.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox label::after {
    content: '';
    background-color: #bbb;
    display: block;
    width: 0.6em;
    height: 0.6em;
    border-radius: 0.1em;
    display:none;
    vertical-align: top;
}

.checkbox input:checked + label::after {
	display: block;
}

#nav-menu ~ .nav {
	display:block;
}
[for='nav-menu'] {
	display:none;
}

@media (max-width:700px) {
	#nav-menu ~ .nav {
		display:none;
	}
	[for='nav-menu'] {
		display:block;
	}
	#nav-menu:checked ~ .nav {
		display:block;
		width:100%;
	}
	#nav-menu:checked ~ .nav ul {
		display:block;
		text-align:right;
	}
}

.badge-parent {
	position:relative;
	padding-right:1.5em;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: white;
    width: 1rem;
    height: 1rem;
    text-align: center;
    line-height: 1rem;
    font-size: 0.8em;
    border-radius: 1rem;
    vertical-align: middle;
}

.badge:empty {
	display:none;
}


/*=====================================
					Form
=======================================*/
.form-control {
	margin:0.5em 0;
}
.form-label {
	display:block;
	font-size:0.8em;
	color:#999;
}
.form-input {
	display:block;
	width:100%;
	padding:0.2em 0.5em;
	margin:0;
	border-width:0;
	border-bottom:1px solid #aaa;
	font:inherit;
	outline:0;
	background-color:transparent;
}
.form-button {
	display:block;
	width:100%;
	padding:0.2em 0.5em;
	margin:0;
	border-width:0;
	font:inherit;
	background-color:#eee;
	border-radius:0.2em;
	-webkit-appearance:none;
	outline:0;
}

/*=====================================
			 Spacing
=======================================*/

.margin-top {
	margin-top: 1em;
}

.centered-title {
  text-align: center;
}

/*=====================================
			 Images
=======================================*/
.cover-background-image {
	background-repeat: no-repeat;
	background-size: cover;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

/*=====================================
			 Other Style
=======================================*/
button {
	border-width: 0;
}




