/**
 * Preview-event picker modal, shown over the Elementor editor.
 *
 * The editor sets its own font and resets little, so every rule here is
 * self-contained rather than inherited.
 */

.etnadfe-es-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.5 );
	/* Keep native controls light when the editor runs its dark theme. */
	color-scheme: light;
	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.etnadfe-es-modal {
	display: flex;
	flex-direction: column;
	width: 440px;
	max-width: 92vw;
	max-height: 82vh;
	padding: 20px;
	border-radius: 8px;
	background: #fff;
	color: #1f2124;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.28 );
}

.etnadfe-es-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.etnadfe-es-title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}

.etnadfe-es-dismiss {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #6b6f76;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.etnadfe-es-dismiss:hover {
	background: #f1f2f4;
}

.etnadfe-es-intro {
	margin: 8px 0 14px;
	font-size: 12px;
	line-height: 1.5;
	color: #6b6f76;
}

.etnadfe-es-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
}

.etnadfe-es-search {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #d5d8dc;
	border-radius: 5px;
	background: #fff;
	font-size: 13px;
	color: #1f2124;
	box-shadow: none;
}

.etnadfe-es-search::placeholder {
	color: #9da5ae;
}

.etnadfe-es-search:focus {
	border-color: #5d5dff;
	outline: none;
}

.etnadfe-es-list {
	flex: 1 1 auto;
	overflow-y: auto;
	margin-top: 10px;
	border: 1px solid #e6e8eb;
	border-radius: 5px;
	min-height: 120px;
	background: #fff;
	scrollbar-width: thin;
	scrollbar-color: #c8ccd2 transparent;
}

.etnadfe-es-list::-webkit-scrollbar {
	width: 8px;
}

.etnadfe-es-list::-webkit-scrollbar-track {
	background: transparent;
}

.etnadfe-es-list::-webkit-scrollbar-thumb {
	border: 2px solid #fff;
	border-radius: 8px;
	background: #c8ccd2;
}

.etnadfe-es-list::-webkit-scrollbar-thumb:hover {
	background: #a4aab2;
}

.etnadfe-es-option {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 0;
	border-bottom: 1px solid #f1f2f4;
	background: transparent;
	font-family: inherit;
	font-size: 13px;
	text-align: left;
	color: inherit;
	cursor: pointer;
}

.etnadfe-es-option:last-child {
	border-bottom: 0;
}

.etnadfe-es-option:hover {
	background: #f7f8fa;
}

.etnadfe-es-option.is-selected {
	background: #eeeeff;
	font-weight: 600;
}

.etnadfe-es-option-meta {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 400;
	color: #6b6f76;
}

.etnadfe-es-empty {
	margin: 0;
	padding: 16px 12px;
	font-size: 13px;
	color: #6b6f76;
}

.etnadfe-es-message {
	min-height: 16px;
	margin: 10px 0 0;
	font-size: 12px;
	color: #6b6f76;
}

.etnadfe-es-message.is-error {
	color: #d3232f;
}

.etnadfe-es-message.is-success {
	color: #1a8917;
}

.etnadfe-es-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

.etnadfe-es-button {
	padding: 8px 16px;
	border: 0;
	border-radius: 5px;
	background: #eceef1;
	color: #1f2124;
	font-family: inherit;
	font-size: 13px;
	cursor: pointer;
}

.etnadfe-es-button.is-primary {
	background: #5d5dff;
	color: #fff;
	font-weight: 600;
}

.etnadfe-es-button[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* Only rendered when the editor is too old to expose the app-bar API. */
.etnadfe-es-fallback-button {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	padding: 9px 16px;
	border: 0;
	border-radius: 5px;
	background: #5d5dff;
	color: #fff;
	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.22 );
}
