:root {

    --black: #000000;
    --white: #FFFFFF;
		--dark: #181818;

    --blue: #8ff8ff;
    --pink: #913484;
		--medium-violet: #B300FF;
		--dark-violet: #9400d3;
		--darkdark-violet: #320047;

    --deviceHeight: 100vh;
    --deviceWidth: 100vw;


    --lBannerWidth:15vw;
    --lBannerHeight: calc(var(--deviceHeight) - var(--tBannerHeight) - var(--bBannerHeight));

    --rBannerWidth:20vw;
    --rBannerHeight: calc(var(--deviceHeight) - var(--tBannerHeight) - var(--bBannerHeight));

    --tBannerHeight:100px;
    --bBannerHeight:75px;

    --mapWidth: calc(var(--deviceWidth) - var(--lBannerWidth) - var(--rBannerWidth));
    --mapHeight: calc(var(--deviceHeight) - var(--tBannerHeight) - var(--bBannerHeight));



    --mapPisaCittà: "https://www.openstreetmap.org/export/embed.html?bbox=10.349378585815431%2C43.68736345128583%2C10.462675094604494%2C43.74257661763999&amp;layer=mapnik";
    --mapPisaComune: "https://www.openstreetmap.org/export/embed.html?bbox=10.136947631835938%2C43.55949595288937%2C10.590133666992188%2C43.78051390517537&amp;layer=mapnik";
   
		font-size: 15px;
}


body {
    font-family: monospace;
		margin: 0px;
}

.lightTheme {
    background-color: var(--blue);

    --fontColor: var(--black);
    --background: var(--blue);

    --bannerBg: var(--white)
}

.darkTheme {
    background-color: var(--pink);

    --fontColor: var(--white);
    --background: var(--pink);

    --bannerBg:var(--black);

}

header {
	padding: 0 30px;
	text-align: center;
}

h1 {
	font-weight:900;
}

.banner {
    background: var(--bannerBg);
		display: block;
		border: solid black 1px;
}


main {
	display:flex;
	flex-direction: column;
	height: 90vh;
}

.descrizione{
	display:none;
	color:white;
	padding: 5px;
	max-height: 40vh;
	overflow-y: auto;
}

#map {
	flex: 1;
}

/* AREA SELECTION AND services */

.area-scelta{
	display:flex;
	flex-direction:column;
	align-items:left;
}

.scelta{
	padding: 10px;
}

.label-area{
	display: flex;
	align-items: center;
	gap: 1px;
}

.label-area label{
	font-weight:600;
	margin-bottom: 1px;
}

.help-icon{
	display:none;
}

@media (min-width:768px){
	.help-icon{
			display:inline-flex;
			position:relative;
			width:18px;
			height:18px;
			justify-content:center;
			align-items:center;
			border-radius:50%;
			font-size:.75rem;
			color: var(--fontColor);
			cursor:help;
	}

	/* Togliere da sotto la mappa */
	.tooltip{
			position:absolute;
			top:130%;
			left:50%;
			transform:translateX(-50%);
			width:220px;
			padding:.6rem;
			border-radius:8px;
			background:#333;
			color:white;
			font-size:.8rem;
			opacity:0;
			visibility:hidden;
			transition:.2s;
    }

    .help-icon:hover .tooltip{
        opacity:1;
        visibility:visible;
    }
}

.option{
    display:inline-flex;
    align-items:center;
    gap:.4rem;

    padding: 1px 3px;
		margin:1px;

    border:1px solid gray;
    border-radius:2px;

    cursor:pointer;

    user-select:none;
}

.servizi-scelta{
	display:flex;
	flex-wrap: wrap;
}

.servizi-scelta label{
	margin-bottom: 1px;
}

.menu-banner {
	padding: 5px;
	display:flex;
	align-items: center;
	justify-content: space-between;
	width:100%;
	flex-wrap: wrap;
	background-color: var(--bannerBg);
}

/* DISPOSIZIONE NEL DESKTOP */

@media (min-width:768px){
	main {
		flex-direction: row;
	}

	.menu-banner {
		flex: 0 0 auto;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		width:initial;
		flex-wrap:nowrap;
		padding: 10px;
	}

	#map {
		flex: 1 1 auto;
		min-height: 0;
	}

	.descrizione {
		max-width: 300px;
		max-height: initial;
	}

	.servizi-scelta{
		flex-direction: column;
	}

	.opzioni{
		display:flex;
		flex-direction: column;
		flex-wrap: nowrap;
		padding: 2px;
	}

	.scelta {
		padding: 3px;
	}
}

#topBanner {

    position:absolute;

    top:0px;
    left:0px;

		/*Fit to content
    height: var(--tBannerHeight);
		*/
    width: var(--deviceWidth);
}
#bottomBanner{
    position:absolute;

    width: var(--deviceWidth);
    height: var(--bBannerHeight);

    top: calc(var(--deviceHeight) - var(--bBannerHeight));
    left: 0px;
}

label {
    color: var(--fontColor);
}
select {
    background-color: var(--bannerBg);
    color: var(--fontColor);
}




/* ---------- FORM -------------------- */

header {
	display: flex;
	justify-content: space-between;
}

.title-container {
	flex: 1;
}

button.cool {
	border: none;
	background: transparent;
	font-weight: 700;
	cursor: pointer;
	transition: color 0.2s ease, transform 0.1s ease;
	font-size: large;
}

button.dark {	
	color: var(--bannerBg);
}

button.light {
	color: var(--fontColor);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;

    transition: none;
    transform: none;
}

#aggiungi {
	text-transform: uppercase;
	padding-right:10px;
}

#site-title {
	font-size: 50px;
}


button.cool:hover {
	color: violet;
	transform: translateY(-1px);
}

button.cool:active {
	transform: translateY(0px);
}

aside{
	display:none;
	justify-content:center;
	border: 1px solid black;
	background-color: black;
	border-radius: 10px;
	color: var(--fontColor);
	padding: 1px;
}

.form-header {
	text-align:center;
	border: 1px solid violet;
	border-radius: 3px;

	margin: 40px 0;
	padding: 50px;
}

.titolo-form {
	font-size: 30px;
	margin-bottom:20px;
}

form .field {
	margin-bottom: 40px;
}

form .field input[type='text'], input[type='url'], textarea {
	border: 1px solid var(--dark-violet);
	background-color: var(--fontColor);
	color: var(--bannerBg);
	border-radius: 3px;
	width: 100%;
	padding: 7px;
	font-size: 14px;
}

form .field label {
	margin-bottom: 1px;
	font-weight: 600;
}

form .field .form-options label {
	font-weight: normal;
}

form .field .hint {
	margin-top: 2px;
	font-size: 13px;
	color: lightpink;
}

.uppercase {
	text-transform: uppercase;
}

form .form-options {
	display: flex;
	flex-direction: column;
}

form .form-options label {
	flex: 0;
	padding:2px;
}

textarea {
	width: 90%;
	height: 200px;
}

.button-container {
	padding: 10px;
  margin-bottom: 20px;
  display: flex;
  align-content: flex-start;
  justify-content: space-evenly;
  width: 70%;
}

.required {
    color: var(--dark-violet);
    font-weight: normal;
    margin-left: 6px;
		font-size: 80%;
}

/* DESCRIZIONE SERVIZIO ---------------- */

.descrizione .titolo{
	margin-bottom: 2px;
}
.descrizione .indirizzo{
	margin-top:0px;
	color: lightgray;
	font-size: 90%;
}

.descrizione {
	position: relative;
}

.descrizione .X {
	position: absolute;
	right: 5px;
	top: 3px;
	background-color: transparent;
	border: transparent;
	color: white;
	font-size: 25px;
	font-family: monospace;
	cursor: pointer;
}

.X:hover {
	color: lightpink;
}

.recensioni {
	overflow-y: auto;
}

.action-button {
	background-color: var(--darkdark-violet);
	border: solid var(--dark-violet) 1.5px;
	border-radius: 5px;
	font-size: 15px;
	color:white;
	padding: 3px;
	cursor: pointer;
}

.action-button:hover {
	background-color: var(--dark-violet);
}

.action-button:active {
	background-color: var(--violet);
}

.review {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    padding: 1rem;
    margin: 1rem 0;

    border-radius: 8px;

    background-color: #181818;
}

.username {
    margin: 0;
    font-weight: bold;
    font-size: 1.1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
}

.tag {
    padding: 0.2rem 0.6rem;

    background-color: black;
    color: violet;

    border-radius: 999px;

    font-size: 0.85rem;
    font-weight: 600;
}

.review-text {
    margin: 0;
    line-height: 1.5;
}

.date {
    margin: 0;
    align-self: flex-end;

    color: #777;
    font-size: 0.85rem;
}

/* -------- BANNER ------ */
.status-banner {
    position: fixed;
    top: -60px;
    left: 0;
    width: 100%;
    background: #4caf50;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    transition: top 0.4s ease;
    z-index: 9999;
}
.status-banner.show {
    top: 0;
}
.status-banner.local {
	background: orange;
}

