/* YB Favorilerim: toast, ♡ buttons, header icon, Favorilerim page. Colours / sizes come from Elementor controls; these are fallbacks. */

.ybsb-fav-toast {
	position: fixed;
	left: 50%;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	z-index: 100000;
	max-width: calc(100vw - 2rem);
	padding: 0.625rem 1rem;
	border-radius: 999px;
	background: #111111;
	color: #ffffff;
	font-size: 0.875rem;
	line-height: 1.4;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}

.ybsb-fav-toast.is-shown {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.ybsb-fav-toast {
		transition: none;
	}
}

/* ---- ♡ button (Grid card, product page) ---- */

.ybsb-fav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: pointer;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.ybsb-fav-btn .ybsb-fav-heart {
	display: block;
	flex-shrink: 0;
}

.ybsb-fav-btn.is-fav .ybsb-fav-heart path {
	fill: currentColor;
}

.ybsb-fav-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Card ♡: own element-type selector so a theme's button reset (e.g. Hello Elementor) cannot repaint it; Elementor controls still win. */
.ybsb-card-image-wrap button.ybsb-card-fav {
	position: absolute;
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: #111111;
	background-color: #ffffff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.ybsb-card-image-wrap button.ybsb-card-fav:hover,
.ybsb-card-image-wrap button.ybsb-card-fav.is-fav {
	color: #e11d48;
	background-color: #ffffff;
}

.ybsb-card-fav-top-left { top: var(--ybsb-fav-offset, 10px); left: var(--ybsb-fav-offset, 10px); }
.ybsb-card-fav-top-right { top: var(--ybsb-fav-offset, 10px); right: var(--ybsb-fav-offset, 10px); }
.ybsb-card-fav-bottom-left { bottom: var(--ybsb-fav-offset, 10px); left: var(--ybsb-fav-offset, 10px); }
.ybsb-card-fav-bottom-right { bottom: var(--ybsb-fav-offset, 10px); right: var(--ybsb-fav-offset, 10px); }

@media (prefers-reduced-motion: reduce) {
	.ybsb-fav-btn {
		transition: none;
	}
}

/* ---- Product page button (YB Favori Button) ---- */

.ybsb-fav-single {
	display: flex;
}

.ybsb-fav-single button.ybsb-fav-btn {
	gap: 0.5rem;
	min-width: 44px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #d0d5dd;
	border-radius: 999px;
	color: #111111;
	background-color: #ffffff;
	font: inherit;
}

/* ---- Header icon (YB Favori Icon) ---- */

.ybsb-fav-icon-wrap {
	display: flex;
}

.ybsb-fav-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	color: #111111;
	text-decoration: none;
}

.ybsb-fav-icon .ybsb-fav-heart {
	width: 24px;
	height: 24px;
}

.ybsb-fav-icon:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ybsb-fav-icon-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background-color: #e11d48;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}

.ybsb-fav-icon-count[hidden] {
	display: none;
}

/* ---- Favorilerim page (YB Favorilerim) ---- */

.ybsb-favs [hidden] {
	display: none !important;
}

.ybsb-favs-title {
	margin: 0 0 1rem;
}

.ybsb-favs-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ybsb-favs-item {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 12px;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	background-color: #ffffff;
	min-width: 0;
}

.ybsb-favs-photo {
	flex-shrink: 0;
	width: 88px;
	height: 88px;
	border-radius: 8px;
	overflow: hidden;
	background-color: #f2f4f7;
}

.ybsb-favs-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ybsb-favs-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.375rem;
	min-width: 0;
}

.ybsb-favs-name {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #111111;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.ybsb-favs-name:hover,
.ybsb-favs-name:focus-visible {
	text-decoration: underline;
}

.ybsb-favs-meta {
	color: #475467;
	font-size: 0.875rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.ybsb-favs-donor {
	padding: 2px 8px;
	border-radius: 999px;
	background-color: #fff4e5;
	color: #93370d;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
}

.ybsb-favs-gone {
	flex: 1 1 auto;
	align-self: center;
	color: #475467;
}

.ybsb-favs button.ybsb-favs-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #475467;
	cursor: pointer;
}

.ybsb-favs button.ybsb-favs-remove:hover,
.ybsb-favs button.ybsb-favs-remove:focus-visible {
	background-color: #f2f4f7;
}

.ybsb-favs-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.ybsb-favs .ybsb-favs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 10px 20px;
	border: 0;
	border-radius: 999px;
	background-color: #111111;
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.ybsb-favs a.ybsb-favs-wa {
	background-color: #0f7a3a;
}

.ybsb-favs-btn:focus-visible,
.ybsb-favs-remove:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.ybsb-favs-icon {
	flex-shrink: 0;
}

.ybsb-favs-empty p,
.ybsb-favs-loading,
.ybsb-favs-error span {
	margin: 0 0 0.75rem;
	color: #475467;
}

.ybsb-favs-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.ybsb-favs .ybsb-favs-btn-ghost {
	border: 1px solid #d0d5dd;
	background-color: #ffffff;
	color: #111111;
}

.ybsb-favs .ybsb-favs-btn[disabled] {
	cursor: progress;
	opacity: 0.7;
}

.ybsb-favs-shared {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 12px 16px;
	border-radius: 12px;
	background-color: #eef4ff;
	color: #1d2939;
}

.ybsb-favs-shared p {
	flex: 1 1 100%;
	margin: 0;
	font-weight: 600;
}

.ybsb-favs-yardview {
	width: min(92vw, 420px);
	max-height: 92vh;
	padding: 20px;
	border: 0;
	border-radius: 16px;
	background-color: #ffffff;
	color: #111111;
	text-align: center;
}

.ybsb-favs-yardview::backdrop {
	background: rgba(16, 24, 40, 0.6);
}

.ybsb-favs-yard-qr svg {
	display: block;
	width: 100%;
	height: auto;
	max-width: 360px;
	margin: 0 auto;
}

.ybsb-favs-yard-hint {
	margin: 1rem 0;
	font-size: 1rem;
	line-height: 1.4;
}

.ybsb-favs-yardview .ybsb-favs-btn {
	width: 100%;
}

@media (max-width: 480px) {
	.ybsb-favs-actions .ybsb-favs-btn {
		flex: 1 1 100%;
	}
}
