@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

.clf-wrap {
	--clf-panel: #07080a;
	--clf-panel-2: #101217;
	--clf-field: #171c25;
	--clf-field-hover: #1b2230;
	--clf-line: rgba(255, 255, 255, 0.1);
	--clf-ink: #f8fafc;
	--clf-soft: #d7dee8;
	--clf-muted: #9aa5b5;
	--clf-accent: #ff9f1c;
	--clf-accent-2: #ffc46b;
	--clf-good: #33d17a;
	--clf-danger: #ff6b86;
	color: var(--clf-ink);
	font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 300;
	max-width: 430px;
	padding: 0;
	position: relative;
	background: transparent;
}

.clf-wrap,
.clf-wrap * {
	box-sizing: border-box;
	letter-spacing: 0;
}

.clf-panel {
	width: 100%;
	padding: 34px 26px 30px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
		var(--clf-panel);
	border: 1px solid var(--clf-line);
	border-radius: 8px;
	box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.clf-field {
	display: block;
	margin: 0 0 22px;
}

.clf-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 7px;
	color: var(--clf-soft);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}

.clf-label .dashicons {
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	overflow: hidden;
	color: var(--clf-accent);
	background: var(--clf-accent);
	border-radius: 999px;
	font-size: 0;
	line-height: 1;
}

.clf-label .dashicons::before {
	content: "";
}

.clf-control,
.clf-car-trigger {
	width: 100%;
	min-height: 48px;
	padding: 0 16px;
	color: var(--clf-ink);
	background: var(--clf-field);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.35;
	outline: none;
	transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.clf-control::placeholder {
	color: var(--clf-muted);
	font-weight: 300;
}

.clf-control:hover,
.clf-car-trigger:hover {
	background: var(--clf-field-hover);
	border-color: rgba(255, 255, 255, 0.14);
}

.clf-control:focus,
.clf-car-trigger:focus-visible {
	border-color: rgba(255, 159, 28, 0.9);
	box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.14);
}

.clf-control {
	appearance: auto;
}

.clf-car-trigger {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
	cursor: pointer;
}

.clf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 18px;
	color: #111111;
	background: linear-gradient(180deg, var(--clf-accent-2), var(--clf-accent));
	border: 0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 12px 26px rgba(255, 159, 28, 0.2);
	transition: box-shadow 160ms ease, filter 160ms ease, transform 160ms ease;
}

.clf-submit:hover {
	box-shadow: 0 15px 30px rgba(255, 159, 28, 0.28);
	filter: brightness(1.02);
}

.clf-submit:active {
	transform: translateY(1px);
}

.clf-submit[disabled] {
	cursor: wait;
	opacity: 0.72;
}

.clf-status {
	min-height: 21px;
	margin: 10px 0 0;
	color: var(--clf-muted);
	font-size: 12px;
	font-weight: 300;
	line-height: 1.5;
}

.clf-status.is-success {
	color: var(--clf-good);
}

.clf-status.is-error {
	color: var(--clf-danger);
}

.clf-modal[hidden] {
	display: none;
}

.clf-modal {
	position: absolute;
	inset: 0;
	z-index: 99999;
	display: block;
	padding: 0;
	font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.clf-modal__shade {
	display: none;
}

.clf-modal__dialog {
	position: relative;
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr);
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-height: none;
	overflow: hidden;
	color: var(--clf-ink);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
		var(--clf-panel);
	border: 1px solid var(--clf-line);
	border-radius: 8px;
	box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.clf-modal__header {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 54px;
	padding: 0 52px 0 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.clf-modal__header h3 {
	margin: 0;
	color: var(--clf-ink);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clf-modal__header [data-clf-back] {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.clf-modal__header [data-clf-back]:not([hidden]) + h3 {
	padding-left: 38px;
}

.clf-modal__header [data-clf-close] {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.clf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--clf-muted);
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	z-index: 2;
}

.clf-icon-btn:hover,
.clf-icon-btn:focus-visible {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

.clf-icon-btn[hidden] {
	display: none;
}

.clf-icon-btn .dashicons {
	width: 15px;
	height: 15px;
	font-size: 0;
	line-height: 15px;
}

.clf-icon-btn .dashicons-no-alt::before,
.clf-icon-btn .dashicons-arrow-left-alt2::before {
	display: block;
	font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 15px;
}

.clf-icon-btn .dashicons-no-alt::before {
	content: "x";
}

.clf-icon-btn .dashicons-arrow-left-alt2::before {
	content: "<";
}

.clf-search {
	padding: 12px 16px 0;
}

.clf-search input {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	color: var(--clf-ink);
	background: #171a21;
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 300;
	outline: none;
}

.clf-search input:focus {
	border-color: rgba(255, 159, 28, 0.9);
	box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.13);
}

.clf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 22px;
	align-content: start;
	align-items: start;
	min-height: 210px;
	padding: 18px 22px 26px;
	overflow-y: auto;
	scrollbar-color: #6b7280 #171a21;
}

.clf-modal[data-clf-view="type"] .clf-search {
	display: none;
}

.clf-modal[data-clf-view="type"] .clf-grid {
	gap: 10px;
	min-height: 0;
	padding: 18px 18px 20px;
	overflow: visible;
}

.clf-card {
	display: grid;
	grid-template-rows: 52px auto;
	gap: 8px;
	min-width: 0;
	padding: 0;
	color: var(--clf-ink);
	background: transparent;
	border: 0;
	font-family: inherit;
	text-align: center;
	cursor: pointer;
}

.clf-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 74px;
	height: 52px;
	margin: 0 auto;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	transition: box-shadow 160ms ease, transform 160ms ease;
}

.clf-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.clf-card--model .clf-card__media img {
	object-fit: contain;
}

.clf-card__name {
	display: block;
	min-height: 34px;
	color: var(--clf-soft);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.25;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.clf-card:hover .clf-card__media,
.clf-card:focus-visible .clf-card__media {
	box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.22);
	transform: translateY(-1px);
}

.clf-card:hover .clf-card__name,
.clf-card:focus-visible .clf-card__name {
	color: #ffffff;
}

.clf-card:focus-visible {
	outline: none;
}

.clf-type-card {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 74px;
	padding: 10px 8px;
	color: var(--clf-soft);
	background: #171a21;
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.clf-type-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--clf-accent);
	background: rgba(255, 159, 28, 0.12);
	border: 1px solid rgba(255, 159, 28, 0.22);
	border-radius: 8px;
}

.clf-type-card__icon svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.clf-type-card__name {
	display: block;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
}

.clf-type-card:hover,
.clf-type-card:focus-visible {
	color: #ffffff;
	background: #1d222c;
	border-color: rgba(255, 159, 28, 0.72);
	outline: none;
	transform: translateY(-1px);
}

.clf-empty {
	grid-column: 1 / -1;
	margin: 20px 0;
	color: var(--clf-muted);
	font-size: 14px;
	font-weight: 300;
	text-align: center;
}

@media (max-width: 640px) {
	.clf-wrap {
		max-width: 100%;
	}

	.clf-panel {
		min-height: 0;
		padding: 22px 16px 20px;
	}

	.clf-field {
		margin-bottom: 17px;
	}

	.clf-control,
	.clf-car-trigger {
		min-height: 46px;
		font-size: 13px;
	}

	.clf-label {
		font-size: 12px;
	}

	.clf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 16px;
		padding: 18px 16px 24px;
	}

	.clf-modal[data-clf-view="type"] .clf-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
		padding: 16px;
	}

	.clf-modal__header h3 {
		font-size: 16px;
	}
}
