/*
 * Styling for the "Apply for Inclusion" popup.
 *
 * Scoped by .cb-qo376s8x instead of the popup's id: staging and production are
 * separate installs whose jet-popup ids differ, and the id changes again every
 * time the popup is recreated. These auto-generated JetFormBuilder classes come
 * from the saved block content, so they are identical across both installs.
 * .cb-qo376s8x is the certification checkbox row (styled here as a filled pill)
 * and appears in no other popup; .cb-wysh4j83 is the submit row.
 */

.jet-popup:has(.cb-qo376s8x) {
	--jp-container-width: 960px !important;
	--jp-container-hor-padding: 30px !important;
	--jp-container-ver-padding: 30px !important;
	--jp-container-hor-margin: 24px !important;
	--jp-container-ver-margin: 40px !important;
	--jp-container-border: 1px solid #dfe5ec !important;
	--jp-container-border-color: #dfe5ec !important;
	--jp-container-border-width: 1px !important;
	--jp-container-border-radius: 24px !important;
	--jp-container-box-shadow: 0 16px 40px rgba(13, 34, 61, .08) !important;
	--jp-close-button-bg-color: #17365d !important;
	--jp-close-button-border: 1px solid #17365d !important;
	--jp-close-button-border-radius: 999px !important;
	--jp-close-button-size: 32px !important;
	--jp-close-button-icon-size: 14px !important;
	--jp-close-button-translate-x: -10px !important;
	--jp-close-button-translate-y: 10px !important;
}

/* Plugin's own max-height:100% ignores margin, so we set it explicitly. */
.jet-popup:has(.cb-qo376s8x) .jet-popup__container {
	max-height: calc(100vh - 2 * 40px) !important;
}

.jet-popup:has(.cb-qo376s8x) .jet-popup__container-inner {
	max-height: 100%;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder {
	--rd-navy: #17365d;
	--rd-blue: #4b66f3;
	--rd-ink: #182235;
	--rd-muted: #687386;
	--rd-line: #dfe5ec;
	--rd-soft: #fafbfd;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--rd-ink);
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-row {
	margin-bottom: 8px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-row:last-child {
	margin-bottom: 0;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-row.field-type-heading-field {
	margin-bottom: 26px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__heading .jet-form-builder__label-text {
	color: #111a2b;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.035em;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__heading-desc {
	margin-top: 8px;
	color: var(--rd-muted);
	font-size: 16px;
	line-height: 1.55;
}

/* Section headings ("Company Information" etc.) — divider between field groups. */
.jet-popup:has(.cb-qo376s8x) .jet-form-builder h3.wp-block-heading {
	margin: 0 0 20px;
	padding-top: 26px;
	border-top: 1px solid var(--rd-line);
	color: #111a2b;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder > h3.wp-block-heading:first-of-type {
	padding-top: 0;
	border-top: none;
}

.jet-popup:has(.cb-qo376s8x) .wp-block-columns {
	gap: 18px;
	margin-bottom: 18px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__label-text {
	color: #2d394e;
	font-size: 13px;
	font-weight: 800;
	margin-bottom: 4px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__required {
	color: #c5221f;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap input,
.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap select,
.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap textarea {
	width: 100%;
	padding: 12px 14px;
	color: var(--rd-ink) !important;
	background-color: #fff !important;
	border: 1px solid #d7dee8;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(13, 34, 61, .03);
	font: inherit;
	transition: .2s ease;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap input,
.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap select {
	min-height: 47px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap textarea {
	min-height: 116px;
	line-height: 1.5;
	resize: vertical;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap input:focus,
.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap select:focus,
.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-wrap textarea:focus {
	outline: none;
	border-color: var(--rd-blue);
	box-shadow: 0 0 0 4px rgba(75, 102, 243, .12);
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__desc small {
	color: var(--rd-muted);
	font-size: 12px;
	line-height: 1.45;
}

.jet-popup:has(.cb-qo376s8x) .cb-qo376s8x .jet-form-builder__fields-group {
	display: block;
}

.jet-popup:has(.cb-qo376s8x) .cb-qo376s8x .jet-form-builder__field-wrap.checkboxes-wrap {
	padding: 16px;
	background: var(--rd-soft);
	border: 1px solid var(--rd-line);
	border-radius: 12px;
	margin: 0;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-label.for-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__field-label.for-checkbox input {
	width: 17px;
	height: 17px;
	margin: 2px 0 0;
	accent-color: var(--rd-blue);
}

/* Note+button row with its own footer background, targeted by the submit
   row's stable class. */
.jet-popup:has(.cb-qo376s8x) .jet-form-builder .wp-block-columns:has(.cb-wysh4j83) {
	display: flex;
	align-items: center !important;
	justify-content: space-between;
	gap: 22px;
	margin: 18px -30px -30px;
	padding: 26px 30px;
	background: var(--rd-soft);
	border-radius: 0 0 22px 22px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder .wp-block-columns:has(.cb-wysh4j83) .wp-block-paragraph {
	margin: 0;
	max-width: 570px;
	color: var(--rd-muted);
	font-size: 12px;
	line-height: 1.5;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__action-button-wrapper.jet-form-builder__submit-wrap {
	display: flex;
	justify-content: flex-end;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 23px;
	color: #fff;
	background: var(--rd-blue);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 12px 26px rgba(75, 102, 243, .25);
	font-size: 14px;
	font-weight: 800;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .2s ease;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder__submit:hover {
	transform: translateY(-1px);
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-messages-wrap {
	margin: 0;
	padding: 0;
	border: none;
}

/* Plugin reserves 100px for the preview area even when empty; collapse it. */
.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload {
	padding: 12px 14px;
	border: 1px solid #d7dee8;
	border-radius: 12px;
	background: #fff;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload__content {
	height: auto !important;
	min-height: 0 !important;
	margin-bottom: 0;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload__content:has(img, .jet-form-builder-file-upload__file) {
	margin-bottom: 10px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload__files {
	height: auto !important;
	min-height: 0 !important;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload__message {
	height: auto !important;
	min-height: 0 !important;
	margin-top: 8px;
}

.jet-popup:has(.cb-qo376s8x) .jet-form-builder-file-upload__message small {
	color: var(--rd-muted);
	font-size: 12px;
}

@media (max-width: 700px) {
	.jet-popup:has(.cb-qo376s8x) {
		--jp-container-hor-padding: 22px !important;
		--jp-container-ver-padding: 22px !important;
		--jp-container-hor-margin: 14px !important;
		--jp-container-ver-margin: 20px !important;
	}

	.jet-popup:has(.cb-qo376s8x) .jet-popup__container {
		max-height: calc(100vh - 2 * 20px) !important;
	}

	.jet-popup:has(.cb-qo376s8x) .jet-form-builder .wp-block-columns:has(.cb-wysh4j83) {
		flex-direction: column;
		align-items: stretch !important;
		margin: 18px -22px -22px;
		padding: 22px;
	}

	.jet-popup:has(.cb-qo376s8x) .jet-form-builder__submit {
		width: 100%;
	}
}
