body {
	font-family:Roboto;
	font-size:10pt;
	padding:0px;
	margin:0px;
}

#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0px;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: none;
}

.message {

	width:calc(100% - 50px); /* il calc si può usare, ma il validator non lo riconosce a causa di un bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=18913 */
    display: inline-block;
    margin: 0px 0px 12px;
    padding: 10px;
    border: 1px solid;
    border-radius: 5px;

    box-shadow: 0px 1px 0px #FFCDCF inset, 0px 1px 0px #9D9D9D;
    color:white;
    
}

.message.home {
	display:block;
	width:20%;
	margin:0px auto;
}

.message.success {
	border-color: #498F1B;
	background: #d3f2ae;
	background: -webkit-linear-gradient(#19CC16, #05A900);
	background: -moz-linear-gradient(#19CC16, #05A900);
	background: -ms-linear-gradient(#19CC16, #05A900);
	background: -o-linear-gradient(#19CC16, #05A900);
	background: linear-gradient(#19CC16, #05A900);
	box-shadow: inset 0 1px 0 #56FF64, 0px 1px 0px #9D9D9D;
	
}

.message.error {
    border-color: #BF313B;
    background: -webkit-linear-gradient(#FF6F77, #DC1E24);
	background: -moz-linear-gradient(#FF6F77, #DC1E24);
	background: -ms-linear-gradient(#FF6F77, #DC1E24);
	background: -o-linear-gradient(#FF6F77, #DC1E24);
	background: linear-gradient(#FF6F77, #DC1E24);
}

.img_error {
    width: 16px;
    height: 16px;
    display: block;
    background-image: url(../images/error.png);
    display: inline-block;
    position: relative;
    margin-right:5px;
    vertical-align:middle;
}

.img_success {
    width: 16px;
    height: 16px;
    display: block;
    background-image: url(../images/accept.png);
    display: inline-block;
    position: relative;
    margin-right:5px;
    vertical-align:middle;
}

.search_product_button {
	cursor:pointer;
}

#loading div {
    text-align: center;
    color: white;
    font-size: 30pt;
    font-weight: 100;
    text-shadow: 0px 2px 4px #0E0E0E;
    margin-top: 100px;
}

.title_dispensa {
	text-align:center;
}

.icon {
	width: 100px;
	height: 100px;
	margin-bottom:2px;
	border-radius: 18px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	position:relative;
	background: white;
	box-shadow: 0 0 0 1px rgba(134, 254, 101, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
	overflow: hidden;
}

.icon.add {
	background: -webkit-linear-gradient(#FF4E4A, #DB0000);
	background: -moz-linear-gradient(#FF4E4A, #DB0000);
	background: -ms-linear-gradient(#FF4E4A, #DB0000);
	background: -o-linear-gradient(#FF4E4A, #DB0000);
	background: linear-gradient(#FF4E4A, #DB0000);
	border:3px solid white;
	font-size:55pt;	
}

.icon.add a {
	display:block;
	width:100%;
	height:100%;	
}


.icon img {
    position: absolute;
    left: -100%;
    right: -100%;
    top: -100%;
    bottom: -100%;
    margin: auto;
    min-height: 20%;
    min-width: 20%;
    
    max-height:190%;
    max-width:190%;
    
    
}

.icon.add img {
	position: absolute;
	left: -100%;
	right: -100%;
	top: -100%;
	bottom: -100%;
	margin: auto;
	min-height: 20%;
	min-width: 20%;
	
	max-height:60%;
	max-width:60%;
	
	
}

#photo_file {
    cursor: pointer;
    height: 100%;
    position:absolute;
    top: 0;
    right: 0;
    
    font-size:100px;
    opacity: 0;
    filter: alpha(opacity=0); 
}

#dispensa {
	background:url(../images/cupboard.jpg);
	background-size:contain;
	background-repeat:no-repeat;
	width:410px;
	height:600px;
	padding:100px 280px 50px 310px;
	margin:0px auto;
}

#dispensa.dispensa_chiusa {
	background:url(../images/cupboard_close.jpg);
	background-size:contain;
	background-repeat:no-repeat;
}

#dispensa.dispensa_chiusa a{
	color:black;
	text-decoration:none;
}

#dispensa .add_product td:first-child {
	width:30%;
}
#dispensa .add_product td:last-child {
	width:70%;
}
#dispensa .add_product input[name="qta_product"] {
	width:30px;
}

#dispensa ul {
	list-style:none;
	margin:0px;
	padding:0px;
}

#dispensa ul li {
	position: relative;
	display: inline-block;
	width: 100px;
	height:165px;
	font-size:9pt;
	font-weight:bold;
	color:white;
	text-shadow:0px 1px 2px black;
	text-align: center;
	margin: 20px 12px 15px 12px;
	vertical-align:top;
}

#dispensa ul li a {
	color:white;
	text-decoration:none;
}

#dispensa ul li .qta {
	position:absolute;
	top:-10px;
	right:-10px;
	background: -webkit-linear-gradient(#FF4E4A, #DB0000);
	background: -moz-linear-gradient(#FF4E4A, #DB0000);
	background: -ms-linear-gradient(#FF4E4A, #DB0000);
	background: -o-linear-gradient(#FF4E4A, #DB0000);
	background: linear-gradient(#FF4E4A, #DB0000);
	border-radius:20px;
	padding:5px 9px;
	border:3px solid white;
	z-index:1;
}

#dispensa ul li .qta.edit {
	left:-10px;
	right:auto;
	padding:0px;
}

#dispensa ul li .qta.edit a {
	display:block;
	padding:5px 6px;
	padding-bottom:4px;
}



#dispensa.options input[name="hh_spesa"], #dispensa.options input[name="mm_spesa"], #dispensa.options input[name="notify_email_value"], #dispensa.options input[name="notify_popup_value"], #dispensa.options input[name="threshold_notify"] {
	width:30px;
}

#dispensa.options .google_image {
	width:32px;
	height:32px;
	border-radius:32px;
	vertical-align:middle;
	margin: 0px 10px;
}

.dispensa_paginator {
    text-align:center;
    margin-bottom:20px;
}

.dispensa_paginator .page {
    display: inline-block;
    padding: 5px 9px;
    margin-right: 4px;
    border-radius: 3px;
    border: solid 1px #c0c0c0;
    background: #e9e9e9;
    box-shadow: inset 0px 1px 0px rgba(255,255,255, .8), 0px 1px 3px rgba(0,0,0, .1);
    font-size: 9pt;
    font-weight: bold;
    text-decoration: none;
    color: #717171;
    text-shadow: 0px 1px 0px rgba(255,255,255, 1);
}

.dispensa_paginator .page:hover {
    background: #fefefe;    
    background: -webkit-linear-gradient(#FEFEFE, #f0f0f0);
	background: -moz-linear-gradient(#FEFEFE, #f0f0f0);
	background: -ms-linear-gradient(#FEFEFE, #f0f0f0);
	background: -o-linear-gradient(#FEFEFE, #f0f0f0);
	background: linear-gradient(#FEFEFE, #f0f0f0);
    
}

.dispensa_paginator .page.active {
    border: none;
    background: #9A9A9A;
    box-shadow: inset 0px 0px 8px rgba(0,0,0, .5), 0px 1px 0px rgba(255,255,255, .8);
    color: #f0f0f0;
    text-shadow: 0px 0px 3px rgba(0,0,0, .5);
}

.dispensa_paginator .page {
    background: #f8f8f8;    
    background: -webkit-linear-gradient(#f8f8f8, #e9e9e9);
	background: -moz-linear-gradient(#f8f8f8, #e9e9e9);
	background: -ms-linear-gradient(#f8f8f8, #e9e9e9);
	background: -o-linear-gradient(#f8f8f8, #e9e9e9);
	background: linear-gradient(#f8f8f8, #e9e9e9);
}

.menu {
	text-align:center;
	position:relative;
	bottom:20px;
}

.menu a {
	color:#292929;
	text-decoration:none;
}



@media only screen and (min-width: 240px) and (max-width: 667px) {
	.icon {
		width: 100%;
		height: 0;
		padding-bottom: 100%;
		margin-bottom:2px;
		border-radius: 18px;
		position:relative;
		background: white;
		box-shadow: 0 0 0 1px rgba(134, 254, 101, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
		overflow: hidden;
	}
	
	.icon.add {	
		padding-bottom: calc(100% - 6px);
		background:#DB0000;
		background: -webkit-linear-gradient(#FF4E4A, #DB0000);
		background: -moz-linear-gradient(#FF4E4A, #DB0000);
		background: -ms-linear-gradient(#FF4E4A, #DB0000);
		background: -o-linear-gradient(#FF4E4A, #DB0000);
		background: linear-gradient(#FF4E4A, #DB0000);
		border:3px solid white;
	}
	
	#dispensa {
		background:url(../images/cupboard_responsive.jpg);
		background-size:contain;
		background-repeat:no-repeat;
		width:calc(100% - 30px);
		height:130vw;
		padding:20vw 15px 15vw 15px;
		margin:0px auto;
	}

	#dispensa.dispensa_chiusa {
		background:url(../images/cupboard_close_responsive.jpg);
		background-size:contain;
		background-repeat:no-repeat;
	}
	
	#dispensa ul li {
		position: relative;
		display: inline-block;
		width: calc((100% / 3) - 27px);
		height:40vw;
		font-size:9pt;
		font-weight:bold;
		color:white;
		text-shadow:0px 1px 2px black;
		text-align: center;
		margin: 3vw 12px 3vw 12px;
		vertical-align:middle;
	}
	
	#dispensa.dispensa_chiusa .icon {
		width: 70%;
		height: 0;
		padding-bottom: 70%;
	}
}
