* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	display: grid;
	height: 100vh;
	grid-template-rows: auto 1fr auto;
	font-family: "Exo 2", sans-serif;
	font-size: 16px;
	background-image: url(http://www.toptuning.it/wp-content/uploads/2022/12/sfondo-scelta-scaled.jpg);
	background-position: center;
	background-size: cover;
}

header {
	padding: 5px;
	text-align: center;
	/* background: black; */
}

.ar_logo {
	display: block;
	max-width: 100%;
	height: 50px;
	text-align: center;
	margin: auto;
}

main {
	overflow-y: auto;
}

footer {
	height: 50px;
	background-color: black;
	text-align: center;
	color: white;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: center;
	align-items: center;
	font-size: 0.65rem;
}

.card {
	border-radius: 10px;
	box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);
	padding: 20px;
	background-color: white;
}

.card h2 {
	margin-bottom: 20px;
	text-align: center;
}

.hidden {
	display: none !important;
}

/*
* Login Form
*/
.login_form {
	display: flex;
	padding: 50px 20px;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: center;
	align-items: center;
	height: 100%;
}

.login_form .card {
	width: 400px;
	max-width: 100%;
}

.login_form form {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
	gap: 15px;
}

.input_icon {
	width: 100%;
	position: relative;
	border-radius: 50px;
	overflow: hidden;
	padding: 10px;
	padding-left: 10px;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	cursor: text;
	border: 1px solid rgba(0, 0, 0, 0.3);
	transition: border 0.3s ease;
}

.input_icon:focus-within {
	border-color: #da0000;
}

.input_icon input {
	background: transparent;
	border: none;
	color: black;
	flex: 1;
	outline: none;
	padding: 0;
}

.input_icon svg {
	fill: black;
	transition: fill 0.3s ease;
}

.input_icon:focus-within svg {
	fill: #da0000;
}

button[type="submit"] {
	padding: 10px 25px;
	width: 150px;
	max-width: 100px;
	text-align: center;
	border-radius: 50px;
	font-weight: bold;
	cursor: pointer;
	border: 1px solid #da0000;
	background-color: #da0000;
	color: white;
	transition: background-color 0.3s ease, color 0.3s ease;
}

button[type="submit"]:hover {
	color: #da0000;
	background-color: transparent;
}

.error {
	font-size: 0.8rem;
	margin-top: -10px;
	color: #da0000;
	font-weight: bold;
	font-style: italic;
}

.error:empty {
	display: none;
}

/*
* Main Page
*/
.main_page {
	padding: 100px min(150px, 8%);
	height: 100%;
	display: grid;
	grid-template-columns: 3fr 5fr;
	gap: 30px;
}

.main_page .card {
	height: 100%;
	border-radius: 10px;
	box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);
	padding: 20px;
	background-color: white;
	overflow: hidden;
	display: grid;
	grid-template-rows: auto 1fr;
}

.calendar-wrapper {
	display: grid;
	grid-template-columns: 3fr 2fr;
	gap: 20px;
	overflow: hidden;
}

#ns_calendar {
	display: none;
}

.calendar .daterangepicker {
	position: static;
	margin: 0;
	border: none;
	display: block !important;
}

.calendar .daterangepicker .drp-calendar {
	float: unset;
	width: 100%;
	max-width: unset;
	padding: 0;
}

.calendar .daterangepicker .drp-calendar .calendar-table {
	padding: 0;
}

.calendar .daterangepicker td.active,
.calendar .daterangepicker td.active:hover {
	background-color: #da0000;
}

.calendar .daterangepicker td.off.active,
.calendar .daterangepicker td.off.active:hover {
	background-color: #da000040;
	color: white;
}

.calendar .daterangepicker td.hasEvents {
	position: relative;
	overflow: hidden;
}

.calendar .daterangepicker td.hasEvents:after {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 7px;
	aspect-ratio: 1;
	background: #da0000;
	content: "";
	clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.calendar .daterangepicker td.off.hasEvents:after {
	opacity: 0.5;
}

.calendar .daterangepicker td.active.hasEvents:after {
	background-color: white;
}

.calendar-events--header {
	position: sticky;
	top: 0;
	padding: 10px;
	text-align: center;
	background: rgb(229 229 229);
}

.calendar-events {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
}

.calendar-events--content {
	padding: 15px;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: stretch;
	gap: 30px;
	height: 100%;
	overflow: auto;
}

.event {
	padding: 5px;
	background: #f5f5f5;
	border-radius: 5px;
}

.event .event-title {
	margin-bottom: 5px;
}

.event-content ul,
.event-content li {
	list-style-position: inside;
	margin-left: 10px;
}

.links,
.response-links {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-content: flex-start;
	align-items: flex-start;
	gap: 15px;
	justify-content: flex-start;
	height: 100%;
}

.links a,
.response-links a {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: flex-start;
	justify-content: flex-start;
	align-items: center;
	gap: 14px;
	padding: 10px;
	color: black;
	text-decoration: none;
	font-style: italic;
	transition: color 0.3s ease, fill 0.3s ease;
}

.links .link-spacer {
	flex: 1;
}

.links a:hover,
.response-links a:hover {
	color: #da0000;
	fill: #da0000;
}

.links a.link-red,
.response-links a.link-red {
	color: #da0000;
	fill: #da0000;
}

.card-breadcrumbs {
	text-align: center;
	font-style: italic;
	font-size: 0.9rem;
	margin: 10px 0 15px;
}

.card-breadcrumbs a {
	font-weight: bold;
	text-decoration: none;
	color: black;
}

.card-breadcrumbs a:hover {
	color: #da0000;
	fill: #da0000;
}

.intervento {
	height: 100%;
	padding: 50px 20px;
}

.intervento .card {
	max-width: 1200px;
	margin: auto;
}

.card .card-header:has(.card-breadcrumbs) h2 {
	margin-bottom: 5px;
}

fieldset {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	padding: 15px;
}

fieldset + fieldset {
	margin-top: 25px;
}

fieldset legend {
	font-style: italic;
	font-weight: bold;
}

label,
fieldset label {
	display: inline-flex;
	gap: 10px;
	padding: 5px;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
}

label label,
fieldset label label {
	padding: 0;
}

label input,
fieldset label input,
.last label input {
	padding: 5px;
	border: 1px solid rgba(0, 0, 0, 0.3);
}

label select,
fieldset label select {
	padding: 5px 15px;
	border: 1px solid rgba(0, 0, 0, 0.3);
}

label textarea,
fieldset label textarea {
	width: 100%;
	display: block;
	height: 120px;
	padding: 5px;
	border: 1px solid rgba(0, 0, 0, 0.3);
}

label:has(textarea),
fieldset label:has(textarea) {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
}

fieldset .btn {
	padding: 15px;
	text-align: center;
}

fieldset .btn span {
	cursor: pointer;
}

fieldset section {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-content: flex-start;
	justify-content: flex-start;
	align-items: flex-start;
	padding-top: 20px;
}

.last {
	margin-top: 25px;
}

.errors-display {
	padding: 20px;
	border: 1px solid red;
	border-radius: 5px;
	background: #ff000040;
	margin: 20px 0;
}

.errors-display h4 {
	font-size: 1.3em;
}

.errors-display .errors {
	margin: 20px 0 0 20px;
	line-height: 1.6em;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.errors-display .errors li span {
	padding: 2px 10px;
	background: red;
	border-radius: 10px;
	color: white;
	font-weight: bold;
	display: inline-block;
	font-style: italic;
}

.centralina_maps {
	display: grid;
	grid-template-columns: auto 1fr;
	align-content: space-between;
	justify-content: start;
	align-items: start;
	justify-items: start;
}

.centralina_maps input {
	border: none;
	color: red;
	font-weight: bold;
	font-family: "Exo 2", sans-serif;
	font-size: 30px;
	padding: 5px;
	outline: none;
	cursor: default;
}

map area {
	cursor: pointer;
}

.last button[type="submit"] {
	margin-top: 25px;
	display: inline-block;
}

button[type="submit"]:disabled {
    opacity: 0.5;
    background-color: #333;
    border-color: #333;
    pointer-events: none;
}

/*
* Archivio
*/

.archivio {
	overflow: hidden;
	padding: 20px;
	height: 100%;
}

.archivio-wrapper {
	height: 100%;
	overflow-y: auto;
}

.archivio .card {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
	height: 100%;
}

.archivio table {
	width: 100%;
	border-collapse: collapse;
}

.archivio table th {
	background: black;
	color: white;
	padding: 10px 20px;
	border: 1px solid black;
}

.archivio table td {
	padding: 8px 20px;
	border: 1px solid;
	text-align: center;
}

.archivio table thead {
	position: sticky;
	top: -1px;
}

.archivio-filters {
	padding-bottom: 25px;
	padding-top: 10px;
}

.archivio table tbody tr:hover {
	background: #00000010;
}

.archivio table .delete_intervento {
	cursor: pointer;
}

.archivio table .delete_intervento:hover {
	fill: #da0000;
}

button[type="reset"] {
	padding: 7px 15px;
	text-align: center;
	border-radius: 50px;
	font-weight: bold;
	cursor: pointer;
	border: 1px solid #da0000;
	background-color: white;
	color: #da0000;
}

button[type="reset"]:hover {
	background-color: #da0000;
	color: white;
}

.response {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: center;
	align-items: center;
	height: 100%;
	padding: 20px;
}

.response-content {
	padding: 20px;
	border: 1px solid #009eff;
	border-radius: 5px;
	background: #009eff40;
	margin: 20px 0;
}

.response-display {
	padding: 20px;
	border: 1px solid red;
	border-radius: 5px;
	background: #ff000040;
	margin: 20px 0;
}

.loader.hidden {
    display: none;
}

.loader {
    display: inline-block;
    aspect-ratio: 1;
    height: 17px;
    background: transparent;
    border-radius: 100%;
    border: 2px solid #da0000;
    border-left-color: transparent;
    animation: rotate 1s linear infinite;
    top: 5px;
    position: relative;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}