/**
 * parish2 wp-admin + login styling.
 *
 * Two layers, matching the brief "same functionality, new GDS stylings":
 *   1. The Parish Online admin chrome — the admin menu bar + toolbar skin
 *      ported from parish's css/parish-admin.css (green menu, orange accent,
 *      hover colours) so the bars keep the parish identity.
 *   2. GDS styling for the theme's own admin screens (Home/General options
 *      pages) using the GOV.UK palette.
 * Enqueued by functions/admin.php on admin_enqueue_scripts and
 * login_enqueue_scripts. Self-contained: images resolve relative to this file
 * (assets/images/).
 *
 * Parish chrome palette (product branding, same on every site — as parish):
 *   --parish-primary #01573c   --parish-secondary #002B1E
 *   --parish-accent  #f8992d   --parish-text-color #fff
 * GDS palette:
 *   #1d70b8  GOV.UK blue          #0b0c0c  text
 *   #ffdd00  focus yellow         #00703c  green (primary action)
 *   #f3f2f1  light grey surface   #b1b4b6  mid-grey borders
 *   #505a5f  secondary text       #d4351c  red (destructive)
 */

:root {
	--parish-primary: #01573c;
	--parish-secondary: #002B1E;
	--parish-text-color: #fff;
	--parish-accent: #f8992d;
}

/* ------------------------------------------------------------------ */
/* Admin menu bar — parish skin (ported from css/parish-admin.css).   */
/* Green bar, white labels, orange icons; hover/open = dark green     */
/* background with orange text.                                       */
/* ------------------------------------------------------------------ */

html.wp-toolbar {
	padding-top: 0px;
}

#adminmenu, #adminmenu .wp-submenu, #adminmenuback, #adminmenuwrap {
	width: 200px;
	background-color: var(--parish-primary);
}

#wpcontent {
	padding-top: 61px;
}

.folded #adminmenuwrap #adminmenu::before {
	background-image: url(../images/parishonline_stacked_white.png);
	padding-left: 25px;
	padding-bottom: 25px;
	margin-bottom: 10px;
	margin-top: 10px;
	margin-right: 3px;
	margin-left: 0px;
}

#adminmenu li.wp-menu-separator {
	height: 5px;
	padding: 0;
	margin: 0 0 6px;
	cursor: inherit;
	background-color: var(--parish-secondary);
}

.folded #adminmenu,
.folded #adminmenu li.menu-top,
.folded #adminmenuback,
.folded #adminmenuwrap {
	width: 40px;
}

#wpcontent, #wpfooter {
	margin-left: 200px;
}

#adminmenu .wp-submenu-head, #adminmenu a.menu-top {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
	padding: 0;
	min-height: 50px;
}

#adminmenu div.wp-menu-image {
	float: none;
	width: 50px;
	height: 23px;
	margin: 0;
	text-align: left;
}

#adminmenu div.wp-menu-name {
	padding: 0;
	overflow-wrap: break-word;
	word-wrap: break-word;
	-ms-word-break: break-all;
	word-break: break-word;
	hyphens: auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

#adminmenu .wp-submenu li a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

#adminmenu a {
	display: flex;
	line-height: 1.3;
	padding: 2px 5px;
	color: var(--parish-text-color);
	align-items: center;
}

#adminmenu div.wp-menu-image:before {
	color: var(--parish-accent);
	height: 23px;
	width: 100%;
	line-height: 1;
	padding: 0;
}

#adminmenu li.menu-top {
	border: none;
	min-height: 50px;
	position: relative;
}

#adminmenu .awaiting-mod, #adminmenu .menu-counter, #adminmenu .update-plugins {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: top;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	min-width: 20px;
	height: 20px;
	border-radius: 9px;
	background-color: #d63638;
	color: #fff;
	font-size: 11px;
	line-height: 1.6;
	text-align: center;
	z-index: 26;
}

body #adminmenu li.menu-top:hover,
body #adminmenu li.menu-top:hover > a,
body #adminmenu li.opensub > a.menu-top,
body #adminmenu li > a.menu-top:focus {
	position: relative;
	background-color: var(--parish-secondary) !important;
	color: var(--parish-accent) !important;
}

body #adminmenu li a:focus div.wp-menu-image:before,
body #adminmenu li.opensub div.wp-menu-image:before,
body #adminmenu li:hover div.wp-menu-image:before {
	color: var(--parish-accent) !important;
}

body #adminmenu .wp-submenu a:focus,
body #adminmenu .wp-submenu a:hover,
body #adminmenu a:hover,
body #adminmenu li.menu-top > a:focus {
	color: var(--parish-accent) !important;
}

#adminmenu .wp-submenu {
	list-style: none;
	position: absolute;
	top: -1000em;
	left: 200px;
	overflow: visible;
	word-wrap: break-word;
	padding: 7px 0 8px;
	z-index: 9999;
	background-color: var(--parish-secondary);
	box-shadow: 0 3px 5px rgba(0, 0, 0, .2);
}

#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after,
#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after {
	border-right-color: var(--parish-secondary);
}

#adminmenu .wp-submenu a {
	color: var(--parish-text-color);
	font-size: 13px;
	line-height: 1.4;
	margin: 0;
	padding: 5px 0;
}

#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,
#adminmenu .wp-menu-arrow, #adminmenu .wp-menu-arrow div,
#adminmenu li.current a.menu-top,
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu {
	background: var(--parish-secondary);
	color: #fff;
}

/* ------------------------------------------------------------------ */
/* Admin toolbar — parish skin. Orange bar beside the fixed menu;     */
/* hover/open = dark green background with orange text.               */
/* ------------------------------------------------------------------ */

#wpadminbar {
	background: var(--parish-accent);
	color: #ccc;
	height: 61px;
	left: 200px;
	padding: 0 10px;
	right: 0;
	width: auto;
	z-index: 9998;
}

@media screen and (max-width: 960px) {
	#wpadminbar {
		height: 36px;
	}
}

@media screen and (max-width: 782px) {
	#wpadminbar {
		padding: 0;
	}
}

.folded #wpadminbar {
	height: 36px;
	left: 36px;
}

@media only screen and (max-width: 960px) {
	#wpcontent #wpadminbar {
		left: 200px;
	}
	.auto-fold #wpcontent #wpadminbar {
		left: 36px;
	}
}

@media screen and (max-width: 782px) {
	.folded #wpadminbar {
		height: 46px;
		left: 0;
	}
	.auto-fold #wpcontent #wpadminbar {
		left: 0;
	}
}

#wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper {
	padding: 6px 0;
}

#wpadminbar .ab-submenu {
	padding: 0;
}

#wpadminbar .ab-submenu li {
	padding: 0 0;
}

.focus-on #wpadminbar {
	transition-duration: 0.6s;
	transition-property: transform;
	transition-timing-function: ease-in-out;
	transform: translateY(-100%);
}

.focus-off #wpadminbar {
	transform: translateY(0);
	transition-duration: 0.2s;
	transition-property: transform;
	transition-timing-function: ease-in-out;
}

#wpadminbar .ab-top-menu > li.hover > .ab-item,
#wpadminbar .ab-top-menu > li:hover > .ab-item,
#wpadminbar .ab-top-menu > li > .ab-item:focus,
#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
#wpadminbar .menupop .ab-sub-wrapper,
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {
	background: var(--parish-secondary);
	color: black;
}

#wpadminbar #adminbarsearch:before,
#wpadminbar .ab-icon:before,
#wpadminbar .ab-item:before,
#wpadminbar a.ab-item,
#wpadminbar > #wp-toolbar span.ab-label,
#wpadminbar > #wp-toolbar span.noticon {
	color: #000;
}

#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a,
#wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:focus strong,
#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:hover strong,
#wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar .quicklinks .menupop.hover ul li a:hover,
#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus, #wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover,
#wpadminbar li #adminbarsearch.adminbar-focused:before,
#wpadminbar li .ab-item:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before,
#wpadminbar li a:focus .ab-icon:before, #wpadminbar li.hover .ab-icon:before,
#wpadminbar li.hover .ab-item:before, #wpadminbar li:hover #adminbarsearch:before,
#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover {
	color: var(--parish-accent);
}

#wpadminbar .ab-top-menu > li.hover > .ab-item,
#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
#wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item,
#wpadminbar:not(.mobile) .ab-top-menu > li > .ab-item:focus {
	color: var(--parish-accent);
}

#wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label,
#wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label,
#wpadminbar > #wp-toolbar li.hover span.ab-label {
	color: var(--parish-accent);
}

#wpadminbar li .ab-item:focus:before,
#wpadminbar li .ab-item:hover,
#wpadminbar li a:focus .ab-icon:before,
#wpadminbar li.hover .ab-icon:before,
#wpadminbar li.hover .ab-item:before,
#wpadminbar li:hover #adminbarsearch:before,
#wpadminbar li:hover .ab-icon:before,
#wpadminbar li:hover .ab-item:before,
#wpadminbar > #wp-toolbar a:focus span.ab-label,
#wpadminbar > #wp-toolbar li.hover span.ab-label,
#wpadminbar > #wp-toolbar li:hover span.ab-label {
	transition-duration: 0ms;
	color: var(--parish-accent);
}

#wpadminbar .ab-submenu .ab-item,
#wpadminbar .quicklinks .menupop ul li a,
#wpadminbar .quicklinks .menupop ul li a strong,
#wpadminbar .quicklinks .menupop.hover ul li a,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a {
	color: white;
}

#wpadminbar .quicklinks .menupop ul li a:focus,
#wpadminbar .quicklinks .menupop ul li a:focus strong,
#wpadminbar .quicklinks .menupop ul li a:hover,
#wpadminbar .quicklinks .menupop ul li a:hover strong,
#wpadminbar .quicklinks .menupop.hover ul li a:focus,
#wpadminbar .quicklinks .menupop.hover ul li a:hover,
#wpadminbar li .ab-item:focus:before,
#wpadminbar li a:focus .ab-icon:before,
#wpadminbar li.hover .ab-icon:before,
#wpadminbar li.hover .ab-item:before,
#wpadminbar li:hover #adminbarsearch:before,
#wpadminbar li:hover .ab-icon:before,
#wpadminbar li:hover .ab-item:before,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover {
	color: var(--parish-accent);
}

#wpcontent #wp-admin-bar-root-default > li > a,
#wpcontent #wp-admin-bar-root-default > li > button,
#wpcontent #wp-admin-bar-root-default > li > div,
#wpcontent #wp-admin-bar-top-secondary > li > a,
#wpcontent #wp-admin-bar-top-secondary > li > button,
#wpcontent #wpadminbar #wp-admin-bar-wp-logo > .ab-item {
	padding: 14px 10px 15px 10px;
}

.folded #wpcontent #wp-admin-bar-root-default > li > a,
.folded #wpcontent #wp-admin-bar-root-default > li > button,
.folded #wpcontent #wp-admin-bar-root-default > li > div,
.folded #wpcontent #wp-admin-bar-top-secondary > li > a,
.folded #wpcontent #wp-admin-bar-top-secondary > li > button,
.folded #wpcontent #wpadminbar #wp-admin-bar-wp-logo > .ab-item {
	padding: 2px 7px 2px 7px;
}

@media screen and (max-width: 960px) {
	#wpcontent #wp-admin-bar-root-default > li > a,
	#wpcontent #wp-admin-bar-root-default > li > button,
	#wpcontent #wp-admin-bar-root-default > li > div,
	#wpcontent #wp-admin-bar-top-secondary > li > a,
	#wpcontent #wp-admin-bar-top-secondary > li > button,
	#wpcontent #wpadminbar #wp-admin-bar-wp-logo > .ab-item {
		padding: 2px 7px 2px 7px;
	}
}

@media screen and (max-width: 782px) {
	#wpcontent #wp-admin-bar-root-default > li > a,
	#wpcontent #wp-admin-bar-root-default > li > button,
	#wpcontent #wp-admin-bar-root-default > li > div,
	#wpcontent #wp-admin-bar-top-secondary > li > a,
	#wpcontent #wp-admin-bar-top-secondary > li > button,
	#wpcontent #wpadminbar #wp-admin-bar-wp-logo > .ab-item,
	.folded #wpcontent #wp-admin-bar-root-default > li > a,
	.folded #wpcontent #wp-admin-bar-root-default > li > button,
	.folded #wpcontent #wp-admin-bar-root-default > li > div,
	.folded #wpcontent #wp-admin-bar-top-secondary > li > a,
	.folded #wpcontent #wp-admin-bar-top-secondary > li > button,
	.folded #wpcontent #wpadminbar #wp-admin-bar-wp-logo > .ab-item {
		padding: 0;
	}
}

/* Misc parity rules carried over from parish-admin.css. */
.accordion-section-title button.accordion-trigger {
	all: unset;
	width: 100%;
	height: auto;
	padding: 10px 30px 11px 14px;
	display: flex;
	align-items: center;
	box-sizing: border-box;
}

#filebird-root {
	margin-top: 50px !important;
}

/* ------------------------------------------------------------------ */
/* Parish Online logo above the admin menu (ported from parish's      */
/* wpb_custom_logo inline style).                                     */
/* ------------------------------------------------------------------ */

#adminmenu::before {
	content: "";
	background: url(../images/parishonline_stacked_white.png);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	padding-left: 75px;
	padding-bottom: 75px;
	margin-bottom: 20px;
	margin-top: 20px;
	margin-right: 10px;
	margin-left: 10px;
	display: block;
}

/* ------------------------------------------------------------------ */
/* Stop parish users collapsing/reordering metaboxes and then         */
/* complaining they are missing (ported from parish).                 */
/* ------------------------------------------------------------------ */

.handle-actions {
	display: none !important;
}

.js .postbox .hndle {
	cursor: default;
}

/* ------------------------------------------------------------------ */
/* ACF repeater controls — GDS "add to a list" pattern (MoJ Design    */
/* System): the list is a GOV.UK summary list, so each row gets       */
/* "Change" / "Remove" as plain govuk-link actions (blue links, not   */
/* buttons — warning red is reserved for destructive, hard-to-undo    */
/* actions), plus one grey *secondary* "Add Row" button at the bottom */
/* (MoJ add-another; green primary stays reserved for the page's      */
/* save action). The per-row "+" is hidden: it duplicates the bottom  */
/* Add Row, and rows can still be reordered by dragging the handle.   */
/* Restyling only — ACF's markup/behaviour (data-event handlers) is   */
/* untouched, same layering as the colour-picker and tracking-lock    */
/* enhancements.                                                      */
/* ------------------------------------------------------------------ */

.acf-taxonomy-field .acf-actions {
	display: block;
}

/* The ACF repeater +/- CONTROL relabelling (per-row "+" hidden, "–" -> a
   "Remove" text link) moved to assets/admin-repeater-controls.css so it can be
   toggled off (Appearance -> GDS levels). It loads only in GDS mode; Legacy mode
   keeps ACF's native icons. */

/* Summary-list values are plain text, not nested inputs: flatten ACF's
   bordered link-value chip inside repeater rows. Standalone link fields
   keep the chip — there it reads as the field's control. */
.acf-repeater .acf-field-link .link-wrap {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
}

.acf-repeater .acf-field-link .link-wrap .link-title {
	padding-left: 0;
}

/* Remove confirmation (assets/admin-repeater.js) — GOV.UK Publishing
   "modal dialogue" (the core Design System has no modal; publisher/admin
   tooling uses this component): page-centred white panel over a dark
   overlay, heading + body + actions at full GOV.UK type scale. Warning
   red belongs here, at the point of confirmation, not on the everyday
   Remove link. Native <dialog> supplies the focus trap and Escape. */
.parish2-confirm-dialog {
	width: calc(100% - 40px);
	max-width: 440px;
	padding: 30px;
	border: 0;
	background: #ffffff;
	color: #0b0c0c;
}

.parish2-confirm-dialog::backdrop {
	background: rgba(11, 12, 12, 0.7);
}

.parish2-confirm-dialog__title {
	margin: 0 0 15px;
	color: #0b0c0c;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.parish2-confirm-dialog__body {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.4;
}

.parish2-confirm-dialog__actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.parish2-confirm-dialog__yes {
	padding: 8px 12px 7px;
	border: 2px solid transparent;
	background: #d4351c;
	box-shadow: 0 2px 0 #55150b;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.parish2-confirm-dialog__yes:hover {
	background: #aa2a16;
}

.parish2-confirm-dialog__yes:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: 0 2px 0 #0b0c0c;
}

.parish2-confirm-dialog__cancel {
	padding: 0;
	border: 0;
	background: none;
	color: #1d70b8;
	font-size: 16px;
	line-height: 1.4;
	text-decoration: underline;
	cursor: pointer;
}

.parish2-confirm-dialog__cancel:hover {
	color: #003078;
}

.parish2-confirm-dialog__cancel:focus {
	outline: none;
	background: #ffdd00;
	color: #0b0c0c;
	text-decoration: none;
	box-shadow: 0 -2px #ffdd00, 0 4px #0b0c0c;
}

/* ------------------------------------------------------------------ */
/* WP "Insert/edit link" modal (#wp-link) — opened by ACF link fields */
/* and the classic editor. Sits outside .acf-field so the options-    */
/* screen rules never reach it; restated here (global, like the       */
/* repeater rules) so the modal matches the GDS field styling: 2px    */
/* black inputs, yellow focus, GOV.UK checkbox and buttons.           */
/* ------------------------------------------------------------------ */

#wp-link-wrap {
	border-radius: 0;
}

#wp-link-wrap #link-modal-title {
	color: #0b0c0c;
	font-weight: 700;
}

#wp-link .howto {
	color: #505a5f;
}

#wp-link input[type="text"],
#wp-link input[type="search"] {
	border: 2px solid #0b0c0c;
	border-radius: 0;
	box-shadow: none;
	color: #0b0c0c;
}

#wp-link input[type="text"]:focus,
#wp-link input[type="search"]:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: inset 0 0 0 2px #0b0c0c;
	border-color: #0b0c0c;
}

#wp-link input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0 8px 0 0;
	border: 2px solid #0b0c0c;
	border-radius: 0;
	background: #ffffff;
	box-shadow: none;
	vertical-align: middle;
	cursor: pointer;
}

#wp-link input[type="checkbox"]:checked::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 7px;
	height: 12px;
	margin: 0;
	border: solid #0b0c0c;
	border-width: 0 3px 3px 0;
	background: none;
	transform: rotate(45deg);
}

#wp-link input[type="checkbox"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px #ffdd00;
	border-color: #0b0c0c;
}

/* Results list: GDS palette for the notice, hover state and type tags. */
#wp-link .query-notice {
	background: #f3f2f1;
	border-left: 5px solid #1d70b8;
	color: #0b0c0c;
}

#wp-link .query-results li:hover {
	background: #f3f2f1;
}

#wp-link .item-info {
	color: #505a5f;
}

/* Footer buttons: GOV.UK secondary (Cancel) + green primary (Add Link),
   on every screen the modal opens from — not just the options pages. */
#wp-link-wrap .submitbox .button {
	background: #f3f2f1;
	border-color: #f3f2f1;
	border-radius: 0;
	color: #0b0c0c;
	text-shadow: none;
	box-shadow: 0 2px 0 #929191;
	font-weight: 700;
}

#wp-link-wrap .submitbox .button:hover {
	background: #dbdad9;
	border-color: #dbdad9;
	color: #0b0c0c;
}

#wp-link-wrap .submitbox .button-primary,
#wp-link-wrap #wp-link-submit {
	background: #00703c;
	border-color: #00703c;
	color: #ffffff;
	box-shadow: 0 2px 0 #002d18;
}

#wp-link-wrap .submitbox .button-primary:hover,
#wp-link-wrap #wp-link-submit:hover {
	background: #005a30;
	border-color: #005a30;
	color: #ffffff;
}

#wp-link-wrap .submitbox .button:focus,
#wp-link-wrap #wp-link-submit:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: 0 2px 0 #0b0c0c;
}

/* GOV.UK-style visually hidden text (live-region announcements). */
.parish2-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

/* The repeater's bottom "Add Row" button: GOV.UK *secondary* (grey)
   button on every admin screen — in the MoJ "Add another" pattern the
   add button is secondary; green primary stays reserved for the page's
   save/update action. */
.acf-repeater > .acf-actions .acf-button {
	background: #f3f2f1;
	border-color: #f3f2f1;
	border-radius: 0;
	color: #0b0c0c;
	text-shadow: none;
	box-shadow: 0 2px 0 #929191;
	font-weight: 700;
}

.acf-repeater > .acf-actions .acf-button:hover {
	background: #dbdad9;
	border-color: #dbdad9;
	color: #0b0c0c;
}

.acf-repeater > .acf-actions .acf-button:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: 0 2px 0 #0b0c0c;
	color: #0b0c0c;
}

/* The ACF link-field pencil/cross -> "Change"/"Clear" relabelling also moved to
   assets/admin-repeater-controls.css (loaded only in GDS mode; Legacy mode keeps
   ACF's native pencil/cross icons). */

.acf-th label {
	font-weight: 500;
	font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Home + General options pages (admin.php?page=home / ?page=general) */
/* — the fleet's admin landing screens. GDS visual language: light    */
/* grey canvas, square white cards with grey borders and a blue       */
/* accent, bold near-black headings, green primary buttons, yellow    */
/* focus states.                                                      */
/* ------------------------------------------------------------------ */

body.toplevel_page_home #wpcontent,
body.toplevel_page_general #wpcontent {
	background: #f3f2f1;
}

body.toplevel_page_home .wrap h1,
body.toplevel_page_general .wrap h1 {
	color: #0b0c0c;
	font-weight: 700;
	font-size: 2rem;
	line-height: 1.1;
	padding-bottom: 10px;
	border-bottom: 4px solid #1d70b8;
	display: inline-block;
}

/* Postboxes as GOV.UK summary cards (govuk-summary-card, part of the
   summary list component): 1px mid-grey border, light-grey title bar,
   bold 19px title, white content area. Replaces an earlier custom
   blue-top-bar treatment that matched no Design System component. */
body.toplevel_page_home .postbox,
body.toplevel_page_general .postbox {
	background: #ffffff;
	border: 1px solid #b1b4b6;
	border-radius: 0;
	box-shadow: none;
}

body.toplevel_page_home .postbox .postbox-header,
body.toplevel_page_general .postbox .postbox-header {
	background: #f3f2f1;
	border-bottom: 1px solid transparent;
	padding: 7px 15px;
}

body.toplevel_page_home .postbox .hndle,
body.toplevel_page_general .postbox .hndle,
body.toplevel_page_home .postbox .postbox-header h2,
body.toplevel_page_general .postbox .postbox-header h2 {
	color: #0b0c0c;
	font-size: 1.1875rem;
	font-weight: 700;
	padding: 8px 0;
}

body.toplevel_page_home .postbox .inside,
body.toplevel_page_general .postbox .inside {
	padding: 15px;
	margin-top: 0;
}

body.toplevel_page_home .acf-field .acf-label label,
body.toplevel_page_general .acf-field .acf-label label {
	color: #0b0c0c;
	font-weight: 700;
}

body.toplevel_page_home .acf-field p.description,
body.toplevel_page_general .acf-field p.description {
	color: #505a5f;
}

body.toplevel_page_home .acf-field input[type="text"],
body.toplevel_page_home .acf-field input[type="url"],
body.toplevel_page_home .acf-field input[type="email"],
body.toplevel_page_home .acf-field input[type="number"],
body.toplevel_page_home .acf-field textarea,
body.toplevel_page_home .acf-field select,
body.toplevel_page_general .acf-field input[type="text"],
body.toplevel_page_general .acf-field input[type="url"],
body.toplevel_page_general .acf-field input[type="email"],
body.toplevel_page_general .acf-field input[type="number"],
body.toplevel_page_general .acf-field textarea,
body.toplevel_page_general .acf-field select {
	border: 2px solid #0b0c0c;
	border-radius: 0;
	box-shadow: none;
	color: #0b0c0c;
}

body.toplevel_page_home .acf-field input:focus,
body.toplevel_page_home .acf-field textarea:focus,
body.toplevel_page_home .acf-field select:focus,
body.toplevel_page_general .acf-field input:focus,
body.toplevel_page_general .acf-field textarea:focus,
body.toplevel_page_general .acf-field select:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: inset 0 0 0 2px #0b0c0c;
	border-color: #0b0c0c;
}

/* Selects size to their content (GOV.UK guidance: field widths proportional
   to the expected input; govuk-select is auto-width, 40px tall) — ACF
   stretches them to 100% of the card. */
body.toplevel_page_home .acf-field select,
body.toplevel_page_general .acf-field select {
	width: auto;
	max-width: 100%;
	min-height: 40px;
	padding: 5px 30px 5px 5px;
}

/* Radios and checkboxes as GOV.UK small radios/checkboxes: 24px, 2px black
   border, black dot/tick, yellow focus — replaces the WP-default 16px blue
   controls. Native inputs restyled via appearance:none; markup untouched. */
body.toplevel_page_home .acf-field input[type="radio"],
body.toplevel_page_general .acf-field input[type="radio"],
body.toplevel_page_home .acf-field input[type="checkbox"],
body.toplevel_page_general .acf-field input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0 8px 0 0;
	border: 2px solid #0b0c0c;
	border-radius: 0;
	background: #ffffff;
	box-shadow: none;
	vertical-align: middle;
	cursor: pointer;
}

body.toplevel_page_home .acf-field input[type="radio"],
body.toplevel_page_general .acf-field input[type="radio"] {
	border-radius: 50%;
}

body.toplevel_page_home .acf-field input[type="radio"]:checked::before,
body.toplevel_page_general .acf-field input[type="radio"]:checked::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	/* Explicit size + translate-centre: WordPress's default radio ::before sets
	   width/height on the dot, which would otherwise win over top/right/bottom/
	   left and pin the dot to a corner. */
	width: 10px;
	height: 10px;
	margin: 0;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #0b0c0c;
}

body.toplevel_page_home .acf-field input[type="checkbox"]:checked::before,
body.toplevel_page_general .acf-field input[type="checkbox"]:checked::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 7px;
	height: 12px;
	margin: 0;
	border: solid #0b0c0c;
	border-width: 0 3px 3px 0;
	background: none;
	transform: rotate(45deg);
}

body.toplevel_page_home .acf-field input[type="radio"]:focus,
body.toplevel_page_general .acf-field input[type="radio"]:focus,
body.toplevel_page_home .acf-field input[type="checkbox"]:focus,
body.toplevel_page_general .acf-field input[type="checkbox"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px #ffdd00;
	border-color: #0b0c0c;
}


/* True/false (checkbox) fields in the GOV.UK checkboxes arrangement: box on
   the left, label text beside it at regular weight — not ACF's default bold
   heading above a bare box (a GOV.UK checkbox's label always sits next to
   it). Pure reordering via flex; ACF's markup is untouched. */
body.toplevel_page_home .acf-field-true-false,
body.toplevel_page_general .acf-field-true-false {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
}

body.toplevel_page_home .acf-field-true-false .acf-label,
body.toplevel_page_general .acf-field-true-false .acf-label {
	margin: 0;
}

body.toplevel_page_home .acf-field-true-false .acf-label label,
body.toplevel_page_general .acf-field-true-false .acf-label label {
	font-weight: 400;
	margin: 0;
}

body.toplevel_page_home .acf-field-true-false .acf-input,
body.toplevel_page_general .acf-field-true-false .acf-input {
	line-height: 1;
}

/* Primary (publish/update) buttons: GOV.UK green button. */
body.toplevel_page_home .button-primary,
body.toplevel_page_general .button-primary {
	background: #00703c;
	border-color: #00703c;
	border-radius: 0;
	color: #ffffff;
	text-shadow: none;
	box-shadow: 0 2px 0 #002d18;
	font-weight: 700;
}

body.toplevel_page_home .button-primary:hover,
body.toplevel_page_general .button-primary:hover {
	background: #005a30;
	border-color: #005a30;
}

body.toplevel_page_home .button-primary:focus,
body.toplevel_page_general .button-primary:focus {
	outline: 3px solid #ffdd00;
	outline-offset: 0;
	box-shadow: 0 2px 0 #0b0c0c;
}

/* Secondary buttons: GDS secondary (grey) button. */
body.toplevel_page_home .button-secondary,
body.toplevel_page_general .button-secondary,
body.toplevel_page_home .acf-button.button:not(.button-primary),
body.toplevel_page_general .acf-button.button:not(.button-primary) {
	background: #f3f2f1;
	border-color: #f3f2f1;
	border-radius: 0;
	color: #0b0c0c;
	box-shadow: 0 2px 0 #929191;
}

body.toplevel_page_home .button-secondary:hover,
body.toplevel_page_general .button-secondary:hover,
body.toplevel_page_home .acf-button.button:not(.button-primary):hover,
body.toplevel_page_general .acf-button.button:not(.button-primary):hover {
	background: #dbdad9;
	border-color: #dbdad9;
	color: #0b0c0c;
}

body.toplevel_page_home a,
body.toplevel_page_general a {
	color: #1d70b8;
}

body.toplevel_page_home a:hover,
body.toplevel_page_general a:hover {
	color: #003078;
}

/* ------------------------------------------------------------------ */
/* Hide EWWW Image Optimizer notices from non-admins (parish echoed   */
/* this inline; parish2 scopes it via the parish2-non-admin body      */
/* class added in functions/admin.php).                               */
/* ------------------------------------------------------------------ */

.parish2-non-admin #ewww-image-optimizer-warning-exec,
.parish2-non-admin #ewww-image-optimizer-media-listmode {
	display: none !important;
}

/* ------------------------------------------------------------------ */
/* Login screen — matches the base parish theme: the large Parish     */
/* Online colour logo over the stock WordPress login (ported from     */
/* parish's my_login_logo inline style).                              */
/* ------------------------------------------------------------------ */

#login h1 a,
.login h1 a {
	background-image: url(../images/parish_online_logo_colour.png);
	height: 140px;
	width: 320px;
	background-size: 320px auto;
	background-repeat: no-repeat;
}
