/**
 * YG Counselling Form Popup v2.0.0
 * Free Counselling Session popup — self-contained modal.
 * Every rule carries !important: this exists because this site's other
 * popup CSS/JS (Elementor Pro popups, Brave Popup Builder, etc.) proved
 * unreliable, so this must not be overridable by any of it.
 *
 * @package yes-germany
 */

#yg-form-popup-overlay {
	display: none !important;
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	align-items: flex-start !important;
	justify-content: center !important;
	padding: 20px !important;
	background: rgba( 0, 0, 0, 0.75 ) !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
}

#yg-form-popup-overlay.is-open {
	display: flex !important;
}

#yg-form-popup-overlay .yg-form-popup-modal {
	position: relative !important;
	width: 100% !important;
	max-width: 560px !important;
	max-height: none !important;
	overflow: visible !important;
	padding: 0 !important;
	margin: auto !important;
	background: transparent !important;
	border-radius: 8px !important;
	box-shadow: none !important;
}

/*
 * The CF7 form itself already renders its own card (background, padding,
 * radius, shadow) via the branch-selection-for-cf7 plugin's own styling —
 * this modal only needs to strip the extra side margin that plugin adds
 * for its normal in-page placement, not double it up with padding of ours.
 */
#yg-form-popup-overlay .bscf7-eligibility-form {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	box-sizing: border-box !important;
}

#yg-form-popup-overlay .yg-form-popup-close {
	position: absolute !important;
	top: 14px !important;
	right: 18px !important;
	width: 32px !important;
	height: 32px !important;
	border: none !important;
	background: transparent !important;
	border-radius: 0 !important;
	color: #333 !important;
	font-size: 24px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	z-index: 1 !important;
}

#yg-form-popup-overlay .yg-form-popup-close:hover {
	color: #000 !important;
}

body.yg-form-popup-open {
	overflow: hidden !important;
}

/* ==========================================================================
   Searchable Dropdown (State & Branch Selection)
   ========================================================================== */

/* Visually hide the native select while keeping it in the DOM for CF7 validation & submission */
select.yg-native-select-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.yg-searchable-select {
	position: relative !important;
	width: 100% !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	margin-top: 4px !important;
	margin-bottom: 12px !important;
}

/* Trigger Button */
.yg-searchable-trigger {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	min-height: 44px !important;
	padding: 10px 14px !important;
	background: #ffffff !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #1f2937 !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	outline: none !important;
	user-select: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.yg-searchable-trigger:hover,
.yg-searchable-select.is-open .yg-searchable-trigger {
	border-color: #2563eb !important;
}

.yg-searchable-select.is-open .yg-searchable-trigger {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.yg-searchable-trigger.is-placeholder .yg-searchable-label {
	color: #6b7280 !important;
}

.yg-searchable-label {
	flex: 1 1 auto !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
	text-align: left !important;
	font-size: 14px !important;
	color: #111827 !important;
}

.yg-searchable-arrow {
	flex: 0 0 auto !important;
	width: 8px !important;
	height: 8px !important;
	margin-left: 10px !important;
	border-right: 2px solid #6b7280 !important;
	border-bottom: 2px solid #6b7280 !important;
	transform: rotate(45deg) translateY(-2px) !important;
	transition: transform 0.2s ease !important;
}

.yg-searchable-select.is-open .yg-searchable-arrow {
	transform: rotate(-135deg) translateY(-2px) !important;
	border-color: #2563eb !important;
}

/* Dropdown Menu */
.yg-searchable-dropdown {
	position: absolute !important;
	top: calc(100% + 4px) !important;
	left: 0 !important;
	right: 0 !important;
	z-index: 2147483647 !important;
	background: #ffffff !important;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
	overflow: hidden !important;
	display: none !important;
	flex-direction: column !important;
	max-height: 290px !important;
	animation: ygSearchableFadeIn 0.15s ease-out !important;
}

@keyframes ygSearchableFadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.yg-searchable-select.is-open .yg-searchable-dropdown {
	display: flex !important;
}

/* Search Bar Inside Dropdown */
.yg-searchable-search-wrap {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	padding: 8px 10px !important;
	background: #f9fafb !important;
	border-bottom: 1px solid #e5e7eb !important;
	box-sizing: border-box !important;
	flex: 0 0 auto !important;
}

.yg-searchable-search-icon {
	position: absolute !important;
	left: 18px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 14px !important;
	height: 14px !important;
	color: #9ca3af !important;
	pointer-events: none !important;
}

.yg-searchable-input {
	width: 100% !important;
	min-height: 36px !important;
	height: 36px !important;
	padding: 6px 28px 6px 30px !important;
	font-size: 13px !important;
	font-family: inherit !important;
	color: #111827 !important;
	background: #ffffff !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	outline: none !important;
	box-sizing: border-box !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.yg-searchable-input:focus {
	border-color: #2563eb !important;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
}

.yg-searchable-clear {
	position: absolute !important;
	right: 16px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 20px !important;
	height: 20px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 16px !important;
	color: #9ca3af !important;
	cursor: pointer !important;
	border: none !important;
	background: transparent !important;
	border-radius: 50% !important;
	line-height: 1 !important;
	padding: 0 !important;
	transition: background 0.12s ease, color 0.12s ease !important;
}

.yg-searchable-clear:hover {
	color: #1f2937 !important;
	background: #e5e7eb !important;
}

/* Helper Hint Banner */
.yg-searchable-hint {
	padding: 5px 12px !important;
	font-size: 11.5px !important;
	color: #6b7280 !important;
	background: #f3f4f6 !important;
	border-bottom: 1px solid #e5e7eb !important;
	line-height: 1.3 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	box-sizing: border-box !important;
	flex: 0 0 auto !important;
}

.yg-searchable-hint.is-filtering {
	background: #eff6ff !important;
	color: #1d4ed8 !important;
	border-bottom-color: #dbeafe !important;
}

/* Options List */
.yg-searchable-options {
	list-style: none !important;
	margin: 0 !important;
	padding: 4px 0 !important;
	overflow-y: auto !important;
	max-height: 200px !important;
	box-sizing: border-box !important;
	-webkit-overflow-scrolling: touch !important;
}

.yg-searchable-options::-webkit-scrollbar {
	width: 6px !important;
}

.yg-searchable-options::-webkit-scrollbar-thumb {
	background: #d1d5db !important;
	border-radius: 3px !important;
}

.yg-searchable-options::-webkit-scrollbar-thumb:hover {
	background: #9ca3af !important;
}

/* Option Item */
.yg-searchable-option {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 8px 14px !important;
	font-size: 13.5px !important;
	color: #374151 !important;
	cursor: pointer !important;
	line-height: 1.4 !important;
	transition: background 0.1s ease, color 0.1s ease !important;
	user-select: none !important;
	box-sizing: border-box !important;
}

.yg-searchable-option:hover,
.yg-searchable-option.is-highlighted {
	background: #f3f4f6 !important;
	color: #111827 !important;
}

.yg-searchable-option.is-selected {
	background: #eff6ff !important;
	color: #1d4ed8 !important;
	font-weight: 600 !important;
}

.yg-searchable-option.is-disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

/* Matching Text Highlight */
.yg-searchable-option mark {
	background: #fef08a !important;
	color: #854d0e !important;
	padding: 0 2px !important;
	border-radius: 2px !important;
	font-weight: 700 !important;
}

.yg-searchable-check {
	flex: 0 0 auto !important;
	width: 14px !important;
	height: 14px !important;
	margin-left: 8px !important;
	color: #2563eb !important;
	display: none !important;
}

.yg-searchable-option.is-selected .yg-searchable-check {
	display: inline-block !important;
}

/* Empty State */
.yg-searchable-empty {
	padding: 18px 14px !important;
	text-align: center !important;
	font-size: 13px !important;
	color: #6b7280 !important;
	box-sizing: border-box !important;
}

