#ps-fcta-root { position: relative; }

.ps-fcta {
	position: fixed;
	z-index: 999995;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border: none;
	cursor: pointer;
	background-color: var(--ps-fcta-bg, #C9A227);
	color: var(--ps-fcta-text, #fff);
	border-radius: var(--ps-fcta-radius, 999px);
	transition: transform 0.15s ease;
}
.ps-fcta:hover { transform: translateY(-2px); color: var(--ps-fcta-text, #fff); }
.ps-fcta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(0,0,0,0.35); }
.ps-fcta .dashicons { color: var(--ps-fcta-icon, #fff); }

.ps-fcta-shadow { box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

.ps-fcta-pos-bottom_right { bottom: var(--ps-fcta-offset-bottom, 24px); right: var(--ps-fcta-offset-side, 24px); }
.ps-fcta-pos-bottom_left { bottom: var(--ps-fcta-offset-bottom, 24px); left: var(--ps-fcta-offset-side, 24px); }

/* Hidden until the configured trigger (immediate/delay/scroll) reveals it — avoids layout shift since space isn't reserved in flow (fixed position). */
.ps-fcta-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.ps-fcta-shown { opacity: 1; visibility: visible; pointer-events: auto; }

@keyframes ps-fcta-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ps-fcta-slide-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ps-fcta-pulse-in { 0% { opacity: 0; transform: scale(0.6); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }

.ps-fcta-anim-fade.ps-fcta-shown { animation: ps-fcta-fade 0.35s ease both; }
.ps-fcta-anim-slide_up.ps-fcta-shown { animation: ps-fcta-slide-up 0.4s ease both; }
.ps-fcta-anim-pulse.ps-fcta-shown { animation: ps-fcta-pulse-in 0.45s ease both; }

/* Device rules — pure CSS, no JS flash */
@media (max-width: 767px) {
	.ps-fcta:not(.ps-fcta-allow-mobile) { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.ps-fcta:not(.ps-fcta-allow-tablet) { display: none !important; }
}
@media (min-width: 1025px) {
	.ps-fcta:not(.ps-fcta-allow-desktop) { display: none !important; }
}

/* Popup form dialog */
.ps-fcta-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999996;
}
.ps-fcta-dialog {
	position: fixed;
	z-index: 999997;
	bottom: 24px;
	right: 24px;
	width: 340px;
	max-width: 92vw;
	max-height: 85vh;
	overflow: auto;
	background: #fff;
	color: #222;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.3);
	padding: 24px;
	box-sizing: border-box;
	animation: ps-fcta-fade 0.2s ease both;
}
.ps-fcta-dialog[hidden], .ps-fcta-overlay[hidden] { display: none; }

.ps-fcta-dialog-close {
	position: absolute; top: 10px; right: 12px;
	background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; opacity: 0.6;
}
.ps-fcta-dialog-close:hover { opacity: 1; }
.ps-fcta-dialog-close:focus-visible { outline: 2px solid #2271b1; }

#ps-fcta-dialog-title { margin: 0 0 16px; font-size: 18px; }

.ps-fcta-field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.ps-fcta-field label { font-size: 13px; font-weight: 600; }
.ps-fcta-req { color: #dc2626; }
.ps-fcta-field input, .ps-fcta-field textarea {
	padding: 10px 12px; border: 1px solid rgba(0,0,0,0.2); border-radius: 8px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box;
}
.ps-fcta-field textarea { resize: vertical; }

.ps-fcta-hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

.ps-fcta-submit-btn {
	width: 100%; border: none; padding: 13px 20px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px;
}
.ps-fcta-submit-btn:hover { filter: brightness(0.94); }
.ps-fcta-submit-btn:focus-visible { outline: 3px solid #2271b1; outline-offset: 2px; }

@media (max-width: 480px) {
	.ps-fcta-dialog { right: 4vw; left: 4vw; width: auto; bottom: 12px; }
}
