/* USER SIGNUP FORM */

.user-register-form input {
	max-width: 100%;
}

/* Custom style for long list of items to have scrollbar */
#edit-field-spots--wrapper .fieldset-wrapper {
	height: 200px;
	overflow: auto;
	border: 1px solid #ced4da;
	border-radius: .25rem;
	padding: 1rem;
	max-width: 50%;
}
#edit-field-spots--wrapper .js-form-item {
	max-width: 405px;
}

/* Making labels look the same size */
.user-register-form .form-wrapper > div > label:not(.form-check-label),
.user-register-form #ajax-wrapper > div > label,
.user-register-form legend {
	font-size: 1.2rem;
}

/* Moving labels from icons */
.user-register-form label::before {
	margin-right: 5px;
	background-position: 0 0.6rem;
}

form[class*="user-register-form"] div.form-type-textfield,
form[class*="user-register-form"] div.form-type-number,
form[class*="user-register-form"] div.form-type-email { 
	width: 50%;
}



/* SIGN IN FORM */

.passwordless-login input {
	max-width: 100%;
}



/* ADD POINT FORM */


form[class*="node-map-point"] input {
	max-width: 100%;
}

/* To prevent numeric and geo fields from occupying whole width */
form[class*="node-map-point"] input.form-number,
form[class*="node-map-point"] input[class*="geofield"] {
	max-width: 150px;
}

/* Setting width for dropdown lists */
form[class*="node-map-point"] .form-select {
	width: 300px;
}

/* Otherwise some buttons are white for some reason */
form[class*="node-map-point"] .button.form-control {
	color: #fff;
	background-color: #007bff;
	border-color: #007bff;
}

/* Weird delete button which is not a button - let it at lease be red */
form[class*="node-map-point"] .button--danger {
	padding: 0.5em;
	color: red;	
}

/* Separate borders and paddings for complex fields */
form[class*="node-map-point"] #edit-field-gallery-wrapper,
form[class*="node-map-point"] #edit-field-protocol-file-wrapper,
form[class*="node-map-point"] #edit-field-image-wrapper {
	border: 1px solid #ced4da;
	border-radius: 5px;
	padding: 1rem;
}

/* Both coordinate fields should appear on the same line */
form[class*="node-map-point"] .field--type-geofield .fieldset-wrapper {
	display: flex;
	flex-wrap: wrap;
	max-width: 350px;
}
form[class*="node-map-point"] .field--type-geofield .fieldset-wrapper div {
	flex-basis: 50%;
}

/* Because I want delete button to appear after protocol file */
form[class*="node-map-point"] #field_protocol_file-media-library-wrapper .js-media-library-item {
	display: flex;
	flex-flow: column;
	gap: .5rem;
}
form[class*="node-map-point"] #field_protocol_file-media-library-wrapper .js-media-library-item input.button {
	order: 2;
	max-width: 100px;
}

form[class*="node-map-point"] div.form-type-textfield { /* To make short text fields equal */
	width: 100%;
}



/* xs-sm ruleset */
@media (max-width: 767px) {

	.layout-region-node-footer .form-actions { /* To make save and preview buttons appear in the middle on smaller screens */
		display: flex;
		justify-content: space-evenly;
	}

	form[class*="user-register-form"] div.form-type-textfield,
	form[class*="user-register-form"] div.form-type-number,
	form[class*="user-register-form"] div.form-type-email { 
		width: 100%;
	}

	#edit-field-spots--wrapper .fieldset-wrapper {
		max-width: 100%;
	}

}

/* md ruleset */
@media (min-width: 768px) and (max-width: 991px) {

	form[class*="user-register-form"] div.form-type-textfield,
	form[class*="user-register-form"] div.form-type-number,
	form[class*="user-register-form"] div.form-type-email { 
		width: 75%;
	}

	#edit-field-spots--wrapper .fieldset-wrapper {
		max-width: 75%;
	}

}



/* FIELD ICONS */

/* Mobile number field */
.user-pass .field--name-field-mobile-number label::before, 
.user-register-form .field--name-field-mobile-number label::before, 
.user-login-form .field--name-field-mobile-number label::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/126/126509.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Full name field */
.user-pass .form-item-field-fio-0-value label::before, 
.user-register-form .form-item-field-fio-0-value label::before, 
.user-login-form .form-item-field-fio-0-value label::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/639/639396.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Org name field */
.user-pass .form-item-field-organization-0-value label::before, 
.user-register-form .form-item-field-organization-0-value label::before, 
.user-login-form .form-item-field-organization-0-value label::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/1728/1728453.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Position field */
.user-pass .form-item-field-position-0-value label::before, 
.user-register-form .form-item-field-position-0-value label::before, 
.user-login-form .form-item-field-position-0-value label::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/639/639394.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Amount of participants field */
.user-pass .form-item-field-participants-amount-0-value label::before, 
.user-register-form .form-item-field-participants-amount-0-value label::before, 
.user-login-form .form-item-field-participants-amount-0-value label::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/1769/1769041.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Age of participants field */
.user-pass .field--name-field-participants-age legend::before, 
.user-register-form .field--name-field-participants-age legend::before, 
.user-login-form .field--name-field-participants-age legend::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/5074/5074113.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Spots to monitor field */
.user-pass .field--name-field-spots legend::before, 
.user-register-form .field--name-field-spots legend::before, 
.user-login-form .field--name-field-spots legend::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/855/855003.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}

/* Water type field */
.user-pass .field--name-field-water-type legend::before,
.user-register-form .field--name-field-water-type legend::before, 
.user-login-form .field--name-field-water-type legend::before {

	display: inline-block;
	content: "";
	background-image: url('https://cdn-icons-png.flaticon.com/512/2352/2352851.png');
	background-repeat: no-repeat;
	-webkit-background-size: 1.5rem 1.5rem;
	background-size: 1.5rem 1.5rem;
	background-position: 0 0.4rem;
	width: 1.75rem;
	height: 1.95rem;
}