.bcnp-overlay[hidden] { display: none !important; }

.bcnp-lock { overflow: hidden; }

.bcnp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	padding: 16px;
	background: rgba(0, 0, 0, calc(var(--bcnp-overlay, 0.6)));
	opacity: 0;
	transition: opacity .25s ease;
	box-sizing: border-box;
}
.bcnp-overlay.bcnp-open { opacity: 1; }

.bcnp-overlay *,
.bcnp-overlay *::before,
.bcnp-overlay *::after { box-sizing: border-box; }

/* Posiciones */
.bcnp-pos-center { align-items: center; justify-content: center; }
.bcnp-pos-bottom-right,
.bcnp-pos-bottom-left {
	inset: auto 0 0 0;
	background: transparent;
	pointer-events: none;
}
.bcnp-pos-bottom-right { justify-content: flex-end; align-items: flex-end; }
.bcnp-pos-bottom-left { justify-content: flex-start; align-items: flex-end; }
.bcnp-pos-bottom-right .bcnp-modal,
.bcnp-pos-bottom-left .bcnp-modal { pointer-events: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }

.bcnp-modal {
	position: relative;
	width: 100%;
	max-width: var(--bcnp-width, 480px);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 32px 28px 28px;
	border-radius: 12px;
	background: var(--bcnp-bg, #fff);
	color: var(--bcnp-text, #1d2327);
	text-align: center;
	line-height: 1.5;
	transform: translateY(12px) scale(.98);
	transition: transform .25s ease;
}
.bcnp-open .bcnp-modal { transform: none; }

.bcnp-modal :where(h1, h2, h3, h4, p) { color: inherit; margin-top: 0; }
.bcnp-content > :last-child { margin-bottom: 0; }
.bcnp-content img { max-width: 100%; height: auto; }

.bcnp-close {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	opacity: .6;
}
.bcnp-close:hover,
.bcnp-close:focus { opacity: 1; }

/* Cupón */
.bcnp-coupon {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 18px 0 4px;
}
.bcnp-coupon-code {
	padding: 10px 16px;
	border: 2px dashed currentColor;
	border-radius: 8px;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 1px;
}
.bcnp-copy {
	padding: 10px 14px;
	border: 1px solid currentColor;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-size: 14px;
	cursor: pointer;
}

/* Botones */
.bcnp-btn {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 24px;
	border: 0;
	border-radius: 8px;
	background: var(--bcnp-btn-bg, #2271b1);
	color: var(--bcnp-btn-text, #fff);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.bcnp-btn:hover,
.bcnp-btn:focus { filter: brightness(1.08); color: var(--bcnp-btn-text, #fff); }
.bcnp-btn[disabled] { opacity: .6; cursor: default; }

/* Formulario */
.bcnp-form { margin-top: 16px; }
.bcnp-fields { display: flex; flex-direction: column; gap: 10px; }
.bcnp-fields .bcnp-btn { margin-top: 0; width: 100%; }
.bcnp-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, .25);
	border-radius: 8px;
	background: #fff;
	color: #1d2327;
	font-size: 16px;
}
.bcnp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.bcnp-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	text-align: left;
	font-size: 13px;
}
.bcnp-consent input { margin-top: 3px; }
.bcnp-consent a { color: inherit; text-decoration: underline; }
.bcnp-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; }
.bcnp-msg.bcnp-ok { font-weight: 600; }
.bcnp-msg.bcnp-err { color: #b32d2e; }

@media (max-width: 480px) {
	.bcnp-modal { padding: 28px 18px 22px; }
	.bcnp-pos-bottom-right,
	.bcnp-pos-bottom-left { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.bcnp-overlay,
	.bcnp-modal { transition: none; }
}
