/* VIP Custom Tracking — frontend styles */

/* ---- Page button ---- */
.vipct-hero {
	display: flex;
	justify-content: center;
	padding: 48px 16px 280px;
}
.vipct-track-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #4d148c;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 16px 36px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(77, 20, 140, 0.35);
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.vipct-track-btn:hover {
	background: #3a0f6b;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(77, 20, 140, 0.45);
	color: #fff;
}
.vipct-track-btn svg {
	flex: 0 0 auto;
}

/* ---- Overlay ---- */
.vipct-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	/* flex-start + auto margins on the wrap = centered when it fits,
	   top-anchored (never bleeding off the top) when it doesn't */
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 24px 24px;
	overflow-y: auto;
	background: rgba(15, 23, 42, 0.55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.vipct-overlay.vipct-open {
	display: flex;
}

/* ---- Modal card ---- */
.vipct-modal-wrap {
	position: relative;
	width: 100%;
	max-width: 680px;
	margin: auto 0;
}
.vipct-modal {
	background: #fff;
	border-radius: 18px;
	padding: 48px 56px 40px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	animation: vipct-pop 0.22s ease;
	font-family: "Helvetica Neue", Helvetica, Arial, -apple-system, sans-serif;
	/* Header (logo, title, form) stays fixed; only the result area scrolls.
	   As a flex column capped at 85vh, the result div is the lone scroll
	   container, so it's the only child that shrinks. */
	display: flex;
	flex-direction: column;
	max-height: 85vh;
}
@keyframes vipct-pop {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.vipct-brand {
	font-size: 38px;
	font-weight: 800;
	letter-spacing: -1.5px;
	color: #4d148c;
	margin-bottom: 14px;
}
.vipct-brand span {
	color: #ff6600;
}
.vipct-modal h2 {
	margin: 0 0 8px;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.5px;
	color: #111827;
	font-family: inherit;
}
.vipct-sub {
	margin: 0 0 28px;
	font-size: 17px;
	font-weight: 400;
	color: #6b7280;
}

/* ---- Form ---- */
.vipct-form {
	display: flex;
	gap: 14px;
	align-items: stretch;
}
.vipct-form input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid #e2e3e7;
	border-radius: 12px;
	padding: 16px 20px;
	font-size: 16px;
	color: #1f2937;
	outline: none;
	background: #f7f7f8;
}
.vipct-form input::placeholder {
	color: #9ca3af;
}
.vipct-form input:focus {
	border-color: #4d148c;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(77, 20, 140, 0.15);
}
.vipct-form button {
	flex: 0 0 auto;
	background: #f0731f;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 14px 34px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}
.vipct-form button:hover {
	background: #d96416;
	color: #fff;
}
.vipct-form button:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* ---- Close button (floats outside top-right corner) ---- */
/* Centered on the corner: half inside the card, half outside */
.vipct-close {
	position: absolute;
	top: -28px;
	right: -28px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #f0731f;
	color: #fff;
	border: 4px solid #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease, transform 0.15s ease;
}
.vipct-close:hover {
	background: #d96416;
	transform: rotate(90deg);
}

/* ---- Result area ---- */
.vipct-result {
	margin-top: 24px;
	display: none;
	text-align: left;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.vipct-result.vipct-show {
	display: block;
}
.vipct-result-card {
	border: 1px solid #e5e7eb;
	border-left: 5px solid #ff6600;
	border-radius: 12px;
	padding: 20px 24px;
	background: #faf8fd;
	animation: vipct-pop 0.2s ease;
}
.vipct-result-number {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
	margin-bottom: 12px;
}
.vipct-result-row {
	display: flex;
	gap: 10px;
	align-items: baseline;
	margin: 6px 0;
	font-size: 16px;
}
.vipct-result-label {
	flex: 0 0 130px;
	font-weight: 700;
	color: #4d148c;
}
.vipct-result-value {
	color: #1f2937;
}
.vipct-error {
	border: 1px solid #fecaca;
	border-left: 5px solid #dc2626;
	border-radius: 12px;
	padding: 16px 22px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	animation: vipct-pop 0.2s ease;
}
.vipct-loading {
	text-align: center;
	color: #6b7280;
	font-size: 15px;
	padding: 8px 0;
}

/* ---- Result: header row ---- */
.vipct-result-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.vipct-result-top .vipct-result-number {
	margin-bottom: 0;
}
.vipct-status-pill {
	background: #ff6600;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 999px;
	white-space: nowrap;
}
.vipct-status-pill.vipct-pill-delivered {
	background: #16a34a;
}

/* ---- Result: package details ---- */
.vipct-pkg {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin: 0 0 24px;
}
.vipct-pkg-item {
	background: #fff;
	border: 1px solid #eceef2;
	border-radius: 10px;
	padding: 12px 10px;
	text-align: center;
}
.vipct-pkg-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
}
.vipct-pkg-val {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #4d148c;
	margin-top: 4px;
}

/* ---- Result: progress bar ---- */
.vipct-progress {
	position: relative;
	margin: 8px 0 4px;
	padding: 4px 0 8px;
}
.vipct-progress-track {
	position: absolute;
	top: 12px; /* dot center: 4px padding + half of 16px dot */
	left: 10%;
	right: 10%;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
}
.vipct-progress-fill {
	height: 100%;
	background: #ff6600;
	border-radius: 2px;
	transition: width 0.4s ease;
}
.vipct-progress-steps {
	position: relative;
	display: flex;
}
.vipct-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	text-align: center;
	min-width: 0;
}
.vipct-step-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #d6d9de;
	box-sizing: border-box;
}
.vipct-step.vipct-done .vipct-step-dot,
.vipct-step.vipct-current .vipct-step-dot {
	background: #ff6600;
	border-color: #ff6600;
}
.vipct-step.vipct-current .vipct-step-dot {
	box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.2);
}
.vipct-step-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	color: #9ca3af;
}
.vipct-step.vipct-done .vipct-step-label {
	color: #374151;
}
.vipct-step.vipct-current .vipct-step-label {
	color: #ff6600;
}

/* ---- Result: current location ---- */
.vipct-current-loc {
	margin-top: 14px;
	font-size: 14px;
	color: #374151;
}
.vipct-current-loc strong {
	color: #4d148c;
}

/* ---- Result: history timeline ---- */
.vipct-timeline {
	margin-top: 22px;
	border-top: 1px solid #ebedf1;
	padding-top: 16px;
}
.vipct-timeline-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
	margin-bottom: 14px;
}
.vipct-tl-item {
	position: relative;
	margin-left: 8px;
	padding: 0 0 18px 24px;
	border-left: 2px solid #e5e7eb;
}
.vipct-tl-item:last-child {
	padding-bottom: 2px;
	border-left-color: transparent;
}
.vipct-tl-dot {
	position: absolute;
	left: -7px;
	top: 3px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #c7cbd1;
	box-sizing: content-box;
}
.vipct-tl-item.vipct-tl-latest .vipct-tl-dot {
	background: #ff6600;
	border-color: #ff6600;
	box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.18);
}
.vipct-tl-status {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}
.vipct-tl-item.vipct-tl-latest .vipct-tl-status {
	color: #ff6600;
}
.vipct-tl-meta {
	font-size: 13px;
	color: #6b7280;
	margin-top: 3px;
}

/* Lock page scroll while modal is open.
   The html rule matters: most themes scroll the root element,
   so body{overflow:hidden} alone doesn't stop the background. */
html.vipct-modal-open,
body.vipct-modal-open {
	overflow: hidden;
	height: 100%;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
	/* Full-width sheet starting 10vh down; the overlay scrolls it as one unit */
	.vipct-overlay {
		padding: 0;
	}
	.vipct-modal-wrap {
		max-width: 100%;
		margin: 10vh 0 0;
	}
	.vipct-modal {
		border-radius: 24px 24px 0 0;
		padding: 60px 24px 40px;
		/* Reaches the bottom of the screen even with short content,
		   grows freely past it when results are long */
		min-height: 90vh;
		max-height: none;
		box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
		animation: vipct-sheet 0.28s ease;
	}
	/* One fluid scroll: no inner scrolling window on mobile */
	.vipct-result {
		overflow-y: visible;
	}
	@keyframes vipct-sheet {
		from { transform: translateY(100%); }
		to   { transform: translateY(0); }
	}
	/* Override the inline 60px desktop size on the brand mark */
	.vipct-brand {
		font-size: 42px !important;
		margin-bottom: 22px;
	}
	.vipct-modal h2 {
		font-size: 28px;
		margin-bottom: 10px;
	}
	.vipct-sub {
		font-size: 18px;
		margin-bottom: 34px;
	}
	/* Stack the input and Track button full-width */
	.vipct-form {
		flex-direction: column;
		gap: 18px;
	}
	.vipct-form input {
		padding: 18px 20px;
		font-size: 17px;
	}
	.vipct-form button {
		width: 100%;
		padding: 17px;
		font-size: 19px;
		border-radius: 12px;
	}
	/* X anchored to the popup's top-right corner (scrolls with the sheet):
	   orange disc, see-through gap, white outer ring */
	.vipct-close {
		position: absolute;
		top: -29px;
		right: 12px;
		width: 58px;
		height: 58px;
		font-size: 24px;
		border: 5px solid rgba(0, 0, 0, 0.28);
		background-clip: padding-box;
		box-shadow: 0 0 0 4px #fff;
	}
	.vipct-close:hover {
		transform: none;
	}
	.vipct-result-row {
		flex-direction: column;
		gap: 2px;
	}
	/* Package details stack as label/value rows */
	.vipct-pkg {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.vipct-pkg-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		text-align: left;
		padding: 11px 14px;
	}
	.vipct-pkg-val {
		margin-top: 0;
		font-size: 14px;
		text-align: right;
	}
	/* Progress labels shrink to fit five steps */
	.vipct-step-label {
		font-size: 10px;
	}
	.vipct-result-card {
		padding: 18px 16px;
	}
	.vipct-hero {
		padding-bottom: 160px;
	}
}
