/**
 * Password form shown on password-protected pages and case studies.
 * Moved from Additional CSS without changes.
 */

.post-password-form {
	/* Beats the constrained layout, which zeroes its first and last child's margins. */
	/* stylelint-disable-next-line declaration-no-important */
	margin: 4rem auto !important;
	max-width: 32rem;
	padding: 2.5rem;
	background: var( --wp--preset--color--base, #fff );
	border: 1px solid var( --wp--preset--color--contrast-3, #e5e5e5 );
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 );
}

.post-password-form > p:first-of-type {
	margin: 0 0 1.5rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var( --wp--preset--color--contrast, #1a1a1a );
}

.post-password-form label {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-weight: 600;
	font-size: 0.875rem;
	color: var( --wp--preset--color--contrast, #1a1a1a );
}

.post-password-form input[type="password"] {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	background: var( --wp--preset--color--base, #fff );
	border: 1px solid var( --wp--preset--color--contrast-2, #999 );
	border-radius: 0.375rem;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.post-password-form input[type="password"]:focus {
	outline: none;
	border-color: var( --wp--preset--color--custom-button, #e53e3e );
	box-shadow: 0 0 0 3px rgba( 229, 62, 62, 0.15 );
}

.post-password-form input[type="submit"] {
	margin-top: 1rem;
	padding: 0.75rem 1.75rem;
	/* stylelint-disable-next-line number-max-precision -- exactly 15px. */
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	color: var( --wp--preset--color--base, #fff );
	background: var( --wp--preset--color--custom-button, #e53e3e );
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: background-color 150ms ease, transform 50ms ease;
}

.post-password-form input[type="submit"]:hover {
	background: var( --wp--preset--color--custom-button-hover, #c53030 );
}

.post-password-form input[type="submit"]:active {
	transform: translateY( 1px );
}

.post-password-form .post-password-form-invalid-password {
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	color: var( --wp--preset--color--custom-hm-red, #c53030 );
	background: rgba( 229, 62, 62, 0.08 );
	border-radius: 0.375rem;
}
