/* CM Withdrawal Button: neutral styles, fonts and colors come from the theme. */

.cmwb-button {
	display: inline-block;
	box-sizing: border-box;
	padding: .6em 1.2em;
	font: inherit;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	/* Fallback only. The colors of every state (normal, :visited, :hover, :focus, :focus-visible,
	 * :active) are set explicitly by the inline CSS generated from the settings (Button_Style). */
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
}

/* Focus ring: dark ring with a white band inside, visible on light and dark surroundings, and kept
 * while hovering. */
.cmwb-button.cmwb-button:focus-visible,
.cmwb-button.cmwb-button:focus-visible:hover {
	outline: 2px solid #1d2327;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

.cmwb-modal__close:focus-visible,
.cmwb-field input:focus-visible,
.cmwb-field textarea:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.cmwb-button[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

/* Submit button inside the form: filled (fallback colors, see above). */
.cmwb-submit {
	color: #fff;
	background: #1d2327;
	border-color: #1d2327;
}

/* Modal */
.cmwb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.cmwb-modal[hidden] {
	display: none;
}

.cmwb-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.cmwb-modal__dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 520px;
	max-height: 100%;
	overflow-y: auto;
	padding: 1.5rem;
	color: #1d2327;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

.cmwb-modal__dialog:focus {
	outline: none;
}

.cmwb-modal__title {
	margin: 0 2rem 1rem 0;
	font-size: 1.3em;
}

.cmwb-modal__close {
	position: absolute;
	top: .5rem;
	right: .5rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 4px;
}

html.cmwb-modal-open {
	overflow: hidden;
}

/* Form */
.cmwb-form {
	color: #1d2327;
}

.cmwb-inline .cmwb-form {
	max-width: 520px;
}

.cmwb-form__intro {
	margin: 0 0 1rem;
}

.cmwb-field {
	margin: 0 0 1rem;
}

.cmwb-field label {
	display: block;
	margin-bottom: .25rem;
	font-weight: 600;
}

.cmwb-field input,
.cmwb-field textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: .6em .75em;
	font: inherit;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
}

.cmwb-field textarea {
	resize: vertical;
}

.cmwb-field small {
	display: block;
	margin-top: .25rem;
	opacity: .75;
}

/* Honeypot: off-screen, not display:none. */
.cmwb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cmwb-message:empty {
	display: none;
}

.cmwb-message {
	margin: 0 0 1rem;
	padding: .75em 1em;
	border-left: 4px solid #8c8f94;
	background: #f6f7f7;
}

.cmwb-message:focus {
	outline: none;
}

.cmwb-message--error {
	border-color: #b32d2e;
	background: #fcf0f1;
}

.cmwb-message--success {
	margin-bottom: 0;
	border-color: #1e8a44;
	background: #edfaef;
}

.cmwb-form--done .cmwb-form__intro,
.cmwb-form--done .cmwb-field,
.cmwb-form--done .cmwb-submit {
	display: none;
}

@media (max-width: 600px) {
	.cmwb-modal {
		padding: .5rem;
	}

	.cmwb-modal__dialog {
		padding: 1.25rem 1rem;
	}

	.cmwb-submit {
		width: 100%;
	}
}
