/* ==========================================================================
   Proofly — Front-end Notification Styles
   ========================================================================== */

/* ── Custom properties ────────────────────────────────────────────────────── */
.proofly-box {
	--pr-bg:        #ffffff;
	--pr-shadow:    0 4px 24px rgba(0, 0, 0, .10);
	--pr-radius:    50px;
	--pr-text:      #1e1e2e;
	--pr-muted:     #6b7280;
	--pr-thumb:     48px;
	--pr-anim-dur:  300ms;
}

/* ── Holder ───────────────────────────────────────────────────────────────── */
/* The holder is just a logical container — boxes use position:fixed themselves */
.proofly-holder {
	display: contents; /* Renders children as if holder didn't exist in layout */
	pointer-events: none;
}

.proofly-holder.proofly-hidden-mobile {
	/* Hidden class applied server-side; JS also checks viewport width */
}

/* ── Box ──────────────────────────────────────────────────────────────────── */
.proofly-box {
	position: fixed;
	z-index: 100010;
	bottom: -160px;            /* Off-screen start position */
	left: 16px;
	pointer-events: auto;

	display: flex;
	flex-direction: column;

	background: var(--pr-bg);
	border-radius: var(--pr-radius);
	box-shadow: var(--pr-shadow);
	min-width: 280px;
	max-width: 400px;
	overflow: hidden;

	opacity: 0;
	will-change: transform, opacity, bottom;
	transition:
		bottom  var(--pr-anim-dur) cubic-bezier(.34, 1.56, .64, 1),
		opacity var(--pr-anim-dur) ease;
}

/* Position: right */
.proofly-box.proofly-pos-right {
	left: auto;
	right: 16px;
}

/* Top positions — slide down from top instead of up from bottom */
.proofly-box.proofly-pos-top-left,
.proofly-box.proofly-pos-top-right {
	bottom: auto;
	top: -160px; /* Off-screen start */
	transition:
		top     var(--pr-anim-dur) cubic-bezier(.34, 1.56, .64, 1),
		opacity var(--pr-anim-dur) ease;
}
.proofly-box.proofly-pos-top-right {
	left: auto;
	right: 16px;
}
.proofly-box.proofly-pos-top-left.proofly--visible,
.proofly-box.proofly-pos-top-right.proofly--visible {
	top: 16px;
	bottom: auto;
}

/* ── Shape variants ───────────────────────────────────────────────────────── */
/* container shape rules now in shape section above */

/* ── Visible state ────────────────────────────────────────────────────────── */
.proofly-box.proofly--visible {
	bottom: 20px;
	opacity: 1;
}

/* ── Animation variants (Pro) ────────────────────────────────────────────── */

/* Fade — stays at bottom:20px always, only opacity animates */
.proofly-box.proofly-anim-fade {
	bottom: 20px; /* fixed position — no slide */
	transition: opacity var(--pr-anim-dur) ease;
}
/* Hidden state for fade: keep position but invisible */
.proofly-box.proofly-anim-fade:not(.proofly--visible) {
	opacity: 0;
	pointer-events: none;
}
.proofly-box.proofly-anim-fade.proofly--visible {
	opacity: 1;
	pointer-events: auto;
}

/* Bounce */
@keyframes proofly-bounce-in {
	0%   { transform: scale(.85) translateY(20px); opacity: 0; }
	60%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
	80%  { transform: scale(.98) translateY(2px); }
	100% { transform: scale(1) translateY(0); }
}

.proofly-box.proofly-anim-bounce {
	bottom: 20px; /* always at final position; animation handles entry */
	opacity: 0;
	pointer-events: none;
}
.proofly-box.proofly-anim-bounce.proofly--visible {
	animation: proofly-bounce-in var(--pr-anim-dur) forwards;
	opacity: 1;
	pointer-events: auto;
}

/* Flip */
@keyframes proofly-flip-in {
	0%   { transform: perspective(400px) rotateX(-90deg); opacity: 0; }
	100% { transform: perspective(400px) rotateX(0deg);   opacity: 1; }
}

.proofly-box.proofly-anim-flip {
	transform-origin: bottom center;
	bottom: 20px;
	opacity: 0;
	pointer-events: none;
}
.proofly-box.proofly-anim-flip.proofly--visible {
	animation: proofly-flip-in var(--pr-anim-dur) forwards;
	opacity: 1;
	pointer-events: auto;
}

/* ── Inner layout ─────────────────────────────────────────────────────────── */
.proofly-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
}

/* ── Thumbnail ────────────────────────────────────────────────────────────── */
.proofly-thumb {
	flex-shrink: 0;
	width:  var(--pr-thumb);
	height: var(--pr-thumb);
	border-radius: 50%;
	overflow: hidden;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Icon shape — controls the thumbnail/icon border-radius */
.proofly-box.proofly-icon-shape-rounded .proofly-thumb      { border-radius: 8px;  }
.proofly-box.proofly-icon-shape-square .proofly-thumb        { border-radius: 0;    }
.proofly-box.proofly-icon-shape-full-rounded .proofly-thumb  { border-radius: 50%;  }

/* Container shape — controls the box border-radius (Classic template only, via proofly-shape-*) */
.proofly-box.proofly-shape-rounded      { border-radius: 14px; }
.proofly-box.proofly-shape-square       { border-radius: 0;    }
.proofly-box.proofly-shape-full-rounded { border-radius: 50px; }

.proofly-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.proofly-thumb-icon {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}

.proofly-thumb-icon svg {
	width: 22px;
	height: 22px;
}

/* Type-specific icon backgrounds */
.proofly-type-icon-woocommerce { background: #7f54b3; color: #fff; }
.proofly-type-icon-activity    { background: #0ea5e9; color: #fff; }
.proofly-type-icon-promo       { background: #f59e0b; color: #fff; }
.proofly-type-icon-custom      { background: #8b5cf6; color: #fff; }
.proofly-type-icon-share,
.proofly-type-icon-share_total { background: #6c47ff; color: #fff; }

/* ── Message ──────────────────────────────────────────────────────────────── */
.proofly-message {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--pr-text);
}

.proofly-line { display: block; }

.proofly-line-1 {
	font-weight: 600;
	font-size: 13px;
	color: var(--pr-text);
	margin-bottom: 2px;
	/* Allow wrapping so long messages are fully readable */
	word-break: break-word;
	overflow-wrap: break-word;
}

.proofly-line-2,
.proofly-line-3,
.proofly-line-4 {
	font-size: 12px;
	color: var(--pr-muted);
}

/* ── Network badge ────────────────────────────────────────────────────────── */
.proofly-network-badge {
	position: absolute;
	bottom: 8px;
	right: 12px;
	font-size: 18px;
	opacity: .08;
	line-height: 1;
	pointer-events: none;
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.proofly-close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 20px;
	height: 20px;
	display: none;          /* Visible on hover via CSS */
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.05);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	color: var(--pr-muted);
	transition: background .12s, color .12s;
	z-index: 2;
}

.proofly-close svg {
	width: 10px;
	height: 10px;
	pointer-events: none;
}

.proofly-box:hover .proofly-close { display: flex; }
.proofly-close:hover { background: rgba(0,0,0,.1); color: var(--pr-text); }

/* ── No-thumb layout: message fills full width ──────────────────────────────── */
.proofly-box.proofly-no-thumb .proofly-inner {
	gap: 0;
}
.proofly-box.proofly-no-thumb .proofly-message {
	padding-left: 0;
}

/* ── Action overlay link ──────────────────────────────────────────────────── */
.proofly-action-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: pointer;
}

/* ── Mobile: hidden ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.proofly-holder.proofly-hidden-mobile .proofly-box { display: none !important; }

	.proofly-box {
		max-width: calc(100vw - 32px);
		min-width: calc(100vw - 32px);
	}

}

/* ── High-DPI / retina ────────────────────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.proofly-box {
		--pr-shadow: 0 4px 28px rgba(0,0,0,.08);
	}
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.proofly-box {
		transition: opacity var(--pr-anim-dur) ease !important;
		bottom: 20px !important;
	}
	.proofly-box.proofly-pos-top-left,
	.proofly-box.proofly-pos-top-right {
		bottom: auto !important;
		top: 16px !important;
	}
	.proofly-box.proofly-anim-bounce.proofly--visible,
	.proofly-box.proofly-anim-flip.proofly--visible {
		animation: none !important;
	}
}

/* ── ESSB network icon colours (used in badge) ─────────────────────────────── */
/* These are inherited from ESSB's own stylesheet; listed here for reference  */

/* ==========================================================================
   Proofly — Notification Credit (Verified by Proofly)
   Now lives inside .proofly-message column, below the text lines.
   ========================================================================== */

.proofly-credit {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 500;
	color: #9ca3af;
	text-decoration: none;
	margin-top: 5px;
	line-height: 1;
	pointer-events: auto;
}

.proofly-credit:hover { color: #2563eb; }

.proofly-credit svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ==========================================================================
   Proofly — Layout Templates
   Five distinct visual styles on .proofly-box via .proofly-tpl-{name}.
   Each template changes typography, spacing, shape, and visual weight.
   The thumb is always on the left; message (lines + credit) on the right.
   ========================================================================== */

/* ── Classic (default) ────────────────────────────────────────────────────── */
/* Base styles already produce the Classic look. No overrides needed. */
.proofly-tpl-classic .proofly-line-1 { font-weight: 600; }

/* ── Bold ─────────────────────────────────────────────────────────────────── */
/* Headline-first style: large bold first line, smaller supporting lines.     */
.proofly-tpl-bold {
	box-shadow: 0 4px 24px rgba(0,0,0,.13);
}
.proofly-tpl-bold .proofly-line-1 {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: -.01em;
	margin-bottom: 4px;
}
.proofly-tpl-bold .proofly-line-2,
.proofly-tpl-bold .proofly-line-3 {
	font-size: 11px;
	opacity: .75;
}
.proofly-tpl-bold .proofly-thumb {
	width: 44px;
	height: 44px;
	border-radius: 6px;
}

/* ── Accent ───────────────────────────────────────────────────────────────── */
/* Coloured left-border accent stripe with the first line in brand colour.    */
.proofly-tpl-accent {
	border-left: 3px solid var(--pr-accent-col, #6c47ff);
	border-radius: 8px;
}
.proofly-tpl-accent .proofly-inner { padding: 10px 14px 10px 12px; }
.proofly-tpl-accent .proofly-thumb {
	width: 38px;
	height: 38px;
	border-radius: 4px;
}
.proofly-tpl-accent .proofly-line-1 {
	color: var(--pr-accent-col, #6c47ff);
	font-weight: 700;
	font-size: 12px;
}
.proofly-tpl-accent .proofly-line-2,
.proofly-tpl-accent .proofly-line-3 { font-size: 11px; }

/* ── Pill ─────────────────────────────────────────────────────────────────── */
/* Fully rounded pill. Compact and modern.                                     */
.proofly-tpl-pill {
	border-radius: 9999px;
}
.proofly-tpl-pill .proofly-inner { padding: 10px 20px 10px 10px; gap: 12px; }
.proofly-tpl-pill .proofly-thumb {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}
.proofly-tpl-pill .proofly-line-1 { font-size: 12px; font-weight: 700; }
.proofly-tpl-pill .proofly-line-2,
.proofly-tpl-pill .proofly-line-3 { font-size: 11px; }
.proofly-tpl-pill .proofly-credit { display: none; } /* hide credit in pill — too cramped */

/* ── Icon ─────────────────────────────────────────────────────────────────── */
/* Large rounded icon thumbnail; generous padding; clear hierarchy.            */
.proofly-tpl-icon .proofly-inner { padding: 14px 16px; gap: 14px; }
.proofly-tpl-icon .proofly-thumb {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.proofly-tpl-icon .proofly-line-1 {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 4px;
}
.proofly-tpl-icon .proofly-line-2 { font-size: 12px; }
.proofly-tpl-icon .proofly-line-3 { font-size: 11px; opacity: .7; }


/* ── ESSB network icon colours (used in badge) ─────────────────────────────── */
/* These are inherited from ESSB's own stylesheet; listed here for reference  */

/* ==========================================================================
   Proofly — Layout Templates
   Five distinct visual layouts applied via .proofly-tpl-{name} on .proofly-box
   ========================================================================== */

/* ── Classic (default) ────────────────────────────────────────────────────── */
/* Standard white card — base styles handle this; no overrides needed */


