/**
 * Appushy opt-in prompt — public-facing styles.
 *
 * Enqueued by Apsh_Web_Push_Frontend::maybe_enqueue() alongside
 * apsh-subscriber.js, under the exact same gate (web_push enabled + a real
 * VAPID key) — this file never loads unless that script does too.
 *
 * Lives here, as its own small stylesheet, rather than appended to
 * apsh-admin.css or left as the inline `overlay.style.cssText` the prompt
 * used before this task: apsh-admin.css is wp-admin-only (never enqueued on
 * the public site, and its selectors/variables assume the admin screen's own
 * markup), and every other visual element in this plugin is styled from a
 * CSS file, not built up as a JS string. The custom properties below are a
 * small, self-contained copy of the handful of --apsh-* tokens from
 * apsh-admin.css's :root (primary blue, border grey, base radius) that this
 * widget actually needs — redeclared here, scoped to .apsh-optin, because
 * apsh-admin.css's own :root block is never present on a public page for
 * this file to inherit from.
 */
.apsh-optin {
	--apsh-primary: #2563eb;
	--apsh-primary-hover: #1d4ed8;
	--apsh-muted: #6b7280;
	--apsh-border: #d1d5db;
	--apsh-surface: #fff;
	--apsh-text: #1f2937;
	--apsh-radius: 10px;

	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--apsh-surface);
	color: var(--apsh-text);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);

	/*
	 * Default card shape/position — `--bell` and `--slide_in` below (the two
	 * styles QA actually flagged as visually identical) override these same
	 * properties at equal specificity; source order (below wins) is what
	 * makes that override stick. `--custom` (triggered differently, not
	 * styled differently — no distinct look was requested for it) and
	 * `--ios` (the "Add to Home Screen" guidance panel, unchanged from
	 * before this task other than moving its styles here from an inline
	 * `cssText`) both render as exactly this.
	 */
	right: 16px;
	bottom: 16px;
	max-width: 340px;
	border-radius: var(--apsh-radius);
	padding: 16px;
}

.apsh-optin__title { font-weight: 600; margin-bottom: 4px; }
.apsh-optin__body { margin-bottom: 12px; color: var(--apsh-muted); }
.apsh-optin__link {
	display: block;
	margin-bottom: 12px;
	font-size: 12px;
	color: var(--apsh-muted);
	text-decoration: underline;
}
.apsh-optin__actions { display: flex; gap: 8px; justify-content: flex-end; }
.apsh-optin__btn {
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	font: inherit;
}
.apsh-optin__btn--dismiss {
	border: 1px solid var(--apsh-border);
	background: var(--apsh-surface);
	color: #374151;
}
.apsh-optin__btn--accept {
	border: none;
	background: var(--apsh-primary);
	color: #fff;
}
.apsh-optin__btn--accept:hover { background: var(--apsh-primary-hover); }

.apsh-optin--ios .apsh-optin__btn--dismiss { float: right; }

/*
 * Bell button — a compact circular floating button by default; clicking it
 * expands into the same title/body/actions panel every other style shows
 * outright. buildSoftAsk() (apsh-subscriber.js) always builds the toggle
 * button + panel markup for this style; is-expanded is added by that
 * button's own click handler, not by any gate in run().
 */
.apsh-optin--bell {
	right: 16px;
	bottom: 16px;
	max-width: 320px;
	border-radius: var(--apsh-radius);
	padding: 0;
	background: transparent;
	box-shadow: none;
}
.apsh-optin--bell .apsh-optin__bell-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 999px;
	background: var(--apsh-primary);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.apsh-optin--bell .apsh-optin__bell-toggle:hover { background: var(--apsh-primary-hover); }
.apsh-optin--bell .apsh-optin__panel {
	display: none;
	margin-top: 8px;
	background: var(--apsh-surface);
	border-radius: var(--apsh-radius);
	padding: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.apsh-optin--bell.is-expanded .apsh-optin__bell-toggle { display: none; }
.apsh-optin--bell.is-expanded .apsh-optin__panel { display: block; }

/*
 * Slide-in bar — a bar that spans (almost) the full viewport width, anchored
 * to the bottom. QA's description of this style's look verbatim; the old
 * `overlay.style.cssText` this replaces was a 340px bottom-right card
 * identical to the bell style's own card, which is exactly the bug this
 * task fixes.
 */
.apsh-optin--slide_in {
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: none;
	border-radius: var(--apsh-radius);
	padding: 16px;
	animation: apsh-optin-slide-in 0.2s ease-out;
}
@keyframes apsh-optin-slide-in {
	from { transform: translateY(100%); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
