/*
 * FloristChina Top Bar & Smart Search v1.1.7
 * The PC/mobile main navigation is not moved or restyled by this plugin.
 */

.fctb-topbar-shell {
	--fctb-accent: #d85772;
	--fctb-accent-dark: #bc405d;
	--fctb-text: #302b30;
	--fctb-muted: #777177;
	--fctb-line: #eee5e7;
	--fctb-soft: #fff8fa;
	background: #fff;
	border-bottom: 1px solid var(--fctb-line);
	box-sizing: border-box;
	color: var(--fctb-text);
	position: relative;
	width: 100%;
	z-index: 100;
}

.fctb-topbar {
	align-items: center;
	box-sizing: border-box;
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(230px, 1fr) auto auto;
	margin: 0 auto;
	max-width: 1480px;
	min-height: 48px;
	padding: 6px 28px;
	width: 100%;
}

.fctb-topbar-message,
.fctb-topbar-contact,
.fctb-topbar-actions {
	align-items: center;
	display: flex;
	min-width: 0;
}

.fctb-topbar-message {
	gap: 8px;
	justify-content: flex-start;
}

.fctb-topbar-message-icon {
	color: var(--fctb-accent);
	display: inline-flex;
	flex: 0 0 auto;
}

.fctb-topbar-message-icon svg {
	fill: none;
	height: 19px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.65;
	width: 19px;
}

.fctb-topbar-message-text {
	color: #be425f;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fctb-topbar-contact {
	gap: 0;
	justify-content: flex-end;
}

.fctb-contact-item {
	align-items: center;
	display: inline-flex;
	min-width: 0;
	padding: 0 14px;
	position: relative;
}

.fctb-contact-item + .fctb-contact-item::before {
	background: #e7dce0;
	content: "";
	height: 22px;
	left: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
}

.fctb-topbar .cps-direct {
	color: #3a363a !important;
	font-size: 12.5px;
	font-weight: 500;
	gap: 5px;
}

.fctb-topbar .cps-direct-icon {
	color: var(--fctb-accent) !important;
}

.fctb-topbar .cps-direct-icon svg {
	height: 17px;
	width: 17px;
}

.fctb-topbar-actions {
	gap: 10px;
	justify-content: flex-end;
}

.fctb-topbar-search-wrap {
	width: 245px;
}

.fctb-topbar .cps-btn {
	min-height: 36px !important;
	padding: 8px 13px !important;
}

/* Search */
.fctb-search {
	max-width: 100%;
	position: relative;
	width: 100%;
	z-index: 120;
}

.fctb-search-form {
	align-items: center;
	background: #fff;
	border: 1px solid #ecd7dd;
	border-radius: 9px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) 32px;
	min-height: 38px;
	padding: 0 6px 0 10px;
	transition: border-color .18s ease, box-shadow .18s ease;
	width: 100%;
}

.fctb-search-form:focus-within {
	border-color: #dd8ca0;
	box-shadow: 0 0 0 3px rgba(216, 87, 114, .08);
}

.fctb-search-icon,
.fctb-search-submit {
	align-items: center;
	display: flex;
	justify-content: center;
}

.fctb-search-icon {
	color: var(--fctb-accent);
}

.fctb-search-icon svg,
.fctb-search-submit svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	width: 18px;
}

.fctb-search-input {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: var(--fctb-text) !important;
	font-family: inherit !important;
	font-size: 12.5px !important;
	height: 36px !important;
	line-height: 36px !important;
	margin: 0 !important;
	min-height: 0 !important;
	outline: none !important;
	padding: 0 8px !important;
	width: 100% !important;
}

.fctb-search-input::-webkit-search-cancel-button {
	display: none;
}

.fctb-search-input::placeholder {
	color: #8d878c;
	opacity: 1;
}

.fctb-search-submit {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 7px !important;
	box-shadow: none !important;
	color: var(--fctb-accent) !important;
	cursor: pointer;
	height: 30px !important;
	margin: 0 !important;
	padding: 0 !important;
	transition: background .18s ease, color .18s ease;
	width: 30px !important;
}

.fctb-search-submit:hover,
.fctb-search-submit:focus-visible {
	background: var(--fctb-soft) !important;
	color: var(--fctb-accent-dark) !important;
	outline: none;
}

.fctb-search-results {
	background: #fff;
	border: 1px solid #eedce1;
	border-radius: 13px;
	box-shadow: 0 20px 50px rgba(52, 37, 43, .16);
	box-sizing: border-box;
	left: 0;
	margin-top: 7px;
	overflow: hidden;
	position: absolute;
	top: 100%;
	width: min(460px, calc(100vw - 30px));
	z-index: 1000004;
}

.fctb-search-results[hidden] {
	display: none !important;
}

.fctb-popular {
	padding: 15px;
}

.fctb-popular-title {
	color: #4f484e;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .03em;
	margin-bottom: 10px;
}

.fctb-popular-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fctb-popular-chip {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: #fff8fa !important;
	border: 1px solid #efd6de !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: #b94561 !important;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	margin: 0 !important;
	min-height: 32px !important;
	padding: 8px 12px !important;
	text-transform: none !important;
}

.fctb-popular-chip:hover,
.fctb-popular-chip:focus-visible {
	background: #fff1f5 !important;
	border-color: #df9bad !important;
	outline: none;
}

.fctb-result-list {
	list-style: none;
	margin: 0 !important;
	padding: 7px !important;
}

.fctb-result-item {
	margin: 0 !important;
	padding: 0 !important;
}

.fctb-result-link {
	align-items: center;
	border-radius: 9px;
	color: inherit !important;
	display: grid;
	gap: 10px;
	grid-template-columns: 52px minmax(0, 1fr);
	padding: 7px;
	text-decoration: none !important;
	transition: background .15s ease;
}

.fctb-result-link:hover,
.fctb-result-link:focus-visible {
	background: #fff7f9;
	outline: none;
}

.fctb-result-image {
	background: #faf8f8;
	border-radius: 7px;
	height: 52px;
	object-fit: cover;
	width: 52px;
}

.fctb-result-copy {
	display: block;
	min-width: 0;
}

.fctb-result-name {
	color: #302c30;
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fctb-result-meta {
	color: #8a8388;
	display: block;
	font-size: 10.5px;
	line-height: 1.25;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fctb-result-price {
	color: #d04d69;
	display: block;
	font-size: 12.5px;
	font-weight: 650;
	line-height: 1.2;
}

.fctb-result-price .woocommerce-Price-amount,
.fctb-result-price .woocommerce-Price-amount bdi {
	color: inherit;
}

.fctb-search-footer {
	border-top: 1px solid #f0e5e8;
	padding: 8px 12px;
	text-align: right;
}

.fctb-search-view-all {
	color: var(--fctb-accent) !important;
	font-size: 12px;
	font-weight: 650;
	text-decoration: none !important;
}

.fctb-search-empty,
.fctb-search-loading {
	color: #817b80;
	font-size: 12.5px;
	padding: 17px;
	text-align: center;
}

/* Tablet / mobile: sits above existing navigation; does not modify it. */
@media (max-width: 991px) {
	.fctb-topbar {
		gap: 0;
		grid-template-columns: 1fr;
		padding: 0;
	}

	.fctb-topbar-message {
		border-bottom: 1px solid #f1e7e9;
		justify-content: center;
		min-height: 34px;
		padding: 5px 12px;
	}

	.fctb-topbar-message-text {
		font-size: 12px;
		white-space: normal;
		text-align: center;
	}

	.fctb-topbar-contact {
		border-bottom: 1px solid #f1e7e9;
		justify-content: center;
		min-height: 38px;
		padding: 5px 9px;
	}

	.fctb-contact-item {
		max-width: 50%;
		padding: 0 10px;
	}

	.fctb-topbar .cps-direct {
		font-size: 11.5px;
		max-width: 100%;
	}

	.fctb-topbar .cps-direct-value {
		display: inline-block;
		max-width: 190px;
		overflow: hidden;
		text-overflow: ellipsis;
		vertical-align: bottom;
	}

	.fctb-topbar-actions {
		box-sizing: border-box;
		gap: 9px;
		padding: 8px 12px;
		width: 100%;
	}

	.fctb-topbar-search-wrap {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
	}

	.fctb-topbar-contact-button {
		flex: 0 0 auto;
	}

	.fctb-search-form {
		min-height: 40px;
	}

	.fctb-search-input {
		font-size: 13px !important;
		height: 38px !important;
		line-height: 38px !important;
	}

	.fctb-search-results {
		position: fixed;
		left: 12px;
		right: 12px;
		top: 92px;
		width: auto;
		max-height: calc(100dvh - 115px);
		overflow-y: auto;
	}
}

@media (max-width: 600px) {
	.fctb-contact-item {
		padding-left: 8px;
		padding-right: 8px;
	}

	.fctb-topbar .cps-direct {
		font-size: 11px;
	}

	.fctb-topbar .cps-direct-label {
		display: none;
	}

	.fctb-topbar .cps-direct-value {
		max-width: 145px;
	}

	.fctb-topbar-actions {
		padding-left: 10px;
		padding-right: 10px;
	}

	.fctb-topbar .cps-btn {
		font-size: 12px !important;
		min-height: 40px !important;
		padding-left: 11px !important;
		padding-right: 11px !important;
	}

	.fctb-topbar .cps-btn-icon {
		display: none;
	}

	.fctb-search-form {
		grid-template-columns: 20px minmax(0, 1fr) 30px;
		padding-left: 8px;
	}

	.fctb-search-input {
		font-size: 12.5px !important;
		padding-left: 6px !important;
		padding-right: 5px !important;
	}
}

@media (max-width: 390px) {
	.fctb-topbar .cps-direct-value {
		max-width: 125px;
	}

	.fctb-topbar-contact {
		padding-left: 4px;
		padding-right: 4px;
	}

	.fctb-contact-item {
		padding-left: 6px;
		padding-right: 6px;
	}

	.fctb-topbar .cps-btn {
		font-size: 11.5px !important;
		padding-left: 9px !important;
		padding-right: 9px !important;
	}

	.fctb-search-input {
		font-size: 12px !important;
	}
}


/* v1.1.1 Elementor/theme safety: prevent generic theme SVG rules from enlarging Top Bar icons. */
.fctb-topbar-shell svg,
.fctb-search-results svg {
	box-sizing: border-box;
	max-width: none;
}
.fctb-topbar-shell .fctb-topbar-message-icon svg {
	height: 19px !important;
	width: 19px !important;
}
.fctb-topbar-shell .fctb-search-icon svg,
.fctb-topbar-shell .fctb-search-submit svg {
	height: 18px !important;
	width: 18px !important;
}


/* =========================================================
   v1.1.2 Mobile refinement
   - Keep the existing mobile main navigation untouched.
   - Remove only the slogan row on phones.
   - Prevent iOS Safari input-focus auto zoom.
   - Keep Smart Search results above the mobile menu/header.
   ========================================================= */

@media (max-width: 767px) {

	/* The user requested a cleaner mobile top area:
	   hide only "Send flowers to all cities in China". */
	.fctb-topbar-shell .fctb-topbar-message {
		display: none !important;
	}

	/* Put this independent top information/search bar above the
	   existing mobile navigation while Smart Search is active. */
	.fctb-topbar-shell {
		position: relative !important;
		z-index: 2147482000 !important;
	}

	.fctb-topbar {
		background: #fff;
	}

	/* Compact direct-account row, while still showing the actual IDs. */
	.fctb-topbar-contact {
		align-items: center;
		background: #fff;
		border-bottom: 1px solid #f1e7e9;
		display: flex !important;
		justify-content: center;
		min-height: 42px;
		padding: 6px 10px !important;
		width: 100%;
	}

	.fctb-contact-wechat {
		flex: 0 0 auto !important;
		max-width: none !important;
		padding-left: 4px !important;
		padding-right: 10px !important;
	}

	.fctb-contact-email {
		flex: 1 1 auto !important;
		max-width: none !important;
		min-width: 0 !important;
		padding-left: 10px !important;
		padding-right: 4px !important;
	}

	.fctb-topbar .cps-direct {
		font-size: 11px !important;
		line-height: 1.2 !important;
		max-width: 100% !important;
		white-space: nowrap !important;
	}

	.fctb-topbar .cps-direct-icon {
		flex: 0 0 auto;
	}

	.fctb-contact-wechat .cps-direct-value {
		max-width: none !important;
		overflow: visible !important;
		text-overflow: clip !important;
	}

	.fctb-contact-email .cps-direct {
		min-width: 0;
		width: 100%;
	}

	.fctb-contact-email .cps-direct-value {
		font-size: 10.5px !important;
		max-width: none !important;
		min-width: 0 !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		white-space: nowrap !important;
	}

	/* Search + Contact Us are one clean row. */
	.fctb-topbar-actions {
		align-items: center !important;
		background: #fff;
		box-sizing: border-box;
		display: flex !important;
		gap: 8px !important;
		padding: 8px 10px 10px !important;
		width: 100% !important;
	}

	.fctb-topbar-search-wrap {
		flex: 1 1 0 !important;
		min-width: 0 !important;
		width: auto !important;
	}

	.fctb-topbar-contact-button {
		flex: 0 0 auto !important;
	}

	.fctb-topbar .cps-btn {
		font-size: 12px !important;
		min-height: 42px !important;
		padding: 9px 13px !important;
		white-space: nowrap !important;
	}

	.fctb-topbar .cps-btn-icon {
		display: none !important;
	}

	.fctb-search-form {
		min-height: 42px !important;
	}

	/* Critical iOS Safari fix:
	   inputs below 16px are auto-zoomed on focus. */
	.fctb-search-input {
		font-size: 16px !important;
		height: 40px !important;
		line-height: 40px !important;
		min-width: 0 !important;
	}

	.fctb-search-input::placeholder {
		font-size: 14px !important;
	}

	/* JS sets the live top value from the real search field position. */
	.fctb-search-results {
		border-radius: 14px !important;
		box-sizing: border-box !important;
		left: 10px !important;
		margin: 0 !important;
		max-height: calc(100dvh - 140px) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		position: fixed !important;
		right: 10px !important;
		top: var(--fctb-mobile-results-top, 130px) !important;
		width: auto !important;
		z-index: 2147483000 !important;
	}

	.fctb-popular {
		padding: 16px 14px !important;
	}

	.fctb-popular-title {
		font-size: 15px !important;
		margin-bottom: 12px !important;
	}

	.fctb-popular-chips {
		gap: 8px !important;
	}

	.fctb-popular-chip {
		font-size: 13px !important;
		min-height: 36px !important;
		padding: 9px 13px !important;
	}

	.fctb-result-name {
		font-size: 14px !important;
	}

	.fctb-result-meta {
		font-size: 11px !important;
	}

	.fctb-result-price {
		font-size: 13px !important;
	}
}

@media (max-width: 390px) {
	.fctb-topbar-contact {
		padding-left: 7px !important;
		padding-right: 7px !important;
	}

	.fctb-contact-wechat {
		padding-right: 7px !important;
	}

	.fctb-contact-email {
		padding-left: 7px !important;
	}

	.fctb-topbar .cps-direct {
		font-size: 10.5px !important;
	}

	.fctb-contact-email .cps-direct-value {
		font-size: 10px !important;
	}

	.fctb-topbar-actions {
		gap: 7px !important;
		padding-left: 8px !important;
		padding-right: 8px !important;
	}

	.fctb-topbar .cps-btn {
		font-size: 11.5px !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
	}

	.fctb-search-input {
		font-size: 16px !important;
	}

	.fctb-search-input::placeholder {
		font-size: 13px !important;
	}
}


/* =========================================================
   v1.1.3 Mobile contact-row refinement
   ========================================================= */
@media (max-width: 767px) {
	/* More breathing room above WeChat / Email. */
	.fctb-topbar-shell .fctb-topbar-contact {
		min-height: 50px !important;
		padding-top: 11px !important;
		padding-bottom: 9px !important;
	}

	/* Make the WeChat account clearly tappable without changing
	   the approved visual language. */
	.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat {
		border-radius: 8px;
		cursor: pointer;
		padding: 5px 6px;
		transition: background .16s ease, color .16s ease;
		-webkit-tap-highlight-color: rgba(216, 87, 114, .10);
	}

	.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat:active,
	.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat:focus-visible {
		background: #fff3f6;
		color: #bd405d !important;
		outline: none;
	}

	.fctb-wechat-toast {
		background: rgba(45, 39, 43, .94);
		border-radius: 999px;
		bottom: max(22px, env(safe-area-inset-bottom));
		box-shadow: 0 8px 28px rgba(0,0,0,.18);
		color: #fff;
		font-size: 13px;
		font-weight: 600;
		left: 50%;
		line-height: 1.25;
		max-width: calc(100vw - 32px);
		opacity: 0;
		padding: 10px 16px;
		pointer-events: none;
		position: fixed;
		text-align: center;
		transform: translate(-50%, 10px);
		transition: opacity .18s ease, transform .18s ease;
		white-space: nowrap;
		z-index: 2147483646;
	}

	.fctb-wechat-toast.is-visible {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}


/* =========================================================
   v1.1.4 Email interaction feedback
   Shared desktop/mobile toast and tappable email state.
   ========================================================= */

.fctb-action-toast {
	background: rgba(45, 39, 43, .94);
	border-radius: 999px;
	bottom: max(22px, env(safe-area-inset-bottom));
	box-shadow: 0 8px 28px rgba(0,0,0,.18);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	left: 50%;
	line-height: 1.25;
	max-width: calc(100vw - 32px);
	opacity: 0;
	padding: 10px 16px;
	pointer-events: none;
	position: fixed;
	text-align: center;
	transform: translate(-50%, 10px);
	transition: opacity .18s ease, transform .18s ease;
	white-space: nowrap;
	z-index: 2147483646;
}

.fctb-action-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.fctb-topbar-shell .fctb-contact-email .cps-direct-email {
	border-radius: 8px;
	cursor: pointer;
	padding: 5px 6px;
	transition: background .16s ease, color .16s ease;
	-webkit-tap-highlight-color: rgba(216, 87, 114, .10);
}

.fctb-topbar-shell .fctb-contact-email .cps-direct-email:active,
.fctb-topbar-shell .fctb-contact-email .cps-direct-email:focus-visible {
	background: #fff3f6;
	color: #bd405d !important;
	outline: none;
}


/* =========================================================
   v1.1.5 WeChat UX
   ========================================================= */

/* Slightly larger WeChat visual identity. */
.fctb-topbar-shell .fctb-contact-wechat .cps-direct-icon svg {
	height: 20px !important;
	width: 20px !important;
	stroke-width: 1.8 !important;
}

.fctb-wechat-action {
	align-items: center;
	background: rgba(45, 39, 43, .96);
	border-radius: 14px;
	bottom: max(22px, env(safe-area-inset-bottom));
	box-shadow: 0 10px 34px rgba(0,0,0,.22);
	box-sizing: border-box;
	color: #fff;
	display: flex;
	gap: 12px;
	left: 50%;
	max-width: calc(100vw - 28px);
	opacity: 0;
	padding: 11px 12px 11px 15px;
	pointer-events: none;
	position: fixed;
	transform: translate(-50%, 12px);
	transition: opacity .18s ease, transform .18s ease;
	z-index: 2147483646;
}

.fctb-wechat-action.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

.fctb-wechat-action-copy {
	display: block;
	min-width: 0;
}

.fctb-wechat-action-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.fctb-wechat-action-id {
	color: rgba(255,255,255,.78);
	display: block;
	font-size: 11px;
	line-height: 1.25;
	margin-top: 3px;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fctb-wechat-open {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: #fff !important;
	border: 0 !important;
	border-radius: 9px !important;
	box-shadow: none !important;
	color: #c74764 !important;
	cursor: pointer;
	flex: 0 0 auto;
	font-family: inherit !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	margin: 0 !important;
	min-height: 34px !important;
	padding: 9px 12px !important;
	text-transform: none !important;
	white-space: nowrap;
}

.fctb-wechat-open:hover,
.fctb-wechat-open:focus-visible {
	background: #fff3f6 !important;
	outline: none !important;
}

@media (max-width: 767px) {
	.fctb-topbar-shell .fctb-contact-wechat .cps-direct-icon svg {
		height: 22px !important;
		width: 22px !important;
	}

	.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat {
		gap: 7px !important;
	}
}


/* =========================================================
   v1.1.6 Popular Search custom links
   Direct-link chips keep the same appearance as Smart Search chips.
   ========================================================= */
.fctb-popular-link {
	align-items: center;
	display: inline-flex !important;
	justify-content: center;
	text-decoration: none !important;
}

.fctb-popular-link:visited {
	color: #b94561 !important;
}


/* =========================================================
   v1.1.7 WeChat click affordance
   Make the clickable WeChat ID feel as interactive as Email.
   ========================================================= */
.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat {
	cursor: pointer !important;
	border-radius: 8px;
	transition: background .16s ease, color .16s ease;
	-webkit-tap-highlight-color: rgba(216, 87, 114, .10);
}

.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat:hover,
.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat:focus-visible {
	background: #fff3f6;
	color: #bd405d !important;
	outline: none;
}

.fctb-topbar-shell .fctb-contact-wechat .cps-direct-wechat:hover .cps-direct-value {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
