/* La Peau WhatsApp Concierge — frontend widget
   All dimensions/colors come from :root variables printed by PHP,
   so the admin's width & height controls take effect instantly. */

.lpwa-root {
	position: fixed;
	bottom: var(--lpwa-bottom, 28px);
	z-index: var(--lpwa-z, 99990);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.lpwa-pos-right { right: var(--lpwa-side, 28px); }
.lpwa-pos-left  { left:  var(--lpwa-side, 28px); }

/* ---------- Floating button (admin-controlled width & height) ---------- */
.lpwa-button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width:  var(--lpwa-btn-w, 64px);
	height: var(--lpwa-btn-h, 64px);
	border-radius: var(--lpwa-btn-radius, 50%);
	background: var(--lpwa-btn-bg, #0E3B2E);
	color: var(--lpwa-icon, #F6F1E7);
	border: none;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.14);
	transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
	outline-offset: 3px;
}
.lpwa-button:hover,
.lpwa-button:focus-visible {
	background: var(--lpwa-btn-bg-hover, #14503E);
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26), 0 3px 8px rgba(0, 0, 0, 0.16);
}
.lpwa-glyph {
	width:  calc(min(var(--lpwa-btn-w, 64px), var(--lpwa-btn-h, 64px)) * var(--lpwa-icon-scale, 0.5));
	height: calc(min(var(--lpwa-btn-w, 64px), var(--lpwa-btn-h, 64px)) * var(--lpwa-icon-scale, 0.5));
	display: block;
	transition: opacity .2s ease, transform .2s ease;
}

/* Close glyph shown while the panel is open */
.lpwa-icon-close {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc(min(var(--lpwa-btn-w, 64px), var(--lpwa-btn-h, 64px)) * 0.42);
	line-height: 1;
	opacity: 0;
	transform: rotate(-90deg) scale(.6);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
}
.lpwa-root.lpwa-open .lpwa-button .lpwa-glyph { opacity: 0; transform: scale(.6); }
.lpwa-root.lpwa-open .lpwa-button .lpwa-icon-close { opacity: 1; transform: rotate(0) scale(1); }

/* Notification badge */
.lpwa-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--lpwa-accent, #C6A15B);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.lpwa-root.lpwa-open .lpwa-badge,
.lpwa-root.lpwa-seen .lpwa-badge { display: none; }

/* ---------- Animations ---------- */
.lpwa-ring {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
}
.lpwa-anim-breathe .lpwa-button { animation: lpwa-breathe 3.4s ease-in-out infinite; }
@keyframes lpwa-breathe {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.045); }
}
.lpwa-anim-breathe .lpwa-button:hover { animation-play-state: paused; }

.lpwa-anim-pulse-ring .lpwa-ring { box-shadow: 0 0 0 0 var(--lpwa-btn-bg, #0E3B2E); animation: lpwa-pulse 2.6s ease-out infinite; }
@keyframes lpwa-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(14, 59, 46, 0.45); }
	70%  { box-shadow: 0 0 0 16px rgba(14, 59, 46, 0); }
	100% { box-shadow: 0 0 0 0 rgba(14, 59, 46, 0); }
}

.lpwa-anim-bob .lpwa-button { animation: lpwa-bob 2.8s ease-in-out infinite; }
@keyframes lpwa-bob {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-6px); }
}

.lpwa-root.lpwa-open .lpwa-button,
.lpwa-anim-none .lpwa-button { animation: none; }
.lpwa-root.lpwa-open .lpwa-ring { animation: none; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
	.lpwa-button, .lpwa-ring, .lpwa-panel { animation: none !important; transition: none !important; }
}

/* ---------- Chat panel ---------- */
.lpwa-panel {
	position: absolute;
	bottom: calc(var(--lpwa-btn-h, 64px) + 18px);
	width: min(340px, calc(100vw - 32px));
	background: #FBF8F2;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), 0 4px 12px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transform: translateY(10px) scale(.98);
	transition: opacity .25s ease, transform .25s ease;
}
.lpwa-pos-right .lpwa-panel { right: 0; transform-origin: bottom right; }
.lpwa-pos-left  .lpwa-panel { left: 0;  transform-origin: bottom left; }
.lpwa-panel[hidden] { display: none; }
.lpwa-root.lpwa-open .lpwa-panel { opacity: 1; transform: translateY(0) scale(1); }

.lpwa-panel-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 14px;
	background: var(--lpwa-btn-bg, #0E3B2E);
	color: var(--lpwa-icon, #F6F1E7);
}
.lpwa-monogram {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--lpwa-accent, #C6A15B);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20px;
	color: var(--lpwa-accent, #C6A15B);
	flex: 0 0 auto;
}
.lpwa-head-text { display: flex; flex-direction: column; min-width: 0; }
.lpwa-brand {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 17px;
	letter-spacing: .04em;
}
.lpwa-tagline {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .75;
	margin-top: 2px;
}
.lpwa-close {
	margin-left: auto;
	background: none;
	border: none;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: .7;
	padding: 4px 6px;
}
.lpwa-close:hover { opacity: 1; }

.lpwa-panel-body { padding: 18px 16px 6px; }
.lpwa-bubble {
	background: #fff;
	border: 1px solid rgba(14, 59, 46, 0.08);
	border-radius: 4px 14px 14px 14px;
	padding: 12px 14px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #2A2A26;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	max-width: 92%;
}
.lpwa-bubble + .lpwa-bubble { margin-top: 10px; }
.lpwa-bubble-note { background: #F4EDE0; border-color: rgba(198, 161, 91, 0.35); }
.lpwa-hint {
	display: inline-block;
	margin: 10px 2px 4px;
	font-size: 11px;
	letter-spacing: .06em;
	color: #8A8578;
}

.lpwa-panel-foot { padding: 12px 16px 16px; }
.lpwa-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 16px;
	border-radius: 999px;
	background: var(--lpwa-btn-bg, #0E3B2E);
	color: var(--lpwa-icon, #F6F1E7) !important;
	text-decoration: none !important;
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background-color .2s ease, transform .2s ease;
}
.lpwa-cta:hover { background: var(--lpwa-btn-bg-hover, #14503E); transform: translateY(-1px); }
.lpwa-cta .lpwa-glyph { width: 18px; height: 18px; }

/* ---------- Device visibility ---------- */
@media (min-width: 769px) {
	.lpwa-hide-desktop { display: none !important; }
}
@media (max-width: 768px) {
	.lpwa-hide-mobile { display: none !important; }
}
