/* style.css */

:root {
	--main-color: #0277B2;
	--light-color: #0DC3ED;
	--mid-color: #0099D8;
}

body {
	font-family: Helvetica, sans-serif;
	margin: 20px;
	padding: 20px;
	margin-top: 0;
	padding-top: 0;
	background: #f5f5f5;
	background-image: url('./img/bg.png');
	background-size: cover;
	background-repeat: no-repeat;
	min-height: 100vh;
}

section {
	max-width: 1200px;
	margin: 0 auto;
}

.section-instructions {
	font-weight: 300;
	font-style: italic;
}

.boxed {
	width: 70%;
	margin: 0 auto;
}

.intro {
	color: var(--main-color);
}


.intro .boxed.colored {
	/* color: var(--main-color); */
	background: #D9F0FC;
	color: var(--main-color);
	padding: 30px;
	font-size: 18px;


	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);

}

header {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
	height: 240px;
	width: calc(100% + 80px);
	margin-left: -40px;
	background: #fff;
	box-shadow: #1d1d1d10 0px 0px 10px;
	background-image: url('./img/gradient.png');
	background-size: cover;
	background-repeat: no-repeat;
	position: relative;
}

.intro {
	margin: 0 auto;
	width: calc(100% - 60px);
}

.main-logo {
	width: auto;
	height: 90%;
	margin: 0 auto;
	margin-right: auto;
	margin-left: 60px;
}

.info-img {
	height: 100%;
	width: auto;
	display: block;
	position: absolute;
	right: 0;
}

h1 {
	text-align: center;
}

h2 {
	font-size: 1.25em;
}

.form-info {
	font-weight: normal;
	margin-bottom: 20px;
}

form {
	max-width: 1200px;
	margin: 0 auto;
	margin-top: 40px;
	padding: 20px 0;
	display: flex;
	flex-direction: column;
	font-family: Helvetica, sans-serif;
}

.form-line {
	display: flex;
	flex-direction: column;

	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
}

.counter {
	color: var(--main-color);
	font-weight: bold;
}



label {
	display: block;
	font-weight: bold;
	color: var(--main-color);
	font-size: 20px;
	display: block;
}

.form-el {
	width: 70%;
	margin-bottom: 20px;
}

textarea,
input[type="email"],
select,
input[type="file"],
input[type="text"] {
	width: 100%;
	padding: 8px;
	margin: 5px 0;
	border: none;
	border-radius: 0 20px 0 20px;
	box-sizing: border-box;
	font-size: 1em;
	background-color: #ffffffde;
	color: #1c1c1c;
	font-family: Arial, sans-serif;
}

textarea,
input[type="file"] {
	height: 100px;
	/* not resize */
	resize: none;
}

textarea,
input,
select {
	box-shadow: -1px -1px 0 3px var(--main-color);
}

/* remove outline on selection */
textarea:focus,
input:focus,
select:focus {
	outline: none;
}

.counter {
	text-align: right;
	font-size: 0.9em;
	margin-bottom: -16.5px;
}

.counter.exceeded {
	color: red;
}

button {
	margin-top: 20px;
	padding: 10px 20px;
	font-size: 24px;
	font-weight: bold;
	margin-left: auto;
	border: none;
	border-radius: 0 20px 0 20px;
	box-shadow: -1px -1px 0 3px var(--main-color);
	background-color: #fff;
	color: var(--main-color);
	cursor: pointer;
}

button:hover {
	background-color: var(--main-color);
	box-shadow: -1px -1px 0 3px var(--main-color);
	color: #fff;
}

/* Custom select styling */
.custom-select {
	position: relative;
	display: block;
	width: 100%;
	border-radius: 0 20px 0 20px;
	box-shadow: -1px -1px 0 3px var(--main-color);
	background-color: #fff;
	cursor: pointer;
	padding: 8px 0;
	margin-top: 5px;
}

/* Nasconde il select originale */
.custom-select select {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	z-index: 2;
	cursor: pointer;
	pointer-events: none;

}

/* Testo selezionato */
.selected-option {
	display: block;
	color: var(--main-color);
	padding: 0 10px;
	padding-right: 30px;
	font-weight: normal;
}

/* Freccia */
.custom-select::before {
	content: "▼";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--main-color);
}

/* Lista delle opzioni custom */
.custom-options {
	position: absolute;
	top: 100%;
	left: -4px;
	right: -2px;
	background: #fffffff8;
	border-color: var(--main-color);
	border-style: solid;
	border-width: 0 2px 2px 4px;
	border-top: none;
	z-index: 999;
	display: none;
	max-height: 390px;
	overflow-y: auto;
	border-radius: 0 0 20px 20px;
	/* box-shadow: -1px 1px 0 3px var(--main-color); */
}

/* Stile delle opzioni custom */
.custom-option {
	padding: 18px 10px;
	cursor: pointer;
	color: var(--main-color);
	font-size: 16px;
	transition: background 0.2s ease-in-out;
}

option b {
	font-weight: bold;
}

form h3 {
	color: var(--main-color);
	font-size: 30px;
	margin-bottom: 0;
	width: 70%;
	margin-left: 0;
}

form p {
	color: var(--main-color);
	font-size: 16px;
	font-weight: bold;
	width: 70%;
}


/* Hover sulle opzioni */
.custom-option:hover {
	background-color: var(--main-color);
	color: #fff;
}

/* styling input file btn */
#allegati {
	color: var(--main-color);
}

.custom-file-button {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 0 20px 0 20px;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	text-align: center;
	background-color: #fff;
	color: var(--main-color);
	margin-top: 4px;
	transition: background-color 0.3s, color 0.3s;
	/* border with different px */
	border-color: var(--main-color);
	border-style: solid;
	border-left-width: 4px;
	border-top-width: 4px;
	border-right-width: 2px;
	border-bottom-width: 2px;
}

.custom-file-button:hover {
	background-color: var(--main-color);
	color: #fff;
}

.file-list {
	margin-top: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.file-preview {
	position: relative;
	width: 100px;
	text-align: center;
}

.file-preview:hover .remove-file {
	display: block;
}

.file-preview:hover img {
	opacity: 0.5;
	filter: grayscale(100%);
	cursor: pointer;
}

.file-preview img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ccc;
}

.file-preview .file-name {
	font-size: 0.8em;
	margin-top: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-bottom: 15px;
}

.remove-file {
	display: none;
	text-align: center;
	font-size: 10px;
	color: #1c1c1c;
	font-weight: normal;
	margin: 0;
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
}

.mobile-remove-advice {
	display: none;
	font-size: 12px;
	color: #1c1c1c;
	margin: 10px 0;
	font-weight: normal;
}

.upload-progress {
	width: 100%;
	height: 8px;
	background: #eee;
	border-radius: 4px;
	margin-top: 10px;
	overflow: hidden;
}

.upload-bar {
	height: 100%;
	width: 0%;
	background: #4caf50;
	transition: width 0.3s ease;
}

button {
	transition: background-color 0.3s, color 0.3s;
}

form label em {
	font-weight: 300;
	font-size: 0.7em;
	display: block;
}



#file-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}



.success-message,
.error-message {
	color: var(--main-color);
	text-align: center;
	font-size: 2rem;
	flex-wrap: balance;
	padding: 30px;
}

.error-message {
	color: red;
}

form .error-message {
	font-size: 16px;
	text-align: left;
	padding: 10px 0;
}


/* Stile per l'editor WYSIWYG */
.wysiwyg-wrapper {
	margin-bottom: 20px;
}

.wysiwyg-editor {
	border-radius: 0 20px 0 20px;
	background-color: #fff;
	box-shadow: -1px -1px 0 3px var(--main-color);
	margin-top: 5px;
	margin-bottom: 5px;
}

/* Toolbar */
.editor-toolbar {
	background-color: #f5f5f5;
	border-bottom: 1px solid #ccc;
	padding: 5px;
	display: flex;
	gap: 5px;
	border-top-left-radius: 0;
	border-top-right-radius: 20px;
}

/* Pulsanti della toolbar */
.editor-toolbar button {
	background-color: #fff;
	border: 1px solid #ccc;
	padding: 5px 10px;
	cursor: pointer;
	font-size: 16px;
	border-radius: 4px;
	transition: background-color 0.3s, color 0.3s;
}

.editor-toolbar button:hover {
	background-color: var(--main-color);
	color: #fff;
}

/* Area di editing */
.editor-content {
	min-height: 150px;
	padding: 10px;
	outline: none;
	overflow-y: auto;
}

/* Se il testo supera il limite (opzionale, se hai un contatore) */
.counter.exceeded {
	color: red;
}

sup,
sub {
	font-size: 0.7em;
}

.t-icon {
	width: auto;
	height: 100%;
}

.editor-toolbar {
	display: flex;
	justify-content: space-around;
	align-items: center;
}

.wysiwyg-editor button {
	border: none;
	border-radius: 0;
	box-shadow: none;
	width: 25px;
	height: 25px;
	transition: none;
	background-color: transparent;
	margin: 0;
	color: #464646;
}

.wysiwyg-editor button:hover {
	color: #000;
	background-color: transparent;
}

.tec {
	color: #1d1d1d;

}

.upload-bar-container {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	position: relative;
}

.upload-progress {
	display: none;
	position: relative;
	width: 100%;
	height: 8px;
	background: #eee;
	border-radius: 4px;
	margin-top: 10px;
	/* overflow: hidden; */
}

.upload-bar {
	height: 100%;
	width: 0%;
	background: #4caf50;
	transition: width 0.3s ease;
}

.upload-percent {
	display: none;
	position: absolute;
	top: -20px;
	right: 0;
	font-size: 0.8em;
	color: #0277B2;
	font-weight: bold;
}

#submitBtn {
	float: right;
}

.deadline {
	margin-top: 40px;
}

table,
th,
td {
	border: 1px solid var(--main-color);
	border-collapse: collapse;
}

th {
	background-color: var(--main-color);
	color: #fff;
}

footer {
	height: 80px;
	width: calc(100% + 80px);
	margin-left: -40px;
	background-color: var(--main-color);
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 1em;
	z-index: 10;
	margin-top: 40px;
	display: flex;
	justify-content: space-evenly;

}

footer a {
	color: #fff;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

body {
	margin-bottom: 0;
	padding-bottom: 0;
}

form a {
	color: var(--main-color);
	text-decoration: none;
}

.inline {
	display: inline-block;
}

label.checkbox-label {
	font-size: 14px;
}

#termini_condizioni {
	display: inline-block;
	box-shadow: none;
	font-weight: normal;
}

.checkbox-container {
	display: flex;
	align-items: flex-start;

}

form .checkbox-label a {
	text-decoration: underline;
}

.file-preview {
	cursor: pointer;
}

.file-preview:hover :not(img) {
	opacity: 0.5;
	filter: grayscale(100%);
}

.MsoListParagraph,
.MsoListParagraphCxSpFirst,
.MsoListParagraphCxSpMiddle,
.MsoListParagraphCxSpLast,
.editor-content p.MsoListParagraph {
	text-indent: 0 !important;
	margin: 0 0 1em !important;
}