/* svp/tabs frontend */
.svp-tabs { margin-bottom: 30px; }

.svp-tabs__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 2px solid #b1b4b6;
}
.svp-tabs__list-item {
	margin: 0 4px 0 0;
	padding: 0;
}
.svp-tabs__tab {
	display: block;
	position: relative;
	bottom: -2px;
	padding: 10px 20px;
	border: 2px solid transparent;
	border-bottom: 0;
	border-radius: 3px 3px 0 0;
	background: transparent;
	color: #005ea5;
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: underline;
	text-underline-offset: .15em;
	cursor: pointer;
	white-space: nowrap;
}
.svp-tabs__tab:hover {
	background: #f3f2f1;
	color: #003078;
	text-decoration-thickness: 3px;
}
.svp-tabs__tab:focus {
	outline: 3px solid #d96e00;
	outline-offset: 0;
	background: #ffdd00;
	color: #0b0c0c;
	text-decoration: none;
	z-index: 1;
}
.svp-tabs__list-item--selected .svp-tabs__tab {
	border-color: #b1b4b6;
	border-bottom-color: #fff;
	background: #fff;
	color: #0b0c0c;
	text-decoration: none;
}
.svp-tabs__panel {
	padding: 20px;
	border: 2px solid #b1b4b6;
	border-top: 0;
	background: #fff;
}
.svp-tabs__panel--hidden { display: none; }
.svp-tabs__panel > :first-child { margin-top: 0; }
.svp-tabs__panel > :last-child  { margin-bottom: 0; }

@media (max-width: 40.0525em) {
	.svp-tabs__list { display: block; border-bottom: 0; }
	.svp-tabs__list-item { margin: 0 0 4px; }
	.svp-tabs__tab {
		border: 2px solid #b1b4b6;
		border-radius: 3px;
		bottom: 0;
		background: #f3f2f1;
	}
	.svp-tabs__list-item--selected .svp-tabs__tab {
		border-bottom-color: #b1b4b6;
		background: #fff;
	}
	.svp-tabs__panel { border: 2px solid #b1b4b6; padding: 15px; }
}
.svp-tabs__select-wrap { display: none; }
.svp-tabs__select { display: none; }

@media (max-width: 48.0625em) {
	.svp-tabs__select-wrap {
		display: block;
		margin-bottom: 1.25rem;
		padding: 0.875rem;
		border: 1px solid #d8dde0;
		border-left: 4px solid var(--svp-brand, #0052a5);
		border-radius: 8px;
		background: #f8fafc;
		box-shadow: 0 1px 3px rgba(0, 82, 165, 0.08);
	}

	.svp-tabs__select-label {
		display: block;
		margin: 0 0 0.35rem;
		color: #0b0c0c;
		font-size: 0.875rem;
		font-weight: 700;
		line-height: 1.3;
	}

	.svp-tabs__select {
		display: none;
	}

	.svp-tabs__dropdown {
		position: relative;
	}

	.svp-tabs__dropdown-button {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 2.75rem;
		margin: 0;
		padding: 0.55rem 2.5rem 0.55rem 0.75rem;
		border: 2px solid var(--svp-brand, #0052a5);
		border-radius: 6px;
		background-color: #fff;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%230052a5' d='M5.2 7.5 10 12.3l4.8-4.8 1.2 1.2-6 6-6-6z'/%3E%3C/svg%3E");
		background-position: right 0.75rem center;
		background-repeat: no-repeat;
		background-size: 1.25rem;
		color: #062c66;
		font-family: inherit;
		font-size: 1rem;
		font-weight: 700;
		line-height: 1.35;
		text-align: left;
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
		cursor: pointer;
	}

	.svp-tabs__dropdown-button:focus {
		outline: 3px solid #d96e00;
		outline-offset: 0;
		border-color: #0b0c0c;
		box-shadow: 0 0 0 3px #ffdd00;
	}

	.svp-tabs__dropdown-list {
		display: none;
		position: absolute;
		top: calc(100% + 0.35rem);
		right: 0;
		left: 0;
		z-index: 20;
		max-height: 16rem;
		overflow-y: auto;
		border: 2px solid var(--svp-brand, #0052a5);
		border-radius: 6px;
		background: #fff;
		box-shadow: 0 8px 18px rgba(11, 12, 12, 0.16);
	}

	.svp-tabs__dropdown--open .svp-tabs__dropdown-list {
		display: block;
	}

	.svp-tabs__dropdown-option {
		display: block;
		width: 100%;
		padding: 0.65rem 0.75rem;
		border: 0;
		border-bottom: 1px solid #e5e7eb;
		background: #fff;
		color: #062c66;
		font-family: inherit;
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1.35;
		text-align: left;
		cursor: pointer;
	}

	.svp-tabs__dropdown-option:last-child {
		border-bottom: 0;
	}

	.svp-tabs__dropdown-option:hover,
	.svp-tabs__dropdown-option:focus {
		outline: 0;
		background: #e8f0f8;
		color: #003078;
	}

	.svp-tabs__dropdown-option--selected {
		background: #f3f8ff;
		color: #0b0c0c;
		box-shadow: inset 4px 0 0 var(--svp-brand, #0052a5);
	}

	.svp-tabs__list { display: none; }
}

/* ── Links inside tab panels: bare <a> gets govuk-link treatment ── */
.svp-tabs__panel a:not([class]),
.svp-tabs__panel a.govuk-link {
  color: #062c66;
  text-decoration: underline;
  text-decoration-thickness: max(1px, .0625rem);
  text-underline-offset: .1578em;
}

.svp-tabs__panel a:not([class]):visited,
.svp-tabs__panel a.govuk-link:visited {
  color: #4c2c92;
}

.svp-tabs__panel a:not([class]):hover,
.svp-tabs__panel a.govuk-link:hover {
  color: #003078;
  text-decoration-thickness: max(3px, .1875rem, .12em);
}

.svp-tabs__panel a:not([class]):focus,
.svp-tabs__panel a.govuk-link:focus {
  outline: 3px solid #d96e00;
  outline-offset: 3px;
  background: #ffdd00;
  color: #0b0c0c;
  text-decoration: none;
  border-radius: 5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ── wp-block-file inside tab panels ─────────────────────────── */
.svp-tabs__panel .wp-block-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #d8dde0;
  border-left: 4px solid var(--svp-brand, #0052a5);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
}

.svp-tabs__panel .wp-block-file > a:not(.wp-block-file__button) {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: #062c66;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .1578em;
  overflow-wrap: anywhere;
}

.svp-tabs__panel .wp-block-file > a:not(.wp-block-file__button):hover {
  color: #003078;
}

.svp-tabs__panel .wp-block-file .wp-block-file__button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--svp-brand, #0052a5);
  border-radius: 4px;
  background: var(--svp-brand, #0052a5);
  color: #fff !important;
  font-weight: 700;
  font-size: inherit;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.svp-tabs__panel .wp-block-file .wp-block-file__button:hover {
  background: #003f7f;
  border-color: #003f7f;
  color: #fff !important;
}

.svp-tabs__panel .wp-block-file .wp-block-file__button:focus {
  outline: 3px solid #d96e00;
  outline-offset: 0;
}
/* ── Catch-all link styling for normal links inside tab panels ── */
.svp-tabs__panel a:not(.wp-block-file__button):not(.wp-element-button) {
  color: #062c66;
  text-decoration: underline;
  text-decoration-thickness: max(1px, .0625rem);
  text-underline-offset: .1578em;
}

.svp-tabs__panel a:not(.wp-block-file__button):not(.wp-element-button):visited {
  color: #4c2c92;
}

.svp-tabs__panel a:not(.wp-block-file__button):not(.wp-element-button):hover {
  color: #003078;
  text-decoration-thickness: max(3px, .1875rem, .12em);
}

.svp-tabs__panel a:not(.wp-block-file__button):not(.wp-element-button):focus {
  outline: 3px solid #d96e00;
  outline-offset: 3px;
  background: #ffdd00;
  color: #0b0c0c;
  text-decoration: none;
  border-radius: 5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ── Job offer lists inside tab panels ───────────────────────────── */
.svp-tabs__panel .wp-block-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svp-tabs__panel .wp-block-list li {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid #d8dde0;
  border-left: 4px solid var(--svp-brand, #0052a5);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 1rem !important;
  line-height: 1.4;
  transition: background 0.15s, border-left-color 0.15s, box-shadow 0.15s;
}

.svp-tabs__panel .wp-block-list li a {
  display: inline;
  color: #062c66 !important;
  font-weight: 600;
  text-decoration: underline !important;
}

.svp-tabs__panel .wp-block-list li a:visited {
  color: #062c66 !important;
}

.svp-tabs__panel .wp-block-list li:hover {
  background: #e8f0f8;
  border-left-color: #003f7f;
  box-shadow: 0 2px 6px rgba(0, 82, 165, 0.15);
}

.svp-tabs__panel .wp-block-list li a:focus {
  outline: 3px solid #d96e00;
  outline-offset: 2px;
  background: #ffdd00;
  color: #0b0c0c !important;
}

.svp-tabs__panel .wp-block-list li a .svp-external-icon {
  display: inline-block;
  font-size: 1.1rem;
  opacity: 0.6;
}

@media (max-width: 48.0625em) {
  .svp-tabs__panel .wp-block-list {
    grid-template-columns: 1fr;
  }
}
