/*
 * Riscontro visivo comune a tutte le aree "Trascina qui il file, o clicca".
 *
 * Passando con il cursore l'area si colora; al clic si "schiaccia" per un
 * attimo (js/upload-dropzone-feedback.js aggiunge .rg-drop-pressed per il
 * tempo dell'animazione, perche' il :active da solo dura quanto la
 * pressione del tasto e la finestra di scelta del file lo copre subito).
 *
 * I selettori partono da "html body" per prevalere sugli stili scritti
 * dentro le singole viste, che arrivano dopo questo file.
 */
html body .anag-drop,
html body .docup-drop,
html body .profile-dropzone,
html body .gaia-upload-dropzone,
html body .signature-upload-dropzone,
html body .archive-dropzone,
html body .archive-upload-tile {
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

/* ------------------------------------------------------------ hover */
html body .anag-drop:hover,
html body .docup-drop:hover,
html body .profile-dropzone:hover,
html body .gaia-upload-dropzone:hover,
html body .signature-upload-dropzone:hover,
html body .archive-dropzone:hover {
	background-color: #eef2fb;
	border-color: #405189;
	box-shadow: 0 0 0 3px rgba(64, 81, 137, .10);
}

/* L'icona si solleva appena: fa capire che l'area e' cliccabile. */
html body .anag-drop-icon,
html body .docup-drop-icon,
html body .profile-dropzone-icon,
html body .gaia-upload-dropzone-icon {
	transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
html body .anag-drop:hover .anag-drop-icon,
html body .docup-drop:hover .docup-drop-icon,
html body .profile-dropzone:hover .profile-dropzone-icon,
html body .gaia-upload-dropzone:hover .gaia-upload-dropzone-icon {
	transform: translateY(-2px);
	color: #405189;
}
html body .anag-drop:hover .anag-drop-title,
html body .docup-drop:hover .docup-drop-title,
html body .profile-dropzone:hover .profile-dropzone-title {
	color: #405189;
}

/* Un'area gia' riempita resta verde anche col cursore sopra, solo piu' intensa. */
html body .anag-drop.anag-has-file:hover,
html body .profile-dropzone.is-filled:hover {
	background-color: #e8f7f3;
	border-color: #0ab39c;
	box-shadow: 0 0 0 3px rgba(10, 179, 156, .12);
}

/* ------------------------------------------------------------ clic */
html body .anag-drop:active,
html body .docup-drop:active,
html body .profile-dropzone:active,
html body .gaia-upload-dropzone:active,
html body .signature-upload-dropzone:active,
html body .archive-dropzone:active,
html body .archive-upload-tile:active,
html body .rg-drop-pressed {
	transform: scale(.985);
	background-color: #e1e7f5;
	border-color: #405189;
	border-style: solid;
}
html body .rg-drop-pressed {
	animation: rg-drop-press .38s ease-out;
}
@keyframes rg-drop-press {
	0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(64, 81, 137, .35); }
	35%  { transform: scale(.975); box-shadow: 0 0 0 4px rgba(64, 81, 137, .22); }
	100% { transform: scale(1);    box-shadow: 0 0 0 10px rgba(64, 81, 137, 0); }
}

@media (prefers-reduced-motion: reduce) {
	html body .rg-drop-pressed { animation: none; }
	html body .anag-drop:hover .anag-drop-icon,
	html body .docup-drop:hover .docup-drop-icon,
	html body .profile-dropzone:hover .profile-dropzone-icon,
	html body .gaia-upload-dropzone:hover .gaia-upload-dropzone-icon { transform: none; }
}

/* Un'area segnata in errore resta rossa anche col cursore sopra. */
html body .anag-drop.anag-invalid:hover,
html body .profile-dropzone.is-invalid:hover,
html body .rg-pdf-invalid:hover {
	background-color: #fdecea;
	border-color: #f06548;
	box-shadow: 0 0 0 3px rgba(240, 101, 72, .12);
}
