/**
 * ifad-cselect — a self-contained, storefront-safe country dropdown.
 *
 * A real (visually-hidden) <select> stays in the DOM for form submit, a11y and a
 * <noscript> fallback; the custom button + searchable menu is wired by
 * ifad-select.js. Styled as a form field (border, radius) so it sits next to the
 * text inputs on the partner application form and the account address form.
 */

.ifad-cselect { position: relative; display: block; width: 100%; font-family: inherit; }

/* The native control — kept for submit + a11y, visually removed. */
.ifad-cselect__native {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	border: 0;
	opacity: 0; pointer-events: none;
}

.ifad-cselect__toggle {
	box-sizing: border-box;
	display: flex; align-items: center; gap: 10px;
	width: 100%;
	padding: 10px 13px;
	background: #fff;
	border: 1px solid #d5d5e0;
	border-radius: 5px;
	font-size: 14px; line-height: 1.4; font-family: inherit;
	color: #0E0E31;
	text-align: left; cursor: pointer;
	transition: border-color .15s ease;
}
.ifad-cselect__toggle:hover { border-color: #b9b9cf; }
.ifad-cselect.is-open .ifad-cselect__toggle,
.ifad-cselect__toggle:focus-visible { outline: none; border-color: #0E0E31; }

.ifad-cselect__label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifad-cselect__label.is-placeholder { color: #9a9ab0; }

.ifad-cselect__caret {
	flex: 0 0 auto;
	width: 8px; height: 8px; margin-top: -3px;
	border-right: 1.5px solid #7F7FAA;
	border-bottom: 1.5px solid #7F7FAA;
	transform: rotate(45deg);
	transition: transform .18s ease, margin-top .18s ease;
}
.ifad-cselect.is-open .ifad-cselect__caret { transform: rotate(-135deg); margin-top: 2px; }

.ifad-cselect__menu {
	position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
	background: #fff;
	border: 1px solid #e0e0eb;
	border-radius: 5px;
	box-shadow: 0 14px 34px rgba(14, 14, 49, .16);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	overflow: hidden;
}
.ifad-cselect.is-open .ifad-cselect__menu { opacity: 1; visibility: visible; transform: none; }

.ifad-cselect__search {
	display: block; width: 100%; box-sizing: border-box;
	padding: 10px 14px;
	border: 0; border-bottom: 1px solid #ececf3;
	font-size: 14px; font-family: inherit; color: #0E0E31;
}
.ifad-cselect__search:focus { outline: none; }
.ifad-cselect__search::placeholder { color: #a7a7bd; }

.ifad-cselect__list {
	list-style: none; margin: 0; padding: 5px;
	max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
}
.ifad-cselect__option {
	padding: 9px 12px; border-radius: 5px;
	font-size: 14px; color: #0E0E31; cursor: pointer; white-space: nowrap;
	overflow: hidden; text-overflow: ellipsis;
}
.ifad-cselect__option:hover,
.ifad-cselect__option.is-active { background: #f2f2f7; }
.ifad-cselect__option.is-selected { background: #0E0E31; color: #fff; }
.ifad-cselect__option[hidden] { display: none; }

.ifad-cselect__empty { padding: 12px; font-size: 13px; color: #9a9ab0; text-align: center; }

/* RTL (Arabic) */
[dir="rtl"] .ifad-cselect__toggle { text-align: right; }
