/* HDForms, hybrid
-- The same chrome as style-full.css, with the opinionated half of the HDFields
-- input styling taken back off so the theme's own typography, borders and
-- focus rings show through. Layout, the grid, the toggles and the error states
-- are left alone, because a theme has no rules for any of them
--
-- This is the default. The About / Options page switches between the two
------------------------------------------------------- */

/* every width here is stated as the width the element should actually occupy,
-- so each one that pairs a width cap with padding or a border has to say so:
-- without it a theme left on the content-box default renders them wider than
-- the cap by however much padding it and we have added between us */
.hdf_form {
	box-sizing: border-box;
	max-width: 800px;
	margin: 0 auto;
	position: relative;
}

.hdf_group {
	display: flex;
	flex-direction: column;
}

.hdf_group_label {
	font-weight: 700;
	margin-bottom: 0.5em;
}

/* The honeypot
-- Off screen rather than display none or hidden, so a bot filling in every
-- field it can find still fills this one in
------------------------------------------------------- */
.hdf_trap {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Back to the theme
-- Only the text inputs. A toggle, a colour picker and a repeater row are
-- built out of HDFields' own markup and have nothing to fall back to
------------------------------------------------------- */
.hdf_form .hd_main .hd_input,
.hdf_form .hd_main textarea.hd_input,
.hdf_form .hd_main select.hd_input {
	font: inherit;
	color: inherit;
	background: none;
	border: 1px solid currentColor;
	border-radius: 0;
	box-shadow: none;
	padding: 0.6em 0.8em;
	min-height: 0;
}

.hdf_form .hd_main .hd_input:focus {
	outline: revert;
	box-shadow: none;
}

.hdf_form .hd_main .hd_input_label {
	font: inherit;
	font-weight: 700;
	color: inherit;
}

/* Submit
-- Left plain, so a theme's own button rules have something to take
------------------------------------------------------- */
.hdf_submit {
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	margin-top: 1em;
	padding: 0.8em 2em;
}

.hdf_submit.disabled {
	opacity: 0.6;
	pointer-events: none;
}

.hdf_message {
	margin-top: 1em;
}

.hdf_message_success {
	padding: 1em 1.2em;
	border: 1px solid currentColor;
}

.hdf_form .hdf_sent {
	display: none;
}

#hdfields_error_log {
	display: none;
}

/* the 2rem the max-width holds back is the gutter, so the padding has to come
-- out of the 32rem rather than be added to it, or the line hangs off both edges
-- of a narrow screen */
#hdfields_error_log.active {
	display: block;
	position: fixed;
	box-sizing: border-box;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%);
	z-index: 9999;
	max-width: min(32rem, calc(100vw - 2rem));
	padding: 0.9em 1.2em;
	border-radius: 4px;
	background: #9e1414;
	color: #fff;
}
