/**
 * Phuket Trip Planner — Bookmark Styles
 *
 * Loaded site-wide. Styles for the heart icon, toast notifications,
 * and floating badge. All classes prefixed with pkt- to avoid conflicts.
 *
 * @package PhuketTripPlanner
 * @version 1.0.0
 */

/* ── Heart / Bookmark Button ──────────────────────────────── */

.pkt-heart-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #d98a8a;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
	line-height: 1;
}

.pkt-heart-btn:hover {
	color: #e74c3c;
	transform: scale(1.1);
	background: #fff;
}

.pkt-heart-btn:focus-visible {
	outline: 2px solid #e74c3c;
	outline-offset: 2px;
}

.pkt-heart-btn--active {
	color: #e74c3c;
}

.pkt-heart-btn--active:hover {
	color: #c0392b;
}

.pkt-heart-btn--loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Pulse animation on save. */
@keyframes pkt-pulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.3); }
	100% { transform: scale(1); }
}

.pkt-heart-btn--active {
	animation: pkt-pulse 0.3s ease;
}

/* ── Toast Notification ───────────────────────────────────── */

.pkt-toast {
	position: fixed;
	bottom: 90px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	z-index: 10000;
	padding: 12px 24px;
	background: #333;
	color: #fff;
	border-radius: 8px;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	white-space: nowrap;
}

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

/* ── Floating Badge ───────────────────────────────────────── */

.pkt-badge {
	position: fixed;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #0073aa;
	color: #fff;
	text-decoration: none;
	border-radius: 30px;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 500;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transition: background 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}

.pkt-badge:hover {
	background: #005b8a;
	color: #fff;
	text-decoration: none;
	transform: scale(1.05);
}

.pkt-badge:visited {
	color: #fff;
}

.pkt-badge:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 4px #0073aa;
}

.pkt-badge--bottom-right {
	bottom: 24px;
	right: 24px;
}

.pkt-badge--bottom-left {
	bottom: 24px;
	left: 24px;
}

.pkt-badge__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
}

.pkt-badge svg {
	flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 480px) {
	.pkt-heart-btn {
		width: 36px;
		height: 36px;
	}

	.pkt-heart-btn svg {
		width: 18px;
		height: 18px;
	}

	.pkt-badge {
		padding: 8px 14px;
		font-size: 13px;
		bottom: 16px;
	}

	.pkt-badge--bottom-right {
		right: 16px;
	}

	.pkt-badge--bottom-left {
		left: 16px;
	}

	.pkt-badge__text {
		display: none;
	}

	.pkt-toast {
		bottom: 70px;
		font-size: 13px;
		padding: 10px 18px;
	}
}

/* ── Print ────────────────────────────────────────────────── */

@media print {
	.pkt-heart-btn,
	.pkt-badge,
	.pkt-toast {
		display: none !important;
	}
}

/* ── Reduced Motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.pkt-heart-btn,
	.pkt-badge,
	.pkt-toast {
		transition: none;
	}

	.pkt-heart-btn--active {
		animation: none;
	}
}
