:root {
	--sticky-header-offset-nav: 1rem;
	--sticky-header-offset: -1rem;
}

.hd_main {
	line-height: 1.6;
	color: #4a4a4a;
	font-family: sans-serif;
	max-width: 1200px;
	margin: auto;
	font-size: 18px;
}

.hd_main * {
	font-size: 18px;
}

.hd_header {
	display: grid;
	grid-template-columns: 1fr max-content;
	grid-gap: 1em;
	position: sticky;
	top: var(--sticky-header-offset-nav, 1em);
	z-index: 99;
	padding: 0.2em 0;
	background-color: #f0f0f1;
}

.hd_heading_title {
	font-size: 23px;
	font-weight: 400;
	margin: 0;
	padding: 9px 0 4px 0;
	line-height: 1.3;
}

.hd_main .button_primary {
	background-color: darkseagreen;
	color: #000;
	font-weight: bold;
}

.hd_main .button {
	display: inline-block;
	cursor: pointer;
	padding: 0.2em 1em;
}

.hd_input_item {
	position: relative;
	margin-bottom: 1em;
}

.hd_input_item > h3 {
	font-size: 1.2rem;
	margin-top: 2em;
}

.hd_input_item .hd_input_item {
	margin-bottom: 0;
}

.hd_input_label {
	display: block;
	font-weight: bold;
	cursor: pointer;
	margin-bottom: 6px;
	font-size: 16px;
	cursor: pointer;
	text-wrap: balanced;
}

.hd_required_icon {
	margin-right: 0.4em;
	border-left: 3px dashed #9e1414;
}

.hd_input_item > hr {
	margin: 2em 0;
	display: block;
	border-style: dashed;
	border-width: 2px;
	color: #bbb;
}

.hd_input_description {
	margin: 6px 0;
	font-size: 0.8em;
}

.hd_input_description > p,
.hd_input_description > p > * {
	font-size: 1em;
}

.hd_input_description small {
	font-size: 0.8em;
	display: block;
}

.hd_option_description {
	font-size: 0.8em;
	margin: 0 0 1em 0;
	display: block;
}

.hd_option_description > p {
	margin: 0;
}

.hd_input_description > p:first-child {
	margin: 0;
}

.hd_input_description.hd_input_description_after > p:first-child {
	margin-top: 0.6em;
}

.hd_input_item .hd_input {
	transition: all 350ms;
	width: 100%;
	padding: 0.8em 0.6em;
	border: 1px solid #ddd;
	border-radius: 0.2em;
	line-height: 1;
	background-color: #fbfbfb;
	margin: 0;
	font-size: 0.8em;
}

.hd_input_item .hd_input[data-type="date"] {
	padding: 0.4em 0.6em;
}

.hd_input_item .hd_input:not(:placeholder-shown) {
	border-color: #999;
}

.hd_input_item .hd_input::placeholder {
	color: #aaa;
}

.hd_error {
	border-color: #f25f5c !important;
}

.hd_error.hd_input {
	border-style: solid;
	border-width: 1px;
	border-bottom: 1px solid #f25f5c !important;
}

.hd_error.hd_input_radio {
	border-style: solid;
	border-width: 1px;
}

/* the 100% is the width of the container, not the width of the container plus
-- our own padding and border, so it has to be measured that way rather than
-- trusting the theme to have set it globally */
.hd_input {
	box-sizing: border-box;
	transition: all 350ms;
	width: 100%;
	padding: 0.6em;
	border: 1px solid #ddd;
	border-radius: 0.2em;
	line-height: 1;
	background-color: transparent;
	margin: 0;
	font-size: 0.8em;
}

.hd_input:disabled {
	opacity: 0.7;
	cursor: default;
	color: #000;
	border-bottom: none;
	background-color: #cccccc;
}

/* Radio and Checkboxes */
.hd_label_input {
	display: inline-flex;
	font-size: 0.8em;
	cursor: pointer;
	margin: 0.6em 0;
	align-items: center;
}

.hd_input_row {
	padding: 0 0.4em;
}

.hd_options_check {
	display: inline-block;
	margin-right: 12px;
	position: relative;
}

.hd_options_check input[type="checkbox"] {
	position: absolute;
	opacity: 0;
}

.hd_options_check input[type="checkbox"]:focus + .hd_toggle:after {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

/* the switch is drawn in ems off a pinned 22px font-size, so it has to own its
-- box model too: a theme's global `* { box-sizing: border-box }` would otherwise
-- pull the knob's border inward, shrink it by 4px and leave it riding the top of
-- the track */
.hd_options_check .hd_toggle,
.hd_options_check .hd_toggle::before,
.hd_options_check .hd_toggle::after {
	box-sizing: border-box;
}

.hd_options_check .hd_toggle {
	width: 2em;
	height: 1em;
	position: relative;
	cursor: pointer;
	display: block !important;
	font-size: 22px !important;
	line-height: 1;
	margin: 0;
	padding: 0;
	border: 0;
}

.hd_aria_label {
	display: none !important;
}

.hd_input_radio,
.hd_input_checkbox {
	/* max-height: 50vh;
	overflow-y: auto; */
}

.hd_prefix,
.hd_postfix {
	display: flex;
	align-items: stretch;
}

.hd_fix {
	background: #181818;
	padding: 0 0.6em;
	color: #fff;
	font-size: 0.8em;
	display: flex;
	align-items: center;
	border: 1px solid #999;
}

.hd_prefix > .hd_input {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	border-left: none;
}

.hd_prefix > .hd_fix {
	border-top-left-radius: 0.2em;
	border-bottom-left-radius: 0.2em;
	white-space: nowrap;
}

.hd_postfix > .hd_input {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	border-right: none;
}

.hd_postfix > .hd_fix {
	border-top-right-radius: 0.2em;
	border-bottom-right-radius: 0.2em;
	white-space: nowrap;
}

.hd_colour_select {
	cursor: pointer;
}

.hd_tooltip_item {
	width: 1.75em;
	height: 1.75em;
	line-height: 1;
	border-radius: 50%;
	background-color: #181818;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	margin-left: 0.4em;
	color: #fff;
	position: relative;
	font-size: 0.6em;
	top: -0.2em;
	cursor: help;
}

.hd_tooltip_line {
	position: relative;
	padding-bottom: 0.3em;
	cursor: pointer;
	border-bottom: 2px dashed #bbb;
	cursor: help;
}

.hd_tooltip {
	position: absolute;
	font-size: 14px;
	font-weight: 700;
	width: 260px;
	left: calc(2em + 10px);
	top: -1em;
	line-height: 1.4;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 13px 10px rgba(72, 72, 72, 0.025), 0 1px 16px rgba(72, 72, 72, 0.55);
	color: #2d2d2d;
	padding: 2em;
	pointer-events: none;
	opacity: 0;
	transform: translate3d(0, 30px, 0);
	transition: all 0.3s cubic-bezier(0.1, 1, 0.9, 1);
	transition-property: opacity, transform;
	text-align: left;
}

.hd_cols > div:not(:first-child) .hd_tooltip {
	left: calc(-260px - 4rem);
}

.hd_tooltip_line > .hd_tooltip {
	top: 3em;
	left: -25%;
}

.hd_tooltip_item:hover .hd_tooltip,
.hd_tooltip_line:hover .hd_tooltip {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	z-index: 99999;
}

.hd_tooltip::after {
	content: "";
	position: absolute;
	left: calc(-2em + 10px);
	top: calc(1em + 3px);
	display: block;
	border-top: 10px solid transparent;
	border-left: 10px solid transparent;
	border-right: 10px solid #fff;
	border-bottom: 10px solid transparent;
}

.hd_cols > div:not(:first-child) .hd_tooltip::after {
	border-top: 10px solid transparent;
	border-left: 10px solid #fff;
	border-right: 10px solid transparent;
	border-bottom: 10px solid transparent;
	right: calc(-2em + 10px);
	left: initial;
}

.hd_tooltip_line > .hd_tooltip::after {
	left: calc(50% - 10px);
	top: -20px;
	display: block;
	border-top: 10px solid transparent;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 10px solid #fff;
}

.hd_tooltip_contact {
	display: block;
}

/* Image / Gallery */
.hd_image,
.hd_gallery_image {
	padding: 1em;
	border: 1px solid #ddd;
	border-radius: 6px;
	display: grid;
	place-items: center;
	cursor: pointer;
}

.hd_image:hover,
.hd_gallery_image:hover {
	border-color: #181818;
}

.hd_image_remove {
	display: none;
	font-size: 0.8em;
	margin: 0 auto;
	cursor: pointer;
}

.hd_image_remove.active {
	display: block;
}

/* Gallery columns
-- the count comes from the width there is rather than a fixed two. auto-fill
-- and not auto-fit, so a gallery holding one image keeps it a column wide
-- instead of stretching it across the whole row, and the min() stops the
-- track overflowing a container narrower than itself, a gallery sitting in a
-- repeater row or a 1-1-1-1 column say
------------------------------------------------------- */
.hd_gallery_content {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.hd_image > img,
.hd_gallery_image > img {
	width: 100%;
	height: auto;
}

/* Radio */
.hd_input_radio .hd_options_check input[type="checkbox"][disabled] + .hd_toggle {
	cursor: default;
}
.hd_input_radio .hd_options_check input[type="checkbox"][disabled] + .hd_toggle:before {
	background-color: #999;
}

.hd_input_radio .hd_options_check .hd_toggle:before {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	transition: background 0.1s ease;
	background: #f25f5c;
	border-radius: 50px;
	box-shadow: inset 0px 1px 1px rgb(171 171 171 / 50%);
}

.hd_input_radio .hd_options_check .hd_toggle:after {
	content: "";
	position: absolute;
	width: 1em;
	height: 1em;
	border-radius: 50px;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	transition: all 0.2s ease;
	box-shadow: 0 0 1px 1px rgb(0 0 0 / 50%);
	background: #efefef;
	z-index: 2;
	border: 2px solid transparent;
}

.hd_input_radio .hd_options_check input[type="checkbox"]:checked + .hd_toggle:before {
	background: darkseagreen;
	box-shadow: inset 0px 1px 1px rgb(84 152 140 / 50%);
}

.hd_input_radio .hd_options_check input[type="checkbox"]:checked + .hd_toggle:after {
	left: 1em;
	background: #efefef;
}

/* Checkbox
-- a squared knob riding a thin bar. Deliberately not the pill below: a
-- checkbox answers "which of these", a toggle answers "is this on" */
.hd_input_checkbox .hd_options_check .hd_toggle:before {
	content: "";
	position: absolute;
	width: 2em;
	height: 0.5em;
	left: 0;
	top: 0.25em;
	transition: background 0.1s ease;
	background: #f25f5c;
	border-radius: 3px;
	box-shadow: inset 0px 1px 1px rgb(171 171 171 / 50%);
}

.hd_input_checkbox .hd_options_check .hd_toggle:after {
	content: "";
	position: absolute;
	width: 1em;
	height: 1em;
	border-radius: 0px;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	transition: all 0.2s ease;
	box-shadow: 0 0 1px 1px rgb(0 0 0 / 50%);
	background: #efefef;
	z-index: 2;
	border: 2px solid transparent;
}

.hd_input_checkbox .hd_options_check input[type="checkbox"]:checked + .hd_toggle:before {
	background: #70c1b3;
	box-shadow: inset 0px 1px 1px rgb(84 152 140 / 50%);
}

.hd_input_checkbox .hd_options_check input[type="checkbox"]:checked + .hd_toggle:after {
	left: 1em;
	background: #efefef;
}

/* Toggle
-- a pill switch: the track runs the full height of the control and is fully
-- rounded, and the knob is a circle inset evenly on all four sides. Same 2em
-- by 1em footprint as the checkbox above, so nothing reflows */
.hd_input_toggle .hd_options_check .hd_toggle:before {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	transition: background 0.15s ease;
	background: #f25f5c;
	border-radius: 50px;
	box-shadow: inset 0px 1px 2px rgb(0 0 0 / 20%);
}

.hd_input_toggle .hd_options_check .hd_toggle:after {
	content: "";
	position: absolute;
	width: calc(1em - 6px);
	height: calc(1em - 6px);
	border-radius: 50%;
	left: 3px;
	top: 3px;
	transition: left 0.2s ease;
	box-shadow: 0 1px 2px rgb(0 0 0 / 35%);
	background: #fff;
	z-index: 2;
	border: none;
}

.hd_input_toggle .hd_options_check input[type="checkbox"]:checked + .hd_toggle:before {
	background: #70c1b3;
	box-shadow: inset 0px 1px 2px rgb(84 152 140 / 45%);
}

.hd_input_toggle .hd_options_check input[type="checkbox"]:checked + .hd_toggle:after {
	left: calc(1em + 3px);
	background: #fff;
}

/* the disabled component lands on the wrapper, not the input, so the greying
-- and the click block both have to hang off the wrapper attribute */
.hd_input_toggle[disabled] {
	pointer-events: none;
}

.hd_input_toggle[disabled] .hd_options_check .hd_toggle:before {
	background: #999;
	box-shadow: none;
}

.hd_input_toggle[disabled] .hd_options_check .hd_toggle {
	cursor: default;
}

/* Image Toggles */
.hd_image_toggle_items {
	display: flex;
	gap: 1em;
	margin: 1em 0;
	overflow: auto;
}

.hd_image_toggle_item {
	border-radius: 5px;
	border: 1px solid #eee;
	cursor: pointer;
	padding: 0.2em;
	opacity: 0.7;
	background-color: #ffffff;
}

.hd_image_toggle_item.active,
.hd_image_toggle_item:hover {
	border-color: #bbb;
	opacity: 1;
}

.hd_image_toggle_item > img {
	display: block;
	max-width: 200px;
}

.hd_image_toggle_content {
	display: none;
}

.hd_image_toggle_content.active {
	display: block;
}

/* Which panel is which
-- only printed when more than one tile can be open at a time */
.hd_image_toggle_title {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid #eee;
}

.hd_image_toggle_content .hd_input_item {
	margin-bottom: 1em;
}

/* Search List */
.hd_search_list {
	position: relative;
}
.hd_search_list .hd_search_list_open {
	display: none;
	border: 1px solid #999;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	padding: 0.4em;
	font-size: 1rem;
	width: calc(100% - 0.9em - 1px);
	background-color: #efefef;
}

.hd_search_list.active .hd_search_list_open {
	display: block;
	position: absolute;
}

.hd_search_list.active .hd_input {
	outline: none;
	box-shadow: none;
	border-bottom: 0;
	border-color: #999;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.hd_search_list_result_item {
	padding: 0.4em;
	cursor: pointer;
}

.hd_search_list_result_item:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

.hd_search_list_wrapper {
	margin-top: 0.4em;
}

.hd_search_list_wrapper:empty {
	display: none;
}

.hd_search_list_item {
	border-radius: 3em;
	border: 1px solid #eee;
	background-color: #2d2d2d;
	color: #fff;
	padding: 1em;
	line-height: 1;
	display: inline-block;
	font-size: 12px;
	cursor: pointer;
}

.hd_search_list_item:hover {
	border-color: #000;
	text-decoration: line-through;
}

/* Columns */
.hd_cols {
	display: grid;
	grid-gap: 2em;
}

.hd_cols.hd_cols_fit {
	grid-template-columns: max-content 1fr;
	grid-gap: 1em;
}

.hd_cols_1-1 {
	grid-template-columns: minmax(10px, 1fr) minmax(10px, 1fr);
}

.hd_cols_1-2 {
	grid-template-columns: minmax(10px, 1fr) minmax(10px, 2fr);
}

.hd_cols_2-1 {
	grid-template-columns: minmax(10px, 2fr) minmax(10px, 1fr);
}

.hd_cols_1-1-1 {
	grid-template-columns: minmax(10px, 1fr) minmax(10px, 1fr) minmax(10px, 1fr);
}

.hd_cols_1-1-1-1 {
	grid-template-columns: minmax(10px, 1fr) minmax(10px, 1fr) minmax(10px, 1fr) minmax(10px, 1fr);
}

/* Tabs */

.hd_content_tabs {
	border: 1px solid #ddd;
	display: grid;
	grid-template-columns: 250px 1fr;
	margin-top: 0.2em;
}

.hd_content_tabs.hd_content_tabs_horizontal {
	border-top-left-radius: 3px;
}

.hd_content_tabs.hd_content_tabs_horizontal {
	display: block;
}

.hd_content_tabs.hd_content_tabs_horizontal .hd_tab_nav {
	display: flex;
	overflow: auto;
}

.hd_tab_nav_wrapper {
	border-right: 1px solid #ddd;
}

.hd_logo {
	text-align: center;
	padding: 1rem;
	background: #181818;
}

.hd_logo img {
	max-width: 100%;
	height: auto;
}

.hd_tab_nav {
	position: sticky;
	top: var(--sticky-header-offset-nav, 1rem);
}

.hd_tab_nav_item:focus {
	border: 1px solid #000 !important;
}

.hd_tab_nav_item.hd_tab_nav_item_active {
	font-weight: bold;
	color: #000;
	border-bottom: 2px solid #444;
	cursor: default;
}

.hd_tab_nav_item:not(.hd_tab_nav_item_active):hover {
	background-color: rgba(0, 0, 0, 0.1);
	color: initial;
}

.hd_tab_nav_item {
	padding: 0.4em 1em;
	border: 1px solid #ddd;
	cursor: pointer;
	transition: all 250ms;
	background-color: #eaeaea;
	line-height: 1;
	padding: 0.8em 1em;
}

.hd_tab_content {
	padding: 1.6em;
	background-color: #efefef;
}

.hd_tab_content_section.hd_tab_content_section_active {
	display: block;
}

.hd_tab_content_section {
	display: none;
}

.hd_tab_heading {
	padding: 0;
	margin-top: 0;
	font-size: 1.2em;
	margin-bottom: 1rem;
}

.hd_tabs_anchor {
	background: red;
	width: 1px;
	height: 1px;
	opacity: 0;
	user-select: none;
	position: relative;
	top: var(--sticky-header-offset, -1rem);
	/* change this offset to compensate for any sticky navs */
}

/* Sortable */
.drag-sort-active {
	opacity: 0.4;
}

.hd_gallery_image:hover > img,
.hd_image_toggle_item:hover > img {
	pointer-events: none;
}

/* Error notice logs */
/* Saved confirmation
-- the save button reports back in place for two seconds. Scoped through the id
-- so it wins against a host's own primary button colour without !important,
-- and deliberately a deeper, more saturated green than the darkseagreen a
-- resting HD Quiz save button already wears, or the change would not read */
#hd_save.hd_saved {
	background: #2e7d52;
	background-color: #2e7d52;
	border-color: #2e7d52;
	color: #fff;
	cursor: default;
}

@media (prefers-reduced-motion: no-preference) {
	#hd_save.hd_saved {
		transition: background-color 150ms ease-in;
	}
}

#hdfields_error_log {
	opacity: 0;
	padding: 1rem;
	border: 1px solid #999;
	position: fixed;
	right: -100vw;
	bottom: 2em;
	z-index: 9999999;
	background: #eee;
	border-radius: 133px;
	line-height: 1;
	pointer-events: none;
	transition: opacity ease-in-out 450ms;
}

#hdfields_error_log.active {
	opacity: 1;
	pointer-events: initial;
	right: 2rem;
}

@media screen and (max-width: 900px) {
	.hd_cols {
		grid-template-columns: 1fr;
	}

	.hd_tooltip_item .hd_tooltip,
	.hd_tooltip_line .hd_tooltip {
		position: fixed;
		bottom: 4rem;
		left: calc(50% - 260px / 2);
		height: fit-content;
		top: initial;
	}

	.hd_tooltip::after {
		display: none;
	}
}

@media screen and (max-width: 750px) {
	.hd_tab_nav_wrapper .hd_logo {
		display: none;
	}
	.hd_cols.hd_cols_fit {
		grid-template-columns: 1fr;
	}
}

/* Conditional logic */
.hd_hidden {
	display: none !important;
}

/* Validation */
.hd_error.hd_input_checkbox,
.hd_error.hd_input_toggle,
.hd_error.hd_image_toggle,
.hd_error.hd_repeater,
.hd_error.hd_search_list_wrapper {
	border-style: solid;
	border-width: 1px;
	border-radius: 0.2em;
}

/* Divider with a label */
.hd_divider {
	display: flex;
	align-items: center;
	gap: 1em;
	margin: 1.5em 0;
	font-size: 0.8em;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.hd_divider:before,
.hd_divider:after {
	content: "";
	flex: 1;
	border-top: 1px solid #ddd;
}

/* Colour picker
-- the native input sits under the swatch so the swatch can open it */
.hd_colour_select {
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.hd_colour_picker {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 1px;
	height: 1px;
	opacity: 0;
	border: none;
	padding: 0;
}

/* Password */
.hd_password_reveal {
	cursor: pointer;
	border: 1px solid #999;
	border-left: none;
	background: #181818;
	line-height: 1;
}

/* Range */
.hd_range {
	display: flex;
	align-items: center;
	gap: 1em;
	width: 100%;
}

.hd_input_range {
	flex: 1;
	margin: 0;
}

.hd_range_output {
	font-size: 0.8em;
	min-width: 3em;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Button group
-- a radio group drawn as a segmented control */
.hd_button_group {
	display: inline-flex;
	flex-wrap: wrap;
	border: 1px solid #ddd;
	border-radius: 0.2em;
	overflow: hidden;
}

.hd_button_group .hd_input_row {
	padding: 0;
	border-right: 1px solid #ddd;
}

.hd_button_group .hd_input_row:last-child {
	border-right: none;
}

.hd_button_group .hd_options_check {
	display: none;
}

.hd_button_group .hd_label_input {
	margin: 0;
	padding: 0.6em 1.2em;
	transition: all 250ms;
}

.hd_button_group .hd_input_row[aria-checked="true"] .hd_label_input {
	background: #181818;
	color: #fff;
}

.hd_button_group .hd_option_description {
	display: none;
}

/* Repeater */
.hd_repeater_rows {
	display: grid;
	gap: 1em;
	margin-bottom: 1em;
}

.hd_repeater_row {
	display: grid;
	gap: 1em;
	align-items: start;
	padding: 1em;
	border: 1px solid #ddd;
	border-radius: 0.2em;
}

.hd_repeater_row_header {
	display: grid;
	grid-template-columns: max-content max-content 1fr max-content;
	gap: 0.6em;
	align-items: center;
}

/* Drag handle
-- six dots, drawn as two dotted rules one above the other */
.hd_repeater_handle {
	cursor: grab;
	user-select: none;
	width: 0.8em;
	height: 1.4em;
	background-image: radial-gradient(currentColor 1px, transparent 1px), radial-gradient(currentColor 1px, transparent 1px);
	background-size: 0.4em 0.4em;
	background-position:
		0 0.3em,
		0.4em 0.3em;
	background-repeat: repeat-y;
	opacity: 0.4;
}

.hd_repeater_handle:hover {
	opacity: 1;
}

.hd_repeater_row[draggable="true"] .hd_repeater_handle {
	cursor: grabbing;
}

.hd_repeater_row_title {
	cursor: pointer;
	font-size: 0.9em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hd_repeater_row_fields > .hd_input_item:first-child {
	margin-top: 0;
}

/* Collapsed rows
-- a chevron drawn from two borders, pointing down when the row is open */
.hd_repeater_row_collapsed .hd_repeater_row_fields {
	display: none;
}

.hd_repeater_toggle {
	cursor: pointer;
	position: relative;
	width: 1.4em;
	height: 1.4em;
	padding: 0;
	border: none;
	border-radius: 0.2em;
	background: transparent;
	color: inherit;
}

.hd_repeater_toggle::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.4em;
	height: 0.4em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translate(-50%, -70%) rotate(45deg);
	transition: transform 250ms;
}

.hd_repeater_row_collapsed .hd_repeater_toggle::before {
	transform: translate(-60%, -50%) rotate(-45deg);
}

.hd_repeater_toggle:hover {
	background: #eee;
}

.hd_repeater_remove,
.hd_repeater_add {
	cursor: pointer;
	border: 1px solid #ddd;
	border-radius: 0.2em;
	background: transparent;
	padding: 0.4em 0.8em;
	line-height: 1;
	font-size: 0.8em;
	transition: all 250ms;
}

.hd_repeater_remove:hover:not(:disabled) {
	border-color: #f25f5c;
	color: #f25f5c;
}

.hd_repeater_add:hover:not(:disabled) {
	border-color: #181818;
}

.hd_repeater_remove:disabled,
.hd_repeater_add:disabled {
	opacity: 0.4;
	cursor: default;
}

/* Code editor */
.hd_code {
	font-family: monospace;
}

.hd_input_item .CodeMirror {
	border: 1px solid #ddd;
	border-radius: 0.2em;
	height: auto;
	min-height: 240px;
}

/* Meta boxes
-- The edit screen is a much tighter space than a settings page, and it brings
-- its own type scale with it. Everything here is scoped to .hd_meta, which
-- _hd_meta::render() puts on the wrapper alongside .hd_main */
.hd_main.hd_meta,
.hd_main.hd_meta * {
	font-size: 13px;
}

.hd_main.hd_meta {
	max-width: none;
	color: inherit;
	font-family: inherit;
}

.hd_main.hd_meta .hd_input_label {
	font-size: 13px;
	margin-bottom: 4px;
}

.hd_main.hd_meta .hd_input_item {
	margin-bottom: 0.8em;
}

.hd_main.hd_meta .hd_input {
	width: 100%;
	padding: 0.4em 0.6em;
	line-height: 1.4;
	background-color: #fff;
}

.hd_main.hd_meta .hd_tab_content {
	background-color: transparent;
	padding: 0;
}

/* the meta box already carries a heading, so the tab repeats it */
.hd_main.hd_meta .hd_tab_heading {
	display: none;
}

.hd_main.hd_meta .hd_content_tabs {
	margin: 0;
}

/* a term screen is a form-table, so the row has to be given the width back */
.form-table .hd_meta_field > td {
	padding-left: 0;
}

.hd_meta_title {
	font-size: 1.3em;
	margin: 0 0 0.5em 0;
}
