/**
 * Success page + order history.
 *
 * Shares the checkout's token binding: Elementor globals first, the site's
 * current values as fallbacks.
 */

/* Hide the theme's slug-derived page title ("Smm-success", "Smm-track"). */
.bif365-page .page-header,
.bif365-page .entry-header,
.bif365-page .entry-title,
.bif365-page .page-title { display: none !important; }

.bif365-acct {
	--bif-primary: var(--e-global-color-primary, #3fa9f5);
	/* Blue is the accent everywhere — prices and primary actions included. */
	--bif-brand: var(--bif-primary);
	--bif-heading: var(--e-global-color-secondary, #000);
	--bif-text: var(--e-global-color-text, #3f3f3f);

	--bif-primary-soft: color-mix(in srgb, var(--bif-primary) 10%, #fff);
	--bif-brand-soft: var(--bif-primary-soft);

	--bif-muted: #6b7280;
	--bif-line: #e5e7eb;
	--bif-radius: 16px;
	--bif-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .07);
	--bif-font: var(--e-global-typography-text-font-family, "Outfit"), system-ui, -apple-system, "Segoe UI", sans-serif;

	font-family: var(--bif-font);
	color: var(--bif-text);
	max-width: 720px;
	margin: 0 auto;
	line-height: 1.55;
	box-sizing: border-box;
	position: relative;
}

.bif365-acct *,
.bif365-acct *::before,
.bif365-acct *::after { box-sizing: inherit; }

/* ── shared bits ──────────────────────────────────────────── */
.bif365-acct .bif365-btn {
	appearance: none;
	display: inline-block;
	font: inherit;
	font-weight: 600;
	font-size: 16px;
	border-radius: 12px;
	padding: 14px 30px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: filter .16s, border-color .16s, color .16s;
}

.bif365-acct .bif365-btn--brand { background: var(--bif-brand); color: #fff; }
.bif365-acct .bif365-btn--brand:hover { filter: brightness(1.08); color: #fff; }

.bif365-acct .bif365-btn--ghost {
	background: transparent;
	color: var(--bif-muted);
	border-color: var(--bif-line);
	font-size: 14px;
	padding: 9px 16px;
	border-radius: 10px;
}

.bif365-acct .bif365-btn--ghost:hover { color: var(--bif-heading); border-color: var(--bif-muted); }

.bif365-acct .bif365-btn.is-busy { opacity: .6; cursor: wait; }

.bif365-notice {
	border-radius: 12px;
	padding: 16px 19px;
	background: #f9fafb;
	border: 1px solid var(--bif-line);
	color: var(--bif-text);
}

.bif365-notice--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── success ──────────────────────────────────────────────── */
.bif365-success { padding: 8px 0 20px; text-align: center; }

.bif365-confetti {
	position: absolute;
	inset: -20px 0 auto 0;
	width: 100%;
	height: 560px;
	pointer-events: none;
	z-index: 1;
}

.bif365-success__inner { position: relative; z-index: 2; }

/* animated tick */
.bif365-success__tick { width: 84px; height: 84px; margin: 0 auto 22px; }
.bif365-success__tick svg { width: 100%; height: 100%; }

.bif365-tick__circle {
	stroke: var(--bif-primary);
	stroke-width: 2.5;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: bif365-draw .6s cubic-bezier(.65, 0, .45, 1) forwards;
}

.bif365-tick__check {
	stroke: var(--bif-primary);
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: bif365-draw .35s cubic-bezier(.65, 0, .45, 1) .5s forwards;
}

@keyframes bif365-draw { to { stroke-dashoffset: 0; } }

.bif365-success__title {
	font-family: var(--e-global-typography-primary-font-family, "Outfit"), var(--bif-font);
	font-size: clamp(25px, 4.6vw, 38px);
	font-weight: 600;
	line-height: 1.18;
	color: var(--bif-heading);
	margin: 0 0 12px;
	animation: bif365-rise .5s .2s ease both;
}

.bif365-success__sub {
	font-size: clamp(16px, 2.2vw, 19px);
	color: var(--bif-muted);
	margin: 0 0 30px;
	animation: bif365-rise .5s .32s ease both;
}

.bif365-success__sub strong { color: var(--bif-brand); font-weight: 600; }

@keyframes bif365-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.bif365-success__card {
	background: #fff;
	border: 1px solid var(--bif-line);
	border-radius: var(--bif-radius);
	box-shadow: var(--bif-shadow);
	padding: 24px 26px;
	margin: 0 0 28px;
	text-align: left;
	display: flex;
	gap: 20px;
	align-items: flex-start;
	animation: bif365-rise .5s .44s ease both;
}

.bif365-success__thumb {
	width: 88px;
	height: 88px;
	border-radius: 12px;
	object-fit: cover;
	background: #f3f4f6;
	flex: 0 0 auto;
}

.bif365-kv {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 7px 20px;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
}

.bif365-kv dt { color: var(--bif-muted); }
.bif365-kv dd { margin: 0; font-weight: 600; color: var(--bif-heading); text-align: right; overflow-wrap: anywhere; }
.bif365-kv__link a { color: var(--bif-primary); }

.bif365-kv dt.bif365-kv__total,
.bif365-kv dd.bif365-kv__total {
	border-top: 1px solid var(--bif-line);
	padding-top: 9px;
	margin-top: 3px;
}

.bif365-kv dd.bif365-kv__total { color: var(--bif-brand); font-size: 18px; }

.bif365-success__cta { animation: bif365-rise .5s .56s ease both; min-width: 240px; }

.bif365-success__note {
	margin: 22px 0 0;
	font-size: 14px;
	color: var(--bif-muted);
	animation: bif365-rise .5s .68s ease both;
}

@media (prefers-reduced-motion: reduce) {
	.bif365-success__title,
	.bif365-success__sub,
	.bif365-success__card,
	.bif365-success__cta,
	.bif365-success__note { animation: none; }
	.bif365-tick__circle,
	.bif365-tick__check { animation: none; stroke-dashoffset: 0; }
}

/* ── login gate ───────────────────────────────────────────── */
.bif365-gate {
	background: #fff;
	border: 1px solid var(--bif-line);
	border-radius: var(--bif-radius);
	box-shadow: var(--bif-shadow);
	padding: 30px 32px;
}

.bif365-gate__title {
	font-size: 23px;
	font-weight: 600;
	color: var(--bif-heading);
	margin: 0 0 10px;
}

.bif365-gate__text { color: var(--bif-muted); margin: 0 0 22px; font-size: 15px; }

.bif365-gate input[type="text"],
.bif365-gate input[type="password"] {
	width: 100%;
	font: inherit;
	font-size: 16px;
	padding: 13px 14px;
	border: 2px solid var(--bif-line);
	border-radius: 11px;
	margin-bottom: 4px;
}

.bif365-gate input:focus {
	outline: none;
	border-color: var(--bif-primary);
	box-shadow: 0 0 0 4px var(--bif-primary-soft);
}

.bif365-gate p { margin: 0 0 14px; }
.bif365-gate label { display: block; font-weight: 500; color: var(--bif-heading); margin-bottom: 6px; }

.bif365-gate input[type="submit"] {
	font: inherit;
	font-weight: 600;
	font-size: 16px;
	background: var(--bif-primary);
	color: #fff;
	border: none;
	border-radius: 11px;
	padding: 14px 28px;
	cursor: pointer;
	width: 100%;
}

.bif365-gate__links { margin: 16px 0 0; }
.bif365-gate__links a { color: var(--bif-primary); }
.bif365-gate__hint { margin: 18px 0 0; font-size: 14px; color: var(--bif-muted); }

/* ── history ──────────────────────────────────────────────── */
.bif365-history__head {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.bif365-history__title {
	font-size: clamp(21px, 3.2vw, 27px);
	font-weight: 600;
	color: var(--bif-heading);
	margin: 0;
	flex: 1 1 auto;
}

.bif365-history__msg {
	margin: 0 0 16px;
	padding: 11px 15px;
	border-radius: 10px;
	font-size: 14px;
	background: #f9fafb;
	border: 1px solid var(--bif-line);
}

.bif365-history__msg.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.bif365-history__msg.is-info { background: var(--bif-primary-soft); border-color: var(--bif-primary); }

.bif365-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.bif365-order {
	background: #fff;
	border: 1px solid var(--bif-line);
	border-radius: var(--bif-radius);
	padding: 18px 20px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.bif365-order__main { display: flex; gap: 16px; align-items: flex-start; }

.bif365-order__thumb {
	width: 62px;
	height: 62px;
	border-radius: 11px;
	object-fit: cover;
	background: #f3f4f6;
	flex: 0 0 auto;
}

.bif365-order__thumb--none {
	display: block;
	background: var(--bif-primary-soft);
}

.bif365-order__body { flex: 1 1 auto; min-width: 0; }

.bif365-order__service {
	margin: 0;
	font-weight: 600;
	font-size: 17px;
	color: var(--bif-heading);
}

.bif365-order__meta,
.bif365-order__num {
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--bif-muted);
	overflow-wrap: anywhere;
}

.bif365-order__status { flex: 0 0 auto; }

.bif365-pill {
	display: inline-block;
	padding: 5px 13px;
	border-radius: 99px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.bif365-pill--wait { background: #f3f4f6; color: #4b5563; }
.bif365-pill--go { background: var(--bif-primary-soft); color: #0b6ba8; }
.bif365-pill--done { background: #dcfce7; color: #15803d; }
.bif365-pill--warn { background: #fef3c7; color: #92400e; }
.bif365-pill--stop { background: #fee2e2; color: #991b1b; }

.bif365-progress {
	height: 7px;
	background: #eef0f2;
	border-radius: 99px;
	overflow: hidden;
	margin: 15px 0 7px;
}

.bif365-progress__bar {
	height: 100%;
	background: linear-gradient(90deg, color-mix(in srgb, var(--bif-primary) 65%, #fff), var(--bif-primary));
	border-radius: 99px;
	transition: width .5s ease;
}

.bif365-order__counts { margin: 0; font-size: 13px; color: var(--bif-muted); }

.bif365-order__hint {
	margin: 12px 0 0;
	padding: 9px 13px;
	border-radius: 9px;
	font-size: 13.5px;
	background: #f9fafb;
	color: var(--bif-muted);
}

.bif365-order__hint--warn { background: #fffbeb; color: #92400e; }
.bif365-order__hint--stop { background: #fef2f2; color: #991b1b; }
.bif365-order__hint--done { background: #f0fdf4; color: #15803d; }

.bif365-order__foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--bif-line);
	font-size: 13px;
}

.bif365-order__foot a { color: var(--bif-primary); }
.bif365-order__synced { color: var(--bif-muted); margin-left: auto; }

.bif365-history__foot { margin-top: 22px; text-align: center; font-size: 14px; }
.bif365-history__foot a { color: var(--bif-muted); }

/* ── mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
	.bif365-success__card { flex-direction: column; align-items: center; text-align: center; }
	.bif365-kv { width: 100%; }
	.bif365-success__cta { width: 100%; min-width: 0; }
	.bif365-confetti { height: 420px; }

	.bif365-order__main { flex-wrap: wrap; }
	.bif365-order__status { width: 100%; }
	.bif365-order__thumb { width: 52px; height: 52px; }
	.bif365-history__head .bif365-btn--ghost { width: 100%; }
}

