/*
 * Forms rendered by PB_Forms. The theme styles bare inputs with !important
 * (and removes every outline), so rules that touch the same properties need
 * !important and a class-scoped selector to win. Focus is shown with box-shadow.
 */
.pb-form,
.pb-dialog,
.pb-success {
	--pb-navy: #111c3b;
	--pb-blue: #0078d9;
	--pb-blue-dark: #005fb0;
	--pb-blue-soft: #e8f2fc;
	--pb-border: #c3c9d4;
	--pb-muted: #5d6680;
	--pb-error: #c62828;
	--pb-error-soft: #fdecec;
	--pb-ring: 0 0 0 3px rgba(0, 120, 217, 0.3);
	font-family: "Open Sans", sans-serif;
	color: var(--pb-navy);
}

.pb-form *,
.pb-form *::before,
.pb-form *::after {
	box-sizing: border-box;
}

.pb-form-card {
	border: 1px solid #d6dbe3;
	padding: 40px;
	margin-top: 50px;
	background: #fff;
}

/* ------------------------------------------------------------- layout */

.pb-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 22px 20px;
}
.pb-col-2 { grid-column: span 2; }
.pb-col-3 { grid-column: span 3; }
.pb-col-4 { grid-column: span 4; }
.pb-col-6 { grid-column: span 6; }
.pb-col-8 { grid-column: span 8; }
.pb-col-12 { grid-column: span 12; }

.pb-form--contact .pb-grid { gap: 18px; }
.pb-form--contact .pb-actions { flex-direction: row-reverse; justify-content: flex-end; }

@media (max-width: 767px) {
	.pb-form-card { padding: 24px 18px; margin-top: 30px; }
	.pb-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.pb-grid > * { grid-column: 1 / -1; }
}

.pb-field {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* ----------------------------------------------------- labels & inputs */

.pb-form .pb-label {
	display: block;
	width: auto;
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pb-navy);
}
.pb-req { color: var(--pb-blue); }
.pb-optional { font-weight: 400; color: var(--pb-muted); }

.pb-form .pb-input {
	display: block;
	width: 100% !important;
	height: 50px !important;
	margin: 0 !important;
	padding: 10px 14px !important;
	border: 1px solid var(--pb-border) !important;
	border-radius: 0 !important;
	background: #fff !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--pb-navy);
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.pb-form textarea.pb-input {
	height: auto !important;
	min-height: 120px;
	resize: vertical;
}
.pb-form .pb-input::placeholder { color: #9aa1b2; opacity: 1; font-weight: 300; }
.pb-form .pb-input:hover { border-color: #8f98aa !important; }
.pb-form .pb-input:focus {
	border-color: var(--pb-blue) !important;
	box-shadow: var(--pb-ring);
}
.pb-form .pb-invalid .pb-input,
.pb-form .pb-invalid .pb-input:hover {
	border-color: var(--pb-error) !important;
}
.pb-form .pb-invalid .pb-input:focus { box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.25); }

.pb-select { position: relative; }
.pb-select::after {
	content: "";
	position: absolute;
	right: 18px;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -7px;
	border-right: 2px solid var(--pb-navy);
	border-bottom: 2px solid var(--pb-navy);
	transform: rotate(45deg);
	pointer-events: none;
}
.pb-form .pb-select .pb-input { padding-right: 44px !important; cursor: pointer; }
.pb-form .pb-select select.pb-input:invalid { color: #9aa1b2; font-weight: 300; }
.pb-form .pb-select option { color: var(--pb-navy); }

.pb-form button.pb-combo {
	overflow: hidden;
	text-align: left !important;
	text-overflow: ellipsis;
	text-transform: none !important;
	letter-spacing: normal !important;
	white-space: nowrap;
	color: var(--pb-navy) !important;
	font-weight: 400 !important;
	cursor: pointer;
}
.pb-form button.pb-combo.pb-combo--empty { color: #9aa1b2 !important; font-weight: 300 !important; }
.pb-form .pb-open .pb-combo { border-color: var(--pb-blue) !important; box-shadow: var(--pb-ring); }
.pb-select.pb-open::after { margin-top: -2px; transform: rotate(-135deg); }
.pb-form .pb-combo__list {
	position: absolute;
	z-index: 70;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 300px;
	margin: 0 !important;
	padding: 6px 0 !important;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none !important;
	background: #fff;
	border: 1px solid var(--pb-border);
	box-shadow: 0 10px 28px rgba(17, 28, 59, 0.18);
}
.pb-form .pb-combo__list[hidden] { display: none; }
.pb-form .pb-combo__option {
	margin: 0 !important;
	padding: 11px 16px !important;
	font-size: 16px;
	line-height: 1.4;
	color: var(--pb-navy);
	list-style: none !important;
	cursor: pointer;
}
.pb-form .pb-combo__option::before { content: none !important; }
.pb-form .pb-combo__option.pb-active { background: var(--pb-blue-soft); }
.pb-form .pb-combo__option[aria-selected="true"] { color: var(--pb-blue); font-weight: 600; }

.pb-error {
	display: flex;
	gap: 6px;
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pb-error);
}
.pb-error[hidden] { display: none; }
.pb-error::before {
	content: "!";
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--pb-error);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

/* ---------------------------------------------------- radio choices */

.pb-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-choice { position: relative; margin: 0; cursor: pointer; }
.pb-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.pb-choice span {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid var(--pb-border);
	background: #fff;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pb-choice:hover span { border-color: var(--pb-blue); }
.pb-choice input:checked + span {
	border-color: var(--pb-blue);
	background: var(--pb-blue);
	color: #fff;
}
.pb-choice input:focus-visible + span { box-shadow: var(--pb-ring); }
.pb-invalid .pb-choice input:not(:checked) + span { border-color: var(--pb-error); }

/* ---------------------------------------------------------- checkbox */

.pb-check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}
.pb-form .pb-check input {
	position: absolute !important;
	opacity: 0;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
}
.pb-check__box {
	flex: none;
	position: relative;
	width: 24px;
	height: 24px;
	border: 1px solid var(--pb-border);
	background: #fff;
	transition: background 0.15s, border-color 0.15s;
}
.pb-check:hover .pb-check__box { border-color: var(--pb-blue); }
.pb-check input:checked + .pb-check__box { background: var(--pb-blue); border-color: var(--pb-blue); }
.pb-check input:checked + .pb-check__box::after {
	content: "";
	position: absolute;
	left: 8px;
	top: 3px;
	width: 7px;
	height: 13px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}
.pb-check input:focus-visible + .pb-check__box { box-shadow: var(--pb-ring); }
.pb-invalid .pb-check__box { border-color: var(--pb-error); }
.pb-check a { color: var(--pb-blue); text-decoration: underline; }

/* ------------------------------------------------------------- files */

.pb-file__drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 120px;
	padding: 18px;
	border: 1px dashed #9aa3b5;
	background: #f7f9fc;
	text-align: center;
	transition: background 0.15s, border-color 0.15s;
}
.pb-file__drop:hover,
.pb-file__drop.pb-dragover {
	border-color: var(--pb-blue);
	background: var(--pb-blue-soft);
}
.pb-file__drop:focus-within { border-color: var(--pb-blue); box-shadow: var(--pb-ring); }
.pb-invalid .pb-file__drop { border-color: var(--pb-error); background: var(--pb-error-soft); }
.pb-form .pb-file__input {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	opacity: 0;
	cursor: pointer;
}
.pb-file__icon { color: var(--pb-blue); }
.pb-file__text { font-size: 16px; line-height: 1.4; }
.pb-file__text strong { color: var(--pb-blue); font-weight: 600 !important; }
.pb-file__or { color: var(--pb-muted); }
.pb-file__hint { font-size: 13px; color: var(--pb-muted); }

.pb-file__chosen {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 64px;
	padding: 12px 14px;
	border: 1px solid var(--pb-blue);
	background: var(--pb-blue-soft);
}
.pb-file__chosen[hidden] { display: none; }
.pb-file__doc { flex: none; color: var(--pb-blue); }
.pb-file__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.pb-file__size { flex: none; font-size: 13px; color: var(--pb-muted); }
.pb-form .pb-file__remove {
	flex: none;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--pb-blue);
	background: #fff;
	color: var(--pb-blue);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.pb-form .pb-file__remove:hover { background: var(--pb-blue); color: #fff; }
.pb-form .pb-file__remove:focus-visible { box-shadow: var(--pb-ring); }

/* ------------------------------------------------- alerts & actions */

.pb-alert {
	margin: 0 0 24px;
	padding: 14px 16px;
	border-left: 4px solid var(--pb-error);
	background: var(--pb-error-soft);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--pb-error);
}
.pb-alert[hidden] { display: none; }
.pb-alert a { color: inherit; text-decoration: underline; }

.pb-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 28px;
}
.pb-footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px 24px;
	margin-top: 24px;
}
.pb-footer .pb-actions { margin: 0 0 0 auto; }
.pb-status { margin: 0; font-size: 15px; color: var(--pb-muted); }
.pb-status:empty { display: none; }

.pb-form .pb-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 18px 32px;
	border: 0;
	border-radius: 0;
	background: var(--pb-blue);
	color: #fff;
	font-family: "Open Sans", sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s;
}
.pb-form .pb-submit:hover { background: var(--pb-navy); }
.pb-form .pb-submit:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--pb-blue); }
.pb-form .pb-submit[disabled] { background: #5c8fc4; cursor: progress; }
.pb-submit.pb-busy::before {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pb-spin 0.8s linear infinite;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
	.pb-footer { flex-direction: column; align-items: stretch; }
	.pb-footer .pb-actions { margin: 0; }
	.pb-actions { flex-direction: column-reverse; align-items: stretch; }
	.pb-form .pb-submit { justify-content: center; width: 100%; }
	.pb-status { text-align: center; }
}

.pb-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pb-success {
	padding: 24px;
	border-left: 4px solid var(--pb-blue);
	background: var(--pb-blue-soft);
	font-size: 17px;
}
.pb-success[hidden] { display: none; }
.pb-success p { margin: 0; }
.pb-success .pb-success__title { margin-bottom: 4px; font-size: 20px; font-weight: 600; }

/* --------------------------------------------------------- birth date */

.pb-dob__parts {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
	gap: 10px;
	max-width: 540px;
}
.pb-form .pb-dob .pb-select .pb-input { padding-right: 34px !important; }
.pb-dob .pb-select::after { right: 14px; }
.pb-form .pb-dob.pb-invalid .pb-input:not(.pb-bad) { border-color: var(--pb-border) !important; }
.pb-form .pb-dob .pb-input.pb-bad { border-color: var(--pb-error) !important; }

.pb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------ vacancy dialog */

.pb-dialog {
	width: calc(100% - 32px);
	max-width: 960px;
	max-height: calc(100% - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	box-shadow: 0 24px 64px rgba(17, 28, 59, 0.35);
	overflow: auto;
	overscroll-behavior: contain;
}
/* The theme's Bootstrap sets dialog { display: block }, which shows it while closed. */
.pb-dialog:not([open]) { display: none; }
.pb-dialog::backdrop { background: rgba(17, 28, 59, 0.7); }
.pb-dialog__inner { padding: 28px 40px 0; }
.pb-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid #e1e5ec;
}
.pb-dialog__eyebrow {
	margin: 0 0 2px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pb-blue);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.pb-dialog__title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--pb-navy); }
.pb-dialog__close {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -6px -10px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--pb-navy);
	cursor: pointer;
}
.pb-dialog__close:hover { background: #eef1f6; }
.pb-dialog__close:focus-visible { box-shadow: var(--pb-ring); }
html.pb-dialog-open { overflow: hidden; }

/* The submit row stays in view while the dialog scrolls. */
.pb-dialog .pb-footer {
	position: sticky;
	bottom: 0;
	z-index: 50;
	margin: 20px -40px 0;
	padding: 14px 40px;
	border-top: 1px solid #e1e5ec;
	background: #fff;
}

/* --------------------------------------------- compact (vacancy dialog) */

@media (min-width: 768px) {
	.pb-form--compact .pb-grid { gap: 16px 20px; }
	.pb-form--compact .pb-choice span { padding: 7px 16px; font-size: 15px; }
	.pb-form--compact textarea.pb-input { min-height: 76px; }
	.pb-form--compact .pb-dob__parts { grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.2fr) minmax(0, 1.15fr); gap: 8px; }
	.pb-form--compact .pb-dob .pb-input { padding-left: 12px !important; padding-right: 8px !important; font-size: 16px; }
	.pb-form--compact .pb-dob .pb-select .pb-input { padding-right: 28px !important; }
	.pb-form--compact .pb-dob .pb-select::after { right: 11px; }
	.pb-form--compact .pb-file__drop {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-content: center;
		justify-content: stretch;
		gap: 0 10px;
		height: 50px;
		min-height: 0;
		padding: 0 12px;
		border-style: solid;
		text-align: left;
	}
	.pb-form--compact .pb-file__icon { grid-row: span 2; width: 22px; height: 22px; }
	.pb-form--compact .pb-file__text { font-size: 15px; line-height: 1.25; white-space: nowrap; }
	.pb-form--compact .pb-file__or { display: none; }
	.pb-form--compact .pb-file__hint { font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.pb-form--compact .pb-file__chosen { min-height: 50px; height: 50px; padding: 0 8px 0 12px; gap: 8px; }
	.pb-form--compact .pb-file__name { font-size: 14px; }
	.pb-form--compact .pb-file__size { display: none; }
	.pb-form--compact .pb-file__remove { padding: 4px 8px; font-size: 13px; }
	.pb-form--compact .pb-submit { padding: 14px 28px; font-size: 18px; }
}

@media (max-width: 767px) {
	.pb-dialog { width: 100%; max-width: none; height: 100%; max-height: none; }
	.pb-dialog__inner { padding: 20px 18px 28px; }
	.pb-dialog .pb-footer { position: static; margin: 24px 0 0; padding: 0; border: 0; }
	.pb-dialog__head { position: sticky; top: 0; z-index: 60; margin: -20px -18px 20px; padding: 16px 18px 14px; background: #fff; }
	.pb-dialog__title { font-size: 20px; }
}

/* The theme sets paragraph sizes inside page content. */
.pb-form p.pb-status { font-size: 14px !important; line-height: 1.4 !important; }
.pb-form p.pb-error { font-size: 14px !important; line-height: 1.4 !important; }
.pb-form p.pb-error { margin: 6px 0 0 !important; }
