/*
 * PlanDose — floating trigger button styles.
 *
 * Loaded as a small, standalone stylesheet (handle: plandose-trigger) BEFORE
 * the main plandose.css, so the launch button always renders correctly even if
 * the large stylesheet is deferred / async-loaded later.
 * Only trigger-button rules live here. Modal, wizard, preview and print styles
 * stay in plandose.css.
 */

:root {
	--pd-accent: #0f6e56;
	--pd-accent-2: #11a37f;
	--pd-accent-light: #eef8f5;
	--pd-accent-soft: rgba(15, 110, 86, 0.10);
	--pd-border: #d8d8d5;
	--pd-border-soft: #ececea;
	--pd-text: #17201d;
	--pd-muted: #6b6f6d;
	--pd-danger: #a32d2d;
	--pd-danger-soft: rgba(163, 45, 45, 0.08);
	--pd-success: #0f6e56;
	--pd-success-soft: rgba(15, 110, 86, 0.10);
	--pd-warning: #8a5a00;
	--pd-bg: #ffffff;
	--pd-bg-soft: #fafaf9;
	--pd-overlay: rgba(15, 20, 18, 0.58);
	--pd-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	--pd-radius-lg: 22px;
	--pd-radius-md: 16px;
	--pd-radius-sm: 10px;
}

/* ==========================================================================
   Floating trigger
   ========================================================================== */

#plandose-trigger {
	position: fixed;
	bottom: max(24px, env(safe-area-inset-bottom));
	right: max(24px, env(safe-area-inset-right));
	width: auto;
	min-width: 138px;
	height: 56px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--pd-accent);
	color: #ffffff;
	border: none;
	box-shadow: 0 10px 30px rgba(15, 110, 86, 0.38);
	cursor: pointer;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 0 20px;
	margin: 0;
	line-height: 1;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
	font-weight: 800;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#plandose-trigger.plandose-pos-bottom_right {
	bottom: max(24px, env(safe-area-inset-bottom));
	right: max(24px, env(safe-area-inset-right));
	top: auto;
	left: auto;
}

#plandose-trigger.plandose-pos-bottom_left {
	bottom: max(24px, env(safe-area-inset-bottom));
	left: max(24px, env(safe-area-inset-left));
	top: auto;
	right: auto;
}

#plandose-trigger.plandose-pos-top_right {
	top: max(24px, env(safe-area-inset-top));
	right: max(24px, env(safe-area-inset-right));
	bottom: auto;
	left: auto;
}

#plandose-trigger.plandose-pos-top_left {
	top: max(24px, env(safe-area-inset-top));
	left: max(24px, env(safe-area-inset-left));
	right: auto;
	bottom: auto;
}

.plandose-trigger-text {
	display: inline-block;
	color: #ffffff;
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
	text-transform: none;
	text-shadow: none;
}

#plandose-trigger:hover {
	transform: translateY(-2px);
	filter: brightness(1.03);
	box-shadow: 0 14px 36px rgba(15, 110, 86, 0.48);
}

#plandose-trigger:focus-visible {
	transform: translateY(-1px);
	filter: brightness(1.02);
	outline: none;
	box-shadow:
		0 14px 36px rgba(15, 110, 86, 0.48),
		0 0 0 4px rgba(15, 110, 86, 0.20);
}

#plandose-trigger:active {
	transform: translateY(0);
	filter: brightness(0.98);
}

/* Icon (self-contained so the button renders without plandose.css) */
.plandose-icon {
	display: block;
	flex: 0 0 auto;
	background: currentColor;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 3v6.2l4.5 2.6 1-1.7-3.5-2V7h-2z"/></svg>') center / contain no-repeat;
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 3v6.2l4.5 2.6 1-1.7-3.5-2V7h-2z"/></svg>') center / contain no-repeat;
	width: 24px;
	height: 24px;
	color: #ffffff;
}

/* ==========================================================================
   Responsive (trigger only)
   ========================================================================== */

@media (max-width: 620px) {
	.plandose-trigger-text {
		display: inline-block;
		font-size: 14px;
	}

	#plandose-trigger {
		width: auto;
		min-width: 118px;
		height: 50px;
		padding: 0 15px;
		gap: 8px;
	}

	.plandose-icon {
		width: 22px;
		height: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#plandose-trigger {
		transition: none;
		animation: none;
	}

	#plandose-trigger:hover,
	#plandose-trigger:focus-visible {
		transform: none;
	}
}
