dialog {
	width: calc(100% - 2rem);
	max-width: 60ch;

	border: 1px solid black;
}

/* I T E M   M O D A L */
#item-modal {
	position: absolute;
	bottom: 4rem;

	padding: 0;

	@media (max-width: 485px) {
		bottom: auto;
		top: 5.7rem;
	}
}

dialog::backdrop {
	backdrop-filter: blur(5px);
	background-color: #00000011;
}

	/* MODAL'S GUTS */
	.modal-guts {
		display: flex;
		flex-wrap: wrap;

		gap: .6rem;

		padding: .2rem .7rem .75rem;
	}

		/* MODAL'S EVERY CHILD */
		.modal-guts > * { flex-basis: 100%; }

		.modal-name-and-amount {
			display: flex;
			justify-content: space-between;
		}

			.modal-name { width: calc(100% - 3.5rem); }

			span.modal-amount-x {
				position: relative;
				bottom: 2px;

				color: #888;
				align-self: center;
				padding-inline: 1rem;
				padding-block: 1.4rem .6rem;
			}

			.modal-priority-and-tags {
				display: flex;
			}
			
			#modal-priority {
				padding-inline: .2rem 1.4rem !important;
				margin-left: auto;
				background-position: 92% 57%;
			}

			.modal-tags {
				width: calc(100% - 6.9rem);
			}

			#modal-url {
				flex: 1;

				&:invalid {
					text-decoration: line-through;
				}
			}



/* ITEM MODAL INPUTS and BUTTON */
#item-modal input,
#item-modal select {
	padding-block: 1.2rem .6rem;
	border: none;
	border-bottom: 1px dashed #aaa;
	border-radius: 0;
	font-size: 1rem;

	&::placeholder {
		/* position: relative;
		top: 6px; */
		color: #999; 
	}

	&:focus {
		outline: none;
		border-bottom: 1px solid black;

		&::placeholder { color: #ddd; }
	}
}

/* INPUT [NUMBER] */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  appearance: textfield;
	text-align: center;
}	

	/* BUTTON */
	button#modal-done {
		background: transparent;
		border: 1px solid black;
		border-radius: 0;

		padding: 1rem .9rem .9rem .9rem;
		margin-top: 1rem;

		cursor: pointer;

		font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 48;

		&:hover,
		&:focus {
			outline: 1px solid black;
		}

		&:active {
			background-color: #f2f2f2;
			outline: 1px solid black;
		}
	}





/* H E L P   M O D A L */
#help-modal {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	padding: 1.5rem 1rem;

	& a {
		color: gray;
		font-weight: 500;
		text-decoration: none;
		border-bottom: 1px dashed #aaa;

		&:hover,
		&:focus,
		&:active {
			color: black;
			border-bottom: 1px solid black;
		}
	}

	& p {
		font-weight: 400;
		color: gray;

		& b, em {
			color: black;
			font-weight: 500;
		}
	}
}

	#help-modal .logo-img {
		max-width: 4rem;
		aspect-ratio: 1/1;
	}

	.help-version {
		color: gray;
		margin-bottom: 1rem;
	}

	.item-functions {	
		padding-inline: 1rem;

		& img {
			width: 100%;
			display: block;
			padding: .5rem;
			margin-inline: auto;
			margin-bottom: 1.5rem;

			@media (min-width: 500px) {
				width: 90%;
			}
		}

		& p {
			text-indent: -.8rem;
			padding-left: .8rem;

			font-size: .9rem;
			line-height: 1.5;
			text-align: justify;

			margin-block: 0;
		}
	}

	.help-author {
		text-align: center;
	}

	.help-feedback {
		display: inline-block;
		color: gray;
		margin-top: .3rem;
	}