/* 
Color palette
1b262c => 27, 38, 44
0f4c75 => 15, 76, 117
3282b8 => 50, 130, 184
bbe1fa => 187, 225, 250
*/

/* @font-face {
	font-family: 'Cabin-Regular';
	src: url('../fonts/Cabin-Regular-TTF.eot');
	src:  url('../fonts/Cabin-Regular-TTF.woff') format('woff'), url('../fonts/Cabin-Regular-TTF.ttf') format('truetype'), url('../fonts/Cabin-Regular-TTF.svg') format('svg');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Cabin-Bold';
	src: url('../fonts/Cabin-Bold-TTF.eot');
	src:  url('../fonts/Cabin-Bold-TTF.woff') format('woff'), url('../fonts/Cabin-Bold-TTF.ttf') format('truetype'), url('../fonts/Cabin-Bold-TTF.svg') format('svg');
	font-weight: normal;
	font-style: normal;
} */
html {
	height: 100%;
}

body {
	font-size: 1em;
	height: 100%;
	font-family: Arial, Helvetica, sans-serif;
}

a,
a:link,
a:visited,
a:hover,
a:active {
	color: inherit;
}

main a {
	text-decoration: none;
}

main section {
	margin-bottom: 3em;
}

.icons a {
	text-decoration: none;
}

body.offline .online-only {
	display: none;
}


h1 {
	font-size: 1.5em;
}

header {
	position: fixed;
	width: 100%;
	height: 7em;
	font: bold 1em sans-serif;
	color: #f5f5f5;
	background-color: #0f4c75;
	top: 0;
	z-index: 1000;
}

header .container {
	height: 3em;
	display: flex;
	/* establish flex container */
}


header .container>div {
	padding: 0 0.5em;
	line-height: 3em;
}

header #logo {
	width: 60%;
	overflow: hidden;
}

header #status {
	width: 40%;
	text-align: center;
}


#status.ok {
	background: #4CAF50;
}


#status.info {
	background: lightblue;
}

#status.warning {
	background: orange;
}

#status.error {
	background: red;
}

nav {
	width: 100%;
	display: flex;
	height: 4em;
	align-items: center;
}

/* nav a.active, nav a:visited, nav a:hover, nav a:active { */
nav a {
	opacity: 0.2;
}

/* nav a.active, nav a.active:visited, nav a.active:hover, nav a.active:active { */
nav a.active {
	color: #f5f5f5;
	opacity: 1;
}

nav .element {
	width: 50%;
	text-align: center;
	font-size: 1.5em;
}



main {
	padding: 8em 1em 1em 1em;
	color: #303030;
}

main .tiles {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	flex-wrap: wrap;
}

main .items {
	padding-bottom: 2em;
}

/* Shop tiles  */
.tile {
	width: 20%;
	background-color: #f5f5f5;
	color: black;
	padding: 1em;
	text-align: center;
	height: auto;
	margin-bottom: 1em;
	border-radius: 10px;
	position: relative;
}

.tile:before {
	content: '';
	float: left;
	padding-top: 100%;
}

.tile img {
	max-height: 50px;
}

.tile .name {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	overflow: hidden;
	white-space: nowrap;
}

.tile a {
	text-decoration: none;
}

.tile-list {
	border-radius: 0 0 12px 12px;
	display: grid;
	row-gap: 10px;
}

.tile-list article,
.tile-list li {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 20px;
	align-items: center;
	padding: 10px 30px 10px 10px;
	overflow: hidden;
	border-radius: 10px;
	box-shadow: 3px 5px 5px 0px rgba(51, 51, 51, 0.23);
	cursor: pointer;
}

.tile-list article.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tile-list article:hover,
.tile-list li:hover {
	box-shadow: 0 9px 47px 11px rgba(51, 51, 51, 0.18);
}

.tile-list article div.name {
	width: 95%;
	overflow: hidden;
}

.tile-list article a,
.tile-list li a {
	display: block;
}

.tile-list article a.external-link {
	position: absolute;
	right: 10px;
	top: 10px;
}

.list-item>div {
	box-sizing: border-box;
	display: inline-block;
}

.list-item .name {
	overflow: hidden;
	vertical-align: bottom;
}

.list-item .icon {
	width: 10%;
}

.list-item.purchased {
	opacity: 0.3;
}

.list-item.purchased .icon i.fa-shopping-cart {
	display: none;
}

/* .list-item.buy .icon i.fa-check-square {
	display: none;
} */

.shop-title:not(:first-child) {
	margin-top: 3em;
}

.shop-title {
	width: 96%;
	white-space: nowrap;
}

.shop-title>div {
	display: inline-block;
	height: 2em;
	box-sizing: border-box;
}

.shop-title .image {
	width: 30%;
}

.shop-title .image img {
	height: 2em;
	vertical-align: middle;
}

.shop-title .name {
	width: 70%;
	text-align: right;
}

.shopping-list-item,
.shop-item {
	width: 100%;
	white-space: nowrap;
	line-height: 2em;
	background-color: white;
	border-bottom: 1px solid #DEDEDE;
	padding: 2% 0;
}


div.title-row {
	display: flex;
	justify-content: space-between;
	background: #bbe1fa;
	padding: 0.4em;
	margin-bottom: 1em;
	border-radius: 10px;
}

div.title-row .icon:first-of-type {
	margin-left: auto;
}

div.title-row .icon {
	font-size: 1.5em;
	padding-left: 1em;
}

.route--list-single h1 {
	display: inline;
}

form label {
	/* display: block; */
	margin-top: 1em;
	display: inline-block;
}

form input,
form select {
	width: 100%;
	line-height: 2em;
	padding: 0.5em 0;
	border: none;
	background-color: inherit;
	color: #303030;
}

form select option.hidden {
	display: none;
}


form input {
	border-bottom: 1px solid black;
}

form label {
	font-size: 0.8em;
	padding-left: 4px;
	color: gray;
}

textarea:focus,
input:focus {
	outline: none;
}

button[type=button],
button[type=submit],
button[type=reset] {
	background-color: #4CAF50;
	border: none;
	color: white;
	padding: 1em 1em;
	text-decoration: none;
	cursor: pointer;
	width: 100%;
	margin-top: 1em;
	border-radius: 10px;
}

input[type="checkbox"] {
	position: relative;
	width: 40px;
	height: 20px;
	visibility: hidden;
	margin-left: 1em;
}

input[type="checkbox"]:before {
	visibility: visible;
	position: absolute;
	display: block;
	width: 100%;
	height: 20px;
	top: 0;
	background: #fff;
	content: '';
	border-radius: 10px;
	border: solid 1px #ddd;
	transition: all 0.5s;
}

input[type="checkbox"]:after {
	visibility: visible;
	top: 0;
	display: block;
	content: '';
	width: 20px;
	height: 20px;
	background: #fff;
	position: absolute;
	border-radius: 50%;
	border: solid 1px #ddd;
	transition: all 0.5s;
	left: 0;
}

input[type="checkbox"]:checked:after {
	left: 100%;
	margin-left: -20px;
}

input[type="checkbox"]:checked:before {
	background: #2ecc71;
}

input[type="checkbox"].square {
	width: 60px;
	-moz-appearance: initial;
}

input[type="checkbox"].square:before {
	border-radius: 2px;
}

input[type="checkbox"].square:after {
	border-radius: 2px;
	width: 30px;
}

input[type="checkbox"].square:checked:after {
	left: 100%;
	margin-left: -30px;
}

input[type="checkbox"].square:checked:before {
	background: rgb(15, 76, 117);
}

input[type="color"] {
	height: 60px;
	width: 60px;
	margin-left: 1em;
	border-bottom: none;
}

/* autocomplete */
#item_name_autocomplete-list {
	position: absolute;
	width: 65%;
	background-color: #3282b8;
	/*
	0f4c75 => 15, 76, 117
3282b8 => 50, 130, 184
bbe1fa => 187, 225, 250
*/
	padding: 0 2%;
	color: white;
}

#item_name_autocomplete-list>div {
	line-height: 2.5em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}





/* input[type="checkbox"] {  
	width: inherit;
	transform: scale(2);
	margin: 0 0 0.2em 1em;
} */

/* label[for=shopping_list_showInShop] {
	display: inline-block;
} */

.add-edit-list-item form {
	padding-bottom: 1em;
}

.add-edit-list-item form .row {
	margin: 0.5em 0;
}

.add-edit-list-item form .col {
	display: inline-block;
}

.add-edit-list-item form .col.amount {
	width: 18%;
	margin-right: 5%;
}

.add-edit-list-item form .col.name {
	width: 75%;
}

.add-edit-list-item form .col.section,
.add-edit-list-item form .col.shop,
.add-edit-list-item form .col.shopping-list {
	width: 75%;
	margin-right: 5%;
}

.add-edit-list-item form .col.add {
	width: 18%;
}

hr {
	margin: 3em 0;
}