/* ==========================================================================
   433 Finder — Frontend widget
   ========================================================================== */

/* ── Container ─────────────────────────────────────────────────────────── */
.f433-widget {
	position: relative;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	background: #0d0d0d;
	border-radius: 16px;
	overflow: hidden;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	color: #f0f0f0;
}

.f433-widget *,
.f433-widget *::before,
.f433-widget *::after {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ── Views ──────────────────────────────────────────────────────────────── */
.f433-view {
	display: none;
	padding: 28px 24px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.f433-view.is-active {
	display: block;
}

.f433-view.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Home: two tiles ────────────────────────────────────────────────────── */
.f433-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.f433-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	aspect-ratio: 1 / 1;
	background: #1a1a1a;
	border: 1px solid #2d2d2d;
	border-radius: 12px;
	cursor: pointer;
	padding: 20px;
	color: #d0d0d0;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.3;
	text-align: center;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
	/* reset button defaults */
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
}

.f433-tile:hover {
	background: #222;
	border-color: #555;
	color: #fff;
	transform: translateY(-2px);
}

.f433-tile:active {
	transform: translateY(0);
}

.f433-tile-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	color: #888;
	transition: color 0.18s ease;
}

.f433-tile:hover .f433-tile-icon {
	color: #ccc;
}

.f433-tile-icon svg {
	width: 100%;
	height: 100%;
}

.f433-tile-label {
	display: block;
	font-size: 22px;
	font-weight: 600;
}

/* ── View header (back + title) ─────────────────────────────────────────── */
.f433-view-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.f433-back-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #1e1e1e;
	border: 1px solid #2d2d2d;
	border-radius: 8px;
	cursor: pointer;
	color: #aaa;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
	padding: 0;
	/* reset button */
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
}

.f433-back-btn svg {
	width: 16px;
	height: 16px;
}

.f433-back-btn:hover {
	background: #2a2a2a;
	color: #fff;
}

.f433-view-title {
	font-size: 22px;
	font-weight: 600;
	color: #e0e0e0;
	letter-spacing: 0.01em;
}

/* ── Search bar ─────────────────────────────────────────────────────────── */
.f433-search-bar {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

.f433-search-bar input[type="text"] {
	flex: 1;
	background: #1a1a1a !important;
	border: 1px solid #333 !important;
	border-radius: 8px;
	padding: 10px 14px;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-size: 18px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s;
}

.f433-search-bar input[type="text"]::placeholder {
	color: #888;
	font-size: 18px;
}

.f433-search-bar input[type="text"]:focus {
	border-color: #555;
}

.f433-search-bar button {
	background: #f0f0f0;
	color: #0d0d0d;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s;
	white-space: nowrap;
}

.f433-search-bar button:hover {
	background: #fff;
}

.f433-results-notice {
	font-size: 13px;
	line-height: 1.5;
	color: #6fcf97;
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.25);
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 4px;
}

/* ── Search results ─────────────────────────────────────────────────────── */
.f433-results {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.f433-result-hint {
	color: #555;
	font-size: 13px;
	text-align: center;
	padding: 24px 0 8px;
}

.f433-result-none {
	color: #666;
	font-size: 14px;
	text-align: center;
	padding: 24px 0 8px;
}

.f433-result-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	background: #151515;
	border: 1px solid #242424;
	border-radius: 10px;
	padding: 16px 18px;
	transition: background 0.12s;
}

.f433-result-item:hover {
	background: #1a1a1a;
}

.f433-result-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.f433-result-name {
	font-size: 22px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
	line-height: 1.25;
	text-align: left;
	min-width: 0;
}

.f433-result-manufacturer {
	font-size: 16px;
	font-weight: 400;
	color: #888;
	margin: 0;
	padding: 0;
	line-height: 1.35;
	text-align: left;
}

.f433-result-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 14px;
}

.f433-pill {
	display: inline-block;
	background: #222;
	border: 1px solid #333;
	border-radius: 100px;
	padding: 3px 12px;
	font-size: 12px;
	font-weight: 500;
	color: #999;
	line-height: 1.5;
}

.f433-widget .f433-purchase-pill,
.f433-widget a.f433-purchase-pill,
.f433-widget a.f433-purchase-pill:visited {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	background: rgba(34, 197, 94, 0.12) !important;
	color: #22c55e !important;
	border: 1px solid rgba(34, 197, 94, 0.25) !important;
	border-radius: 100px !important;
	padding: 3px 12px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	flex-shrink: 0 !important;
	line-height: 1.5 !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.f433-widget .f433-purchase-pill svg {
	width: 12px !important;
	height: 12px !important;
	flex-shrink: 0;
}

.f433-widget a.f433-purchase-pill:hover {
	background: rgba(34, 197, 94, 0.22) !important;
	border-color: rgba(34, 197, 94, 0.45) !important;
	color: #4ade80 !important;
}

/* ── Submit form ────────────────────────────────────────────────────────── */
.f433-form-notice {
	font-size: 18px;
	color: #e07070;
	line-height: 1.5;
	margin: 0 0 16px;
	background: rgba(160, 48, 48, 0.15);
	border: 1px solid rgba(160, 48, 48, 0.35);
	border-radius: 8px;
	padding: 12px 16px 18px !important;
}

.f433-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.f433-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.f433-field label {
	font-size: 18px;
	font-weight: 500;
	color: #aaa;
	letter-spacing: 0.02em;
}

.f433-req {
	color: #666;
}

.f433-field input[type="text"],
.f433-field input[type="url"] {
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 10px 14px;
	color: #ffffff;
	-webkit-text-fill-color: #ffffff;
	font-size: 18px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s;
}

.f433-field input[type="text"]::placeholder,
.f433-field input[type="url"]::placeholder {
	color: #444;
}

.f433-field input[type="text"]:focus,
.f433-field input[type="url"]:focus {
	border-color: #555;
}

.f433-field input.f433-invalid {
	border-color: #a03030;
}

.f433-form-error {
	background: #1f0f0f;
	border: 1px solid #6b2020;
	border-radius: 6px;
	padding: 9px 13px;
	color: #e07070;
	font-size: 13px;
}

.f433-submit-btn {
	background: #f0f0f0;
	color: #0d0d0d;
	border: none;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	letter-spacing: 0.01em;
	transition: background 0.15s;
	margin-top: 4px;
	align-self: center;
}

.f433-submit-btn:hover {
	background: #fff;
}

.f433-submit-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

/* ── Thank you message ──────────────────────────────────────────────────── */
.f433-thanks {
	display: none;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
	padding: 20px 0 8px;
}

.f433-thanks.is-shown {
	display: flex;
}

.f433-thanks-icon {
	width: 56px;
	height: 56px;
	color: #6fcf97;
}

.f433-thanks-icon svg {
	width: 100%;
	height: 100%;
}

.f433-thanks p {
	color: #b0b0b0;
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
	.f433-widget {
		border-radius: 0;
	}

	.f433-view {
		padding: 20px 16px;
	}

	.f433-tiles {
		gap: 10px;
	}

	.f433-tile {
		padding: 14px;
		font-size: 13px;
		gap: 10px;
	}

	.f433-tile-icon {
		width: 38px;
		height: 38px;
	}
}
