.edit-post-visual-editor, .block-editor-block-styles, .block-editor-inserter__menu-help-panel { // target only the editor itself
  //@import 'node_modules/nhsuk-frontend/packages/nhsuk';

  @import 'assets/scss/nhsuk-replacement';

  ul {
	list-style : none;
  }

  @import 'assets/scss/generic-overrides'; // generic over-rides to remove default wordpress styling issues
  @import 'assets/scss/nhs-colours'; // nhs colour pallette


  @import 'assets/scss/style_variations'; //gutenberg blocks style variations

  .wp-block {
	max-width : 840px;
  }

  .wp-block[data-align=wide] { /* it can be "data-align=full" and also "right", "left" and "center" */
	max-width : 1228px;
  }

  .block-editor-block-list__block {
	font-family : $nhsuk-font, $nhsuk-font-fallback;
	font-size   : 16px;
  }
  // start importing the theme specific settings

  @import 'assets/scss/nhs-colours'; // nhs colour pallette
  @import 'assets/scss/nhsl-blocks'; // specific elements for nhsl-blocks plugin
  @import 'assets/scss/stripe-blocks';
  [data-type="nhsblocks/stripesblock"] {
	width: 100%;
	max-width: 100%;
	margin-left: 36px !important;
	margin-right: 36px !important;
	[data-type="nhsblocks/stripeblock"] {
	  max-width: 100%;
	  margin: 0 auto;
	}
  }


  //promo panel blockquote address button
  .nhsuk-promo {
	background : $color_nhsuk-white;
	border     : 1px solid transparent;
	box-shadow : 0 4px 0 0 $color_nhsuk-grey-4;

	.nhsuk-promo__content {
	  .editor-url-input__button {
		width      : 100%;
		text-align : center;
	  }

	  .editor-url-input__button:before {
		content : "Add link for this promo box";
	  }

	  [data-type="core/image"] ~ .block-list-appender {
		display : none;
	  }
	}
  }

  .nhsuk-list--cross {
	.editor-rich-text {
	  padding-left : 34px;
	}
  }

  .nhsuk-button {
	&:before {
	  position : relative !important;
	}
  }

  .wp-block-nhsblocks-panel1 {
	/* remove ability to add extra blocks inside panels, but leave ability to remove and move current inner blocks */
	.editor-default-block-appender, .editor-block-list__insertion-point {
	  display : none;
	}
  }

  @import 'assets/scss/style_variations'; //gutenberg blocks style variations
  .is-style-panel-with-label {
	h3 {
	  width  : fit-content;
	  height : 10px;
	}
  }

  .editor-styles-wrapper h3.nhsuk-care-card__heading {
	margin-top    : 0;
	margin-bottom : 0;
  }

  /* admin styles widget tweaks */
  .block-editor-block-styles__item-preview {
	.editor-styles-wrapper {
	  font-family : Frutiger W01, Helvetica, Arial, Sans-serif;
	}

	.wp-block-nhsblocks-nhsbutton {
	  padding   : 5px;
	  font-size : 0.7rem;
	}

	.is-style-expander {
	  .nhsuk-details__summary {
		padding : 0;
	  }
	}

	.nhsuk-inset-text {
	  margin-top : 0;
	}
  }

  .nhsuk-grid-column-full {
	.block-editor-inner-blocks {
	  width : 100%;
	}
  }

  /* Panel Group editor tweak */
  .nhsuk-promo-group, .nhsuk-card-group, .nhsuk-grid-row {
	.block-editor-inner-blocks {
	  width : 100%;
	  float : left;
	}
  }

  .nhsuk-do-dont-list {
	h3.nhsuk-do-dont-list__label {
	  .rich-text {
		color : $color_nhsuk-white;
	  }
	}

	li {
	  span {
		div.rich-text {
		  padding-left : 40px;
		}
	  }
	}
  }


  .wp-block-nhsblocks-dashpanel {
	.nhsuk-panel-with-label {
	  padding-bottom : 40%;
	}

	.nhsuk-panel-with-label__label {
	  z-index   : 2;
	  top       : 0;
	  margin    : 0 -20px;
	  top       : 50%;
	  max-width : 90%;

	  .rich-text {
		font-size : 1.1rem;
		color     : $color_nhsuk-white;
	  }
	}
  }

  div[data-type="nhsblocks/heroblock"] {
	max-width : 100%;

	div[data-type="nhsblocks/heroinner"] ~ div {
	  display : none;
	}

	.editor-inserter {
	  position   : relative;
	  top        : -100px;
	  background : white;
	  left       : -400px;
	}

	editor-inserter:nth-of-type(2) {
	  display : none;
	}

	.nhsuk-hero--image {
	  .nhsuk-hero__overlay {
		position      : relative;
		top           : 270px;
		margin-bottom : 100px;
		background    : none;
	  }
	}
  }

  /*
  Learn dash admin panel mitigation
   */
  #sfwd-header {
	.ld-global-header {
	  position : inherit;

	  h1 {
		font-size          : 1.5rem;
		margin-block-start : 0.5rem;
		margin-block-end   : 0.5rem;
		margin-bottom      : 0.5rem;
		line-height        : 1.6rem;
	  }
	}
  }

  .ld-tabs-ready .ld-tab-buttons a.button, .ld-tabs-ready .ld-tab-buttons button.button {
	margin-top : 0;
  }

  .ld-header-has-tabs {
	.edit-post-layout {
	  .edit-post-sidebar {
		top : 225px;
	  }

	  .edit-post-header {
		top     : 170px;
		padding : 0 7px;
	  }
	}
  }

  /* end LearnDash mitigation routine */

  /*
  Grouped Items blocks admin styles
  */

  .block-editor-block-list__layout {

	[data-type="nhsblocks/rowgroup"] .nhsuk-grid-row {

	  border : 1px dashed $color_nhsuk-bright-blue;

	  &:before {
		content          : 'Grouped Items';
		background-color : $color_nhsuk-bright-blue;
		color            : $color_nhsuk-white;
		position         : absolute;
		top              : 0;
		left             : 0;
		font-size        : 12px;
		padding          : 2px 5px;
	  }

	  .block-editor-block-list__layout {

		& > div {
		  clear : both;
		}

		[data-type="nhsblocks/onethird"],
		[data-type="nhsblocks/onehalf"],
		[data-type="nhsblocks/twothirds"],
		[data-type="nhsblocks/onequarter"],
		[data-type="nhsblocks/threequarters"] {
		  padding : 0;
		  border  : 1px dashed $color_nhsuk-black;
		  clear   : none;

		  &.has-child-selected {
			border   : 3px solid $color_nhsuk-warm-yellow;
			position : relative;
			z-index  : 5;
		  }
		}

	  }

	  %innerBlocks {
		float : none;
		width : 100%;
	  }

	  [data-type="nhsblocks/onethird"] {
		@extend .nhsuk-grid-column-one-third;

		.nhsuk-grid-column-one-third {
		  @extend %innerBlocks;
		}

	  }

	  [data-type="nhsblocks/onehalf"] {
		@extend .nhsuk-grid-column-one-half;

		.nhsuk-grid-column-one-half {
		  @extend %innerBlocks;
		}

	  }

	  [data-type="nhsblocks/twothirds"] {
		@extend .nhsuk-grid-column-two-thirds;

		.nhsuk-grid-column-two-thirds {
		  @extend %innerBlocks;
		}

	  }

	  [data-type="nhsblocks/onequarter"] {
		@extend .nhsuk-grid-column-one-quarter;

		.nhsuk-grid-column-one-quarter {
		  @extend %innerBlocks;
		}

	  }

	  [data-type="nhsblocks/threequarters"] {
		@extend .nhsuk-grid-column-three-quarters;

		.nhsuk-grid-column-three-quarters {
		  @extend %innerBlocks;
		}
	  }
	}

  }

  /* make the table cells more obvious when editing */
  .is-selected {
	figure.is-style-nhsuk-table-responsive {
	  thead, tr, th, td {
		border    : 1px dashed $color_nhsuk-grey-3;
		min-width : 2rem;
	  }
	}
  }


  /* clearfix after grouped items to sort out some display wirdiness */
  .block-editor-inner-blocks {
	@include clearfix();
  }
}

/* ==================================================
   NHS Tabs – Editor preview styles 
   ================================================== */

/* -------------------------------
   Panel preview (DO NOT reset layout)
   ------------------------------- */

.editor-styles-wrapper .nhsuk-tabs__panel {
	border: 1px solid #d8dde0;
	padding: 12px;
	margin-bottom: 12px;
	background: #ffffff;
}

/* Hide non-active panels ONLY */
.editor-styles-wrapper .nhsuk-tabs__panel--hidden {
	display: none;
}

/* -------------------------------
    (editor-only)
   ------------------------------- */

.editor-styles-wrapper .nhsuk-tabs__list {
	display: flex;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0 0 12px 0;
	border-bottom: 2px solid #d8dde0;
}

/* LI = wrapper only */
.editor-styles-wrapper .nhsuk-tabs__list-item {
	margin: 0;
	padding: 0;
}

/* A = actual tab UI */
.editor-styles-wrapper .nhsuk-tabs__tab {
	display: block;
	padding: 6px 10px;
	font-size: 14px;
	line-height: 1.3;
	background: #f0f4f5;
	text-decoration: underline;
	color: inherit;
}

/* Selected tab */

.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"] .nhsuk-tabs__tab {
	background-color: #d8dde0;
	color: #212b32;
	font-weight: bold;
}
.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"] .nhsuk-tabs__list-item--selected .nhsuk-tabs__tab {
	background-color: #ffffff;
	color: #212b32;
	text-decoration: none;
}


/* ===============================
   Tabs block – style variations
   Change TAB HEADER BACKGROUND
   =============================== */

/* =========================
   Tabs – Blue style (EDITOR)
   ========================= */

.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"][class*="is-style-blue"] .nhsuk-tabs__tab {
	background-color: #005eb8;
	color: #ffffff;
}

.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"][class*="is-style-blue"] .nhsuk-tabs__list-item--selected .nhsuk-tabs__tab {
	background-color: #ffffff;
	color: #212b32;
}

/* =========================
   Tabs – Reverse style (EDITOR)
   ========================= */

.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"][class*="is-style-reverse"] .nhsuk-tabs__tab {
	background-color: #212b32;
	color: #ffffff;
}

.editor-styles-wrapper .block-editor-block-list__block[data-type="nhsblocks/nhstabs"][class*="is-style-reverse"] .nhsuk-tabs__list-item--selected .nhsuk-tabs__tab {
	background-color: #ffffff;
	color: #212b32;
}

.block-editor-block-list__block.wp-block {
	max-width: 840px;
}

.block-editor-block-list__block.wp-block-nhsblocks-tags {
	display: block;
}

.wp-block-nhsblocks-doitem .block-editor-rich-text__editable,
.wp-block-nhsblocks-dontitem .block-editor-rich-text__editable {
	padding-left: 34px;
}


.editor-styles-wrapper .wp-block .nhsuk-striped-blocks{
	max-width: 840px;
	margin: auto;
}


.block-editor-block-list__block.wp-block-nhsblocks-nhsbutton {
	display: block;
}

.wp-block-nhsblocks-nhsbutton .nhsuk-button::before,
.wp-block-nhsblocks-nhsbutton .nhsuk-button::after {
	pointer-events: none;
}

.wp-block-nhsblocks-nhsbutton .block-editor-rich-text__editable {
	position: relative;
	z-index: 2;
	pointer-events: auto;
	cursor: text;
	user-select: text;
}
