/* =========================================================
   ENHANCEMENTS
   - Premium cursor accent (native cursor kept, soft trailing ring)
   - Compact time-based greeting toast (bottom-right)
   Brand accent: var(--tj-theme-primary) #8750f7
========================================================= */

/* ---------------------------------------------------------
   1. CURSOR ACCENT
   A soft trailing ring that follows the pointer. The native
   cursor is intentionally kept — this only layers on top.
   Fine-pointer devices only.
--------------------------------------------------------- */
.hs-cursor-ring {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	pointer-events: none;
	border: 1.5px solid rgba(135, 80, 247, .55);
	background: rgba(135, 80, 247, .04);
	box-shadow: 0 0 20px rgba(135, 80, 247, .22),
		inset 0 0 12px rgba(155, 141, 255, .12);
	opacity: 0;
	will-change: transform;
	transform: translate3d(-50%, -50%, 0);
	transition: opacity .35s ease,
		width .35s cubic-bezier(.16, 1, .3, 1),
		height .35s cubic-bezier(.16, 1, .3, 1),
		background-color .3s ease, border-color .3s ease;
}

.hs-cursor-ring.is-active {
	opacity: 1;
}

/* Hover over interactive elements: grow + gentle fill */
.hs-cursor-ring.is-hover {
	width: 54px;
	height: 54px;
	border-color: rgba(155, 141, 255, .9);
	background: rgba(135, 80, 247, .12);
}

/* Press feedback */
.hs-cursor-ring.is-down {
	width: 26px;
	height: 26px;
	background: rgba(135, 80, 247, .2);
}

body.light-mode .hs-cursor-ring {
	border-color: rgba(135, 80, 247, .5);
	box-shadow: 0 0 20px rgba(135, 80, 247, .18);
}

/* Touch / coarse pointer or reduced motion: no custom ring */
@media (hover: none), (pointer: coarse) {
	.hs-cursor-ring { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.hs-cursor-ring { display: none !important; }
}

/* ---------------------------------------------------------
   2. GREETING TOAST (compact, bottom-right)
--------------------------------------------------------- */
.hs-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 100000;
	max-width: 300px;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 34px 11px 14px;
	border-radius: 14px;
	background: rgba(20, 12, 34, .72);
	border: 1px solid rgba(135, 80, 247, .3);
	box-shadow: 0 16px 44px rgba(0, 0, 0, .42);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	color: #f4f1fb;
	font-family: var(--tj-ff-body, "Sora", sans-serif);
	transform: translateX(-50%) translateY(18px);
	opacity: 0;
	transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .4s ease;
	pointer-events: auto;
}

.hs-toast.is-visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.hs-toast.is-leaving {
	transform: translateX(-50%) translateY(18px);
	opacity: 0;
}

.hs-toast__emoji {
	font-size: 20px;
	line-height: 1;
	flex: 0 0 auto;
	filter: drop-shadow(0 2px 5px rgba(135, 80, 247, .4));
}

.hs-toast__title {
	margin: 0;
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: .2px;
	line-height: 1.4;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hs-toast__close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	display: grid;
	place-items: center;
	border: 0;
	background: transparent;
	color: rgba(244, 241, 251, .45);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: color .2s ease, background .2s ease;
}

.hs-toast__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, .08);
}

/* Thin auto-dismiss progress line along the bottom edge */
.hs-toast__bar {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 5px;
	height: 2px;
	border-radius: 2px;
	overflow: hidden;
	opacity: .8;
}

.hs-toast__bar span {
	display: block;
	height: 100%;
	width: 100%;
	transform-origin: left center;
	background: linear-gradient(90deg, #9b8dff, #8750f7);
}

.hs-toast.is-visible .hs-toast__bar span {
	animation: hs-toast-bar var(--hs-toast-life, 5000ms) linear forwards;
}

@keyframes hs-toast-bar {
	from { transform: scaleX(1); }
	to   { transform: scaleX(0); }
}

/* Light mode */
body.light-mode .hs-toast {
	background: rgba(255, 255, 255, .85);
	border-color: rgba(135, 80, 247, .25);
	box-shadow: 0 16px 44px rgba(87, 50, 150, .16);
	color: #1c1230;
}

body.light-mode .hs-toast__title {
	color: #14082a;
}

body.light-mode .hs-toast__close {
	color: rgba(28, 18, 48, .4);
}

body.light-mode .hs-toast__close:hover {
	color: #14082a;
	background: rgba(87, 50, 150, .1);
}

/* Mobile: centered near the bottom, comfortable width */
@media (max-width: 575px) {
	.hs-toast {
		bottom: 30%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hs-toast {
		transition: opacity .3s ease;
		transform: translateX(-50%);
	}
	.hs-toast.is-visible { transform: translateX(-50%); }
	.hs-toast.is-leaving { transform: translateX(-50%); }
	.hs-toast.is-visible .hs-toast__bar span { animation: none; }
}
