/* BUYAMTO Earn: the product-page "Share & Earn" button and its sheet. */

/* ---------- the button on the product page: small and quiet ---------- */
.bearn-pp {
	--bp-accent: var(--by-teal, #0E7C86);
	--bp-primary: var(--by-orange, #C94F0A);
	--bp-ink: #1A1815;
	margin: 12px 0 2px;
	clear: both;
}
.bearn-pp[hidden] { display: none !important; }
.bearn-pp .bearn-pp__trigger {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; margin: 0; padding: 0 18px;
	border: 1.5px solid var(--bp-accent); border-radius: 999px;
	background: transparent; color: var(--bp-accent);
	font: inherit; font-weight: 700; font-size: .92em; line-height: 1.2; text-transform: none; letter-spacing: 0; text-decoration: none;
	cursor: pointer; box-shadow: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bearn-pp .bearn-pp__icon { flex: 0 0 auto; }
.bearn-pp .bearn-pp__trigger:hover, .bearn-pp .bearn-pp__trigger:focus-visible { background: color-mix(in srgb, var(--bp-accent) 11%, transparent); color: var(--bp-accent); outline: none; }
.bearn-pp .bearn-pp__trigger:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-accent) 30%, transparent); }
.bearn-pp--soft .bearn-pp__trigger { background: color-mix(in srgb, var(--bp-accent) 12%, #fff); border-color: transparent; }
.bearn-pp--filled .bearn-pp__trigger { background: var(--bp-accent); color: #fff; }
.bearn-pp--filled .bearn-pp__trigger:hover, .bearn-pp--filled .bearn-pp__trigger:focus-visible { background: color-mix(in srgb, var(--bp-accent) 88%, #000); color: #fff; }

/* ---------- the sheet: bottom sheet on phones, centred popup on larger screens ---------- */
html.bearn-sheet-open { overflow: hidden; }
.bearn-sheet {
	--bp-accent: var(--by-teal, #0E7C86);
	--bp-primary: var(--by-orange, #C94F0A);
	--bp-ink: #1A1815;
	position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100001;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(26, 24, 21, .55);
	animation: bearn-fade .18s ease;
	color: var(--bp-ink); font-size: 15px; line-height: 1.5;
}
.bearn-sheet *, .bearn-sheet *::before, .bearn-sheet *::after { box-sizing: border-box; }
.bearn-sheet__panel {
	position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
	padding: 26px 24px 22px; background: #fff; border-radius: 28px;
	box-shadow: 0 2px 4px rgba(26, 24, 21, .05), 0 40px 70px -30px rgba(26, 24, 21, .45);
	animation: bearn-pop .2s ease;
}
.bearn-sheet__handle { display: none; width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 999px; background: #d8d3c9; }
.bearn-sheet__close {
	position: absolute; top: 14px; right: 14px; display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px;
	background: #f1ede6; color: var(--bp-ink); font-size: 26px; line-height: 1; cursor: pointer;
}
.bearn-sheet__close:hover, .bearn-sheet__close:focus-visible { background: var(--bp-ink); color: #fff; outline: none; }

.bearn-sheet__head { display: flex; align-items: center; gap: 12px; margin: 0 48px 16px 0; }
.bearn-sheet__thumb { flex: 0 0 auto; width: 52px; height: 52px; object-fit: cover; border-radius: 14px; background: #f1ede6; }
.bearn-sheet__titles { min-width: 0; }
.bearn-sheet__title { margin: 0; font-size: 1.12em; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; color: var(--bp-ink); }
.bearn-sheet__product { margin: 2px 0 0; font-size: .86em; color: #6b655b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bearn-sheet__est { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 14px 16px; border-radius: 20px; background: #f0fafb; border: 1px solid #cfe9ec; }
.bearn-sheet__est-label { font-size: .74em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bp-accent); }
.bearn-sheet__est-amount { font-size: 1.9em; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--bp-ink); }
.bearn-sheet__est-meta { font-size: .84em; color: #6b655b; }

.bearn-sheet__intro { margin: 0 0 16px; color: #4B463F; }
.bearn-sheet__msg { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; font-size: .94em; }
.bearn-sheet__ok { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: #ecfdf3; border: 1px solid #abefc6; color: #05603a; font-weight: 600; font-size: .94em; }

.bearn-sheet__actions { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.bearn-sheet .bearn-sheet__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 0; padding: 0 22px;
	border: 2px solid var(--bp-primary); border-radius: 999px; background: var(--bp-primary); color: #fff;
	font: inherit; font-weight: 700; font-size: 1em; text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer; box-shadow: none;
	transition: filter .15s ease, background-color .15s ease;
}
.bearn-sheet .bearn-sheet__btn:hover, .bearn-sheet .bearn-sheet__btn:focus-visible { filter: brightness(.92); color: #fff; outline: none; }
.bearn-sheet .bearn-sheet__btn:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 35%, transparent); }
.bearn-sheet .bearn-sheet__btn--ghost { background: #fff; color: var(--bp-primary); }
.bearn-sheet .bearn-sheet__btn--ghost:hover, .bearn-sheet .bearn-sheet__btn--ghost:focus-visible { background: color-mix(in srgb, var(--bp-primary) 9%, #fff); color: var(--bp-primary); filter: none; }

.bearn-sheet__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.bearn-sheet .bearn-sheet__btn--wa { background: #1faa59; border-color: #1faa59; }
.bearn-sheet .bearn-sheet__chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: var(--bp-ink); font-weight: 700; font-size: .92em; text-decoration: none; }
.bearn-sheet .bearn-sheet__chip:hover, .bearn-sheet .bearn-sheet__chip:focus-visible { border-color: var(--bp-accent); color: var(--bp-accent); outline: none; }
.bearn-sheet .bearn-sheet__chip--wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.bearn-sheet .bearn-sheet__chip--wa:hover, .bearn-sheet .bearn-sheet__chip--wa:focus-visible { background: #178a48; border-color: #178a48; color: #fff; }

.bearn-sheet__linkrow { display: flex; gap: 8px; margin: 0 0 4px; }
.bearn-sheet .bearn-sheet__link { flex: 1 1 auto; min-width: 0; height: 46px; margin: 0; padding: 0 16px; border: 1px solid #d8d3c9; border-radius: 999px; background: #faf9f6; color: var(--bp-ink); font-size: 16px; text-overflow: ellipsis; box-shadow: none; }
.bearn-sheet .bearn-sheet__copy { flex: 0 0 auto; min-height: 46px; margin: 0; padding: 0 18px; border: 0; border-radius: 999px; background: var(--bp-accent); color: #fff; font: inherit; font-weight: 700; font-size: .92em; text-transform: none; letter-spacing: 0; cursor: pointer; }
.bearn-sheet .bearn-sheet__copy:hover, .bearn-sheet .bearn-sheet__copy:focus-visible { filter: brightness(.92); outline: none; }
.bearn-sheet__status { min-height: 1.3em; margin: 6px 0 0; font-size: .88em; font-weight: 600; }
.bearn-sheet__status--ok { color: #0a7a3d; }
.bearn-sheet__status--err { color: #b42318; }

.bearn-sheet__fine { margin: 10px 0 0; font-size: .78em; line-height: 1.45; color: #8B857B; }
.bearn-sheet__skel { height: 120px; border-radius: 20px; background: linear-gradient(90deg, #f3f0ea 25%, #ebe7df 50%, #f3f0ea 75%); background-size: 200% 100%; animation: bearn-shimmer 1.2s infinite linear; }
.bearn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes bearn-fade { from { opacity: 0; } }
@keyframes bearn-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes bearn-rise { from { transform: translateY(100%); } }
@keyframes bearn-shimmer { to { background-position: -200% 0; } }

/* Phones: a bottom sheet. */
@media (max-width: 600px) {
	.bearn-sheet { align-items: flex-end; padding: 0; }
	.bearn-sheet__panel { max-width: none; max-height: 88vh; padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 28px 28px 0 0; animation: bearn-rise .26s cubic-bezier(.22, .61, .36, 1); }
	.bearn-sheet__handle { display: block; }
	.bearn-sheet__close { top: 18px; }
	.bearn-sheet__linkrow { flex-direction: column; }
	.bearn-sheet .bearn-sheet__copy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.bearn-sheet, .bearn-sheet__panel, .bearn-sheet__skel { animation: none; }
}
