/**
 * Free Gift floating widget - scroll-to-form CTA above CookieYes consent.
 *
 * Two breakpoints: full pill >=768px, compact pill <768px.
 * Bottom offset clears CookieYes consent button at both sizes.
 * z-index 9998: above page content, below cookie banner.
 */

.polca-free-gift-widget {
	position: fixed;
	bottom: 88px;
	left: 24px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1a1a1a;
	background: #FDAB00;
	border: none;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(253, 171, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	animation: polca-fg-bounce 4s ease-in-out infinite;
	transition: transform 200ms ease, box-shadow 200ms ease;
	will-change: transform;
}

.polca-free-gift-widget:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(253, 171, 0, 0.45), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.polca-free-gift-widget:focus-visible {
	outline: none;
	transform: scale(1.05);
	box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.6), 0 4px 12px rgba(253, 171, 0, 0.45);
}

.polca-free-gift-widget:active {
	transform: scale(0.98);
}

.polca-free-gift-widget__icon {
	font-size: 16px;
	line-height: 1;
}

@keyframes polca-fg-bounce {
	0%, 70%, 100% { transform: translateY(0); }
	75% { transform: translateY(-4px); }
	80% { transform: translateY(0); }
	85% { transform: translateY(-2px); }
	90% { transform: translateY(0); }
}

/* Highlight pulse on target form when widget clicked */
.polca-newsletter-form--flash {
	animation: polca-fg-flash 800ms ease-out;
}

@keyframes polca-fg-flash {
	0%   { box-shadow: 0 0 0 0 rgba(253, 171, 0, 0); }
	50%  { box-shadow: 0 0 0 8px rgba(253, 171, 0, 0.45); }
	100% { box-shadow: 0 0 0 0 rgba(253, 171, 0, 0); }
}

/* Mobile/tablet <768px: compact pill */
@media (max-width: 767px) {
	.polca-free-gift-widget {
		bottom: 76px;
		left: 12px;
		padding: 6px 14px;
		font-size: 12px;
		gap: 4px;
	}
	/* Invisible padding extends tap area to >=44px without visual change */
	.polca-free-gift-widget::before {
		content: "";
		position: absolute;
		inset: -10px;
	}
	.polca-free-gift-widget__icon {
		font-size: 14px;
	}
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.polca-free-gift-widget {
		animation: none;
		transition: none;
	}
	.polca-free-gift-widget:hover,
	.polca-free-gift-widget:focus-visible {
		transform: none;
	}
	.polca-newsletter-form--flash {
		animation: none;
	}
}

/* =========================================================================
   Signup modal popup (opened by clicking the floating pill)
   ========================================================================= */
.polca-club-modal {
	position: fixed; inset: 0; z-index: 1000000;
	display: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.polca-club-modal.polca-club-modal--open { display: block; }
.polca-club-modal *, .polca-club-modal *::before, .polca-club-modal *::after { box-sizing: border-box; }

.polca-club-modal__backdrop {
	position: absolute; inset: 0;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: polca-club-fade 0.2s ease;
}

.polca-club-modal__card {
	position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000001;
	width: 92vw; max-width: 440px;
	max-height: 92vh; overflow-y: auto;
	padding: 32px 28px 24px;
	background: #ffffff; color: #1a1a1a;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	text-align: center;
	animation: polca-club-pop 0.24s cubic-bezier(.2, .9, .3, 1.2);
}

.polca-club-modal__close {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: none !important;
	border-radius: 50% !important;
	color: #475569 !important;
	cursor: pointer !important;
	font: inherit !important;
	line-height: 1 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease !important;
}
.polca-club-modal__close-icon {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	stroke: currentColor !important;
	pointer-events: none;
}
.polca-club-modal__close:hover {
	background: #f1f5f9 !important;
	background-color: #f1f5f9 !important;
	color: #0f172a !important;
}
.polca-club-modal__close:active { transform: scale(0.94); }
.polca-club-modal__close:focus-visible {
	outline: 2px solid #FDAB00 !important;
	outline-offset: 2px !important;
}

.polca-club-modal__icon { font-size: 42px; line-height: 1; margin-bottom: 4px; }
.polca-club-modal__title {
	margin: 0 0 6px;
	font-size: 22px; font-weight: 800; line-height: 1.2;
	color: #1a1a1a;
}
.polca-club-modal__blurb {
	margin: 0 0 18px;
	font-size: 14px; line-height: 1.55; color: #4a5560;
}

.polca-club-modal__form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.polca-club-modal__field { display: flex; flex-direction: column; gap: 4px; }
.polca-club-modal__label { font-size: 13px; font-weight: 500; color: #475569; }
.polca-club-modal__optional { font-weight: 400; color: #94a3b8; }
.polca-club-modal__required { color: #DC2626; font-weight: 700; }

.polca-club-modal__input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.4;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 8px;
	background: #ffffff;
	color: #1a1a1a;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.polca-club-modal__input:focus {
	outline: none;
	border-color: #FDAB00;
	box-shadow: 0 0 0 3px rgba(253, 171, 0, 0.22);
}
.polca-club-modal__input[aria-invalid="true"] {
	border-color: #DC2626;
	background: #fef2f2;
}

.polca-club-modal__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important; height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
}

.polca-club-modal__consent {
	display: flex; align-items: flex-start; gap: 8px;
	font-size: 12.5px; line-height: 1.5; color: #4a5560;
	margin-top: 2px; cursor: pointer;
}
.polca-club-modal__consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; cursor: pointer; }

.polca-club-modal__submit {
	margin-top: 6px;
	padding: 13px 22px;
	font-size: 15px; font-weight: 700;
	line-height: 1;
	color: #2c3e50;
	background: #FDAB00;
	border: none; border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(253, 171, 0, 0.35);
	transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
	letter-spacing: 0.01em;
}
.polca-club-modal__submit:hover:not(:disabled) {
	background: #E09700;
	box-shadow: 0 6px 16px rgba(253, 171, 0, 0.45);
}
.polca-club-modal__submit:active:not(:disabled) { transform: translateY(1px); }
.polca-club-modal__submit:disabled { opacity: 0.65; cursor: not-allowed; }

.polca-club-modal__message {
	min-height: 18px; margin-top: 6px;
	font-size: 13.5px; line-height: 1.45;
}
.polca-club-modal__message--error { color: #B91C1C; font-weight: 500; }
.polca-club-modal__message--ok    { color: #15803D; font-weight: 500; }

.polca-club-modal__note {
	margin: 14px 0 0;
	padding: 10px 12px;
	background: #fff6e3;
	border: 1px solid #f3d79a;
	border-left: 4px solid #FDAB00;
	border-radius: 8px;
	font-size: 12.5px; line-height: 1.5; color: #5a4300;
	text-align: left;
}

.polca-club-modal__success {
	padding: 20px 8px 6px;
	text-align: center;
}
.polca-club-modal__success-icon { font-size: 40px; line-height: 1; color: #15803D; }
.polca-club-modal__success-title {
	margin: 6px 0 8px;
	font-size: 19px; font-weight: 800; color: #15803D;
}
.polca-club-modal__success p {
	margin: 0 0 8px;
	font-size: 14px; line-height: 1.55; color: #1a1a1a;
}
.polca-club-modal__hint { font-size: 12.5px; color: #64748b; font-style: italic; }

@keyframes polca-club-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes polca-club-pop {
	from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Mobile sizing */
@media (max-width: 480px) {
	.polca-club-modal__card { padding: 26px 20px 18px; }
	.polca-club-modal__title { font-size: 20px; }
	.polca-club-modal__icon { font-size: 36px; }
	.polca-club-modal__input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.polca-club-modal__backdrop,
	.polca-club-modal__card { animation: none; }
}
