/* Join our network modal — aligned with site footer form patterns */

.network-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}

.network-popup[hidden] {
	display: none !important;
}

.network-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.45);
}

.network-popup__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 920px;
	max-height: min(92vh, 980px);
	overflow: auto;
	margin: 0;
	padding: 40px 40px 36px;
	border-radius: 28px;
	background: #ffffff;
	box-shadow: 0 32px 80px rgba(17, 17, 17, 0.18);
	font-family: var(--font-family-base);
	-webkit-overflow-scrolling: touch;
}

.network-popup__close {
	position: absolute;
	top: 20px;
	right: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9a9a9a;
	cursor: pointer;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
}

.network-popup__close:hover,
.network-popup__close:focus-visible {
	color: #262626;
	background: rgba(38, 38, 38, 0.06);
	outline: none;
}

.network-popup__close-icon {
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5L12 10.6 17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4Z' fill='black'/%3E%3C/svg%3E")
		center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5L12 10.6 17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4Z' fill='black'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

.network-popup__title {
	margin: 0 48px 28px 0;
	color: #262626;
	font-family: var(--font-family-base);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
}

.network-popup__title-accent {
	color: #ff5a00;
}

.network-popup__title-rest {
	margin-left: 0.35em;
	color: #262626;
}

.network-popup__form {
	margin: 0;
}

.network-popup__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}

.network-popup__field {
	position: relative;
}

.network-popup__field--full {
	grid-column: 1 / -1;
	margin-top: 2px;
}

.network-popup__label {
	display: inline-block;
	margin-bottom: 10px;
	color: #262626;
	font-family: var(--font-family-base);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.2;
}

.network-popup__required {
	margin-left: 2px;
	color: #ff3b30;
	font-weight: 600;
}

.network-popup__control {
	width: 100%;
	min-height: 56px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: 28px;
	background: #f2f2f2;
	color: #262626;
	font-family: var(--font-family-base);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.25;
	outline: none;
	box-sizing: border-box;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
}

.network-popup__control--text {
	padding-right: 48px;
}

.network-popup__control::placeholder {
	color: rgba(38, 38, 38, 0.28);
}

.network-popup__control {
	appearance: none;
}

.network-popup__control:focus {
	border-color: rgba(255, 80, 0, 0.45);
	box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.08);
	background: #f7f7f7;
}

.network-popup__select-wrap {
	position: relative;
}

/*
 * Custom select — Figma:
 * Header (R38): 69px min-height, radius 50px, #fff, shadow X:3 Y:40 Blur:90 Spread:-10 rgba(0,0,0,0.1)
 * List (R39): #F3F4F5, bottom radius 30px, max-height 252px
 * List is position:absolute → does NOT shift the form grid
 */
.network-popup__custom-select {
	position: relative;
	z-index: 0;
	display: block;
}

.network-popup__custom-select.is-open {
	z-index: 60;
}

.network-popup__select-trigger {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 69px;
	margin: 0;
	padding: 0 52px 0 24px;
	border: 1px solid transparent;
	border-radius: 50px;
	background: #f2f2f2;
	color: #111111;
	font-family: var(--font-family-base);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		border-radius 0.2s ease,
		box-shadow 0.2s ease;
}

.network-popup__select-trigger:focus {
	outline: none;
}

.network-popup__custom-select:not(.is-open) .network-popup__select-trigger:focus-visible {
	border-color: rgba(255, 80, 0, 0.45);
	box-shadow:
		0 0 0 3px rgba(255, 80, 0, 0.08),
		3px 40px 90px -10px rgba(0, 0, 0, 0.1);
	background: #f7f7f7;
}

/* Open: white cap + Figma drop shadow (only on header) */
.network-popup__custom-select.is-open .network-popup__select-trigger {
	min-height: 69px;
	padding: 0 52px 0 24px;
	border-color: transparent;
	border-radius: 50px 50px 0 0;
	background: #ffffff;
	box-shadow: 3px 40px 90px -10px rgba(0, 0, 0, 0.1);
}

.network-popup__field.is-invalid .network-popup__select-trigger {
	border-color: #ff3b30;
	background: #ffffff;
}

.network-popup__field.is-invalid .network-popup__custom-select:not(.is-open) .network-popup__select-trigger {
	background: #ffffff;
}

.network-popup__field.is-invalid .network-popup__custom-select.is-open .network-popup__select-trigger {
	border-color: #ff3b30;
	border-bottom: none;
	border-radius: 50px 50px 0 0;
}

.network-popup__field.is-invalid .network-popup__custom-select.is-open .network-popup__select-dropdown {
	border: 1px solid #ff3b30;
	border-top: none;
}

.network-popup__select-trigger-text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.network-popup__select-caret {
	flex-shrink: 0;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 9px solid #000000;
	transition: transform 0.2s ease;
}

.network-popup__custom-select.is-open .network-popup__select-caret {
	transform: rotate(180deg);
}

.network-popup__select-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 2;
	width: 100%;
	margin: 0;
	padding: 16px 14px 18px 20px;
	border: none;
	border-radius: 0 0 30px 30px;
	background: #f3f4f5;
	box-shadow: 3px 40px 90px -10px rgba(0, 0, 0, 0.1);
	box-sizing: border-box;
	max-height: 252px;
	display: flex;
	flex-direction: column;
}

.network-popup__select-dropdown[hidden] {
	display: none !important;
}

.network-popup__select-options {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 220px;
	margin: 0;
	padding: 0 6px 0 0;
	list-style: none;
	overflow-y: auto;
	border-radius: 0;
	background: transparent;
	font-family: var(--font-family-base);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #111111;
	scrollbar-width: thin;
	scrollbar-color: #ff5a00 rgba(0, 0, 0, 0.06);
}

.network-popup__select-options::-webkit-scrollbar {
	width: 4px;
}

.network-popup__select-options::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.06);
	border-radius: 4px;
	margin: 2px 0 6px;
}

.network-popup__select-options::-webkit-scrollbar-thumb {
	background: #ff5a00;
	border-radius: 4px;
}

.network-popup__select-option {
	padding: 12px 10px 12px 4px;
	margin: 0 0 4px;
	cursor: pointer;
	border-radius: 12px;
	transition: background-color 0.15s ease;
}

.network-popup__select-option:last-child {
	margin-bottom: 0;
}

.network-popup__select-option:hover,
.network-popup__select-option:focus {
	outline: none;
	background: rgba(255, 90, 0, 0.12);
}

.network-popup__select-option.is-selected {
	font-weight: 600;
	background: rgba(255, 90, 0, 0.1);
}

.network-popup__field:has(.network-popup__custom-select)::after {
	right: 52px;
	top: 61px;
}

.network-popup__control--textarea {
	min-height: 120px;
	padding-top: 16px;
	padding-bottom: 16px;
	resize: vertical;
}

.network-popup__field.is-invalid .network-popup__control {
	border-color: #ff3b30;
	background: #ffffff;
}

.network-popup__checkbox-group {
	margin: 0;
	padding: 0;
	border: 0;
}

.network-popup__checkbox-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 16px;
}

.network-popup__checkbox-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	line-height: 1.4;
	color: #262626;
	cursor: pointer;
}

.network-popup__checkbox-item input[type='checkbox'] {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	accent-color: #ff5a00;
}

.network-popup__radio-group {
	margin: 0;
	padding: 0;
	border: 0;
}

.network-popup__radio-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
}

.network-popup__radio-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	line-height: 1.4;
	color: #262626;
	cursor: pointer;
}

.network-popup__radio-item input[type='radio'] {
	width: 18px;
	height: 18px;
	accent-color: #ff5a00;
}

.network-popup__field::after {
	content: '';
	position: absolute;
	top: 48px;
	right: 16px;
	width: 24px;
	height: 24px;
	opacity: 0;
	transform: scale(0.95);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3.5L21 20H3L12 3.5Z' fill='%23FF3B30'/%3E%3Cpath d='M12 9V13.5' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1' fill='white'/%3E%3C/svg%3E");
	pointer-events: none;
}

.network-popup__field--full::after {
	top: 52px;
}

.network-popup__field.is-invalid::after {
	opacity: 1;
	transform: scale(1);
}

/* No warning glyph over optional message field */
.network-popup__field--full[data-field='message']::after {
	display: none;
}

.network-popup__field--full[data-field='message'].is-invalid .network-popup__control--textarea {
	border-color: transparent;
	background: #f2f2f2;
}

.network-popup__honeypot {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.network-popup__error {
	min-height: 18px;
	margin: 6px 0 0;
	color: #ff3b30;
	font-family: var(--font-family-base);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.25;
	display: none;
}

.network-popup__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	margin-top: 20px;
	padding: 14px 24px;
	border: 0;
	border-radius: 28px;
	background: #ff5a00;
	color: #ffffff;
	font-family: var(--font-family-base);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		opacity 0.2s ease;
}

.network-popup__submit:hover,
.network-popup__submit:focus-visible {
	background: #ff5000;
	color: #ffffff;
	outline: none;
}

.network-popup__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.network-popup__status {
	min-height: 22px;
	margin: 12px 0 0;
	font-family: var(--font-family-base);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
}

.network-popup__status.is-success {
	color: #1f8f4d;
}

.network-popup__status.is-error {
	color: #ff3b30;
}

.network-popup__note {
	margin: 14px 0 0;
	color: rgba(38, 38, 38, 0.45);
	font-family: var(--font-family-base);
	font-size: 14px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
}

body.network-popup-open {
	overflow: hidden;
}

@media (max-width: 720px) {
	.network-popup__dialog {
		padding: 36px 22px 28px;
		border-radius: 22px;
	}

	.network-popup__title {
		margin-right: 40px;
		font-size: 22px;
	}

	.network-popup__grid {
		grid-template-columns: 1fr;
	}

	.network-popup__checkbox-list {
		grid-template-columns: 1fr;
	}

	.network-popup__label {
		font-size: 17px;
	}

	.network-popup__field::after {
		top: 46px;
	}
}
