/* Easy Popup Ufo - UfoWeb.co - v1.7.1 */

.ep-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ep-overlay.ep-open {
	display: flex;
	animation: ep-fade 0.25s ease;
}

.ep-no-scroll {
	overflow: hidden;
}

@keyframes ep-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ===== Posiciones ===== */

.ep-pos-bottom-right,
.ep-pos-bottom-left,
.ep-pos-top-bar,
.ep-pos-bottom-bar {
	background: transparent !important;
	pointer-events: none;
}

.ep-overlay:not(.ep-pos-center) .ep-box {
	pointer-events: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ep-pos-bottom-right {
	justify-content: flex-end;
	align-items: flex-end;
}

.ep-pos-bottom-left {
	justify-content: flex-start;
	align-items: flex-end;
}

.ep-pos-bottom-right .ep-box,
.ep-pos-bottom-left .ep-box {
	animation: ep-slide-up 0.35s ease;
}

@keyframes ep-slide-up {
	from { transform: translateY(30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.ep-pos-top-bar {
	align-items: flex-start;
	padding: 0;
}

.ep-pos-bottom-bar {
	align-items: flex-end;
	padding: 0;
}

.ep-pos-top-bar .ep-box,
.ep-pos-bottom-bar .ep-box {
	max-width: 100% !important;
	width: 100%;
	border-radius: 0 !important;
	max-height: 60vh;
}

.ep-pos-top-bar .ep-box {
	animation: ep-slide-down 0.35s ease;
}

@keyframes ep-slide-down {
	from { transform: translateY(-30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.ep-box {
	position: relative;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	animation: ep-pop 0.3s ease;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@keyframes ep-pop {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* ===== Animaciones de entrada (la clase ep-anim-* manda sobre la posición) ===== */

.ep-overlay .ep-box.ep-anim-zoom { animation: ep-pop 0.3s ease; }
.ep-overlay .ep-box.ep-anim-fade { animation: ep-fade 0.35s ease; }
.ep-overlay .ep-box.ep-anim-slide-up { animation: ep-slide-up 0.35s ease; }
.ep-overlay .ep-box.ep-anim-slide-down { animation: ep-slide-down 0.35s ease; }
.ep-overlay .ep-box.ep-anim-bounce { animation: ep-bounce 0.55s cubic-bezier(0.28, 0.84, 0.42, 1); }

@keyframes ep-bounce {
	0% { transform: scale(0.7); opacity: 0; }
	60% { transform: scale(1.05); opacity: 1; }
	80% { transform: scale(0.97); }
	100% { transform: scale(1); }
}

/* ===== Efecto vidrio esmerilado (glassmorphism) ===== */

.ep-box.ep-glass {
	backdrop-filter: blur(14px) saturate(150%);
	-webkit-backdrop-filter: blur(14px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, 0.28);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ep-glass .ep-form input,
.ep-glass .ep-form textarea {
	background: rgba(255, 255, 255, 0.75);
	border-color: rgba(255, 255, 255, 0.5);
}

/* ===== Iframe aislado ===== */

.ep-iframe {
	display: block;
	width: 100%;
	border: 0;
	min-height: 120px;
	height: 320px;
	transition: height 0.2s ease;
}

/* ===== Countdown ===== */

.ep-countdown {
	text-align: center;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.5px;
	padding: 9px 14px;
	border-radius: 8px;
	margin-bottom: 14px;
	font-variant-numeric: tabular-nums;
}

.ep-box-image .ep-countdown {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	margin-bottom: 0;
	z-index: 2;
}

.ep-countdown[hidden] {
	display: none !important;
}

/* ===== Formulario en 2 pasos ===== */

.ep-step[hidden] {
	display: none !important;
}

.ep-step-2 {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ep-step-label {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 600;
}

.ep-step-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ep-step-btn {
	padding: 12px 16px;
	border: 2px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	background: transparent;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ep-step-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ===== Cupón ===== */

.ep-coupon {
	margin-top: 10px;
	padding: 12px;
	border: 2px dashed currentColor;
	border-radius: 8px;
	text-align: center;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 2px;
	user-select: all;
}

.ep-coupon-hint {
	display: block;
	text-align: center;
	margin-top: 5px;
	opacity: 0.75;
	font-weight: 400;
}

.ep-box-image {
	background: transparent;
	box-shadow: none;
	width: auto;
}

.ep-box-image img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ep-box-form {
	padding: 28px;
}

.ep-box-shortcode {
	padding: 28px;
}

.ep-shortcode-wrap {
	max-width: 100%;
}

.ep-shortcode-wrap .et_pb_contact_form_container,
.ep-shortcode-wrap .wpcf7,
.ep-shortcode-wrap .wpforms-container {
	margin: 0;
}

.ep-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.ep-close:hover {
	background: rgba(0, 0, 0, 0.85);
}

.ep-title {
	margin: 0 0 8px;
	font-size: 24px;
	line-height: 1.2;
	color: inherit;
}

.ep-text {
	margin: 0 0 16px;
	font-size: 15px;
	opacity: 0.85;
}

.ep-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ep-form input,
.ep-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	color: #222;
	box-sizing: border-box;
}

.ep-form input:focus,
.ep-form textarea:focus {
	outline: 2px solid rgba(0, 0, 0, 0.25);
	outline-offset: 1px;
}

.ep-hp {
	position: absolute !important;
	left: -9999px !important;
	opacity: 0;
	height: 0;
	pointer-events: none;
}

.ep-submit {
	border: none;
	padding: 13px 20px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ep-submit:hover {
	opacity: 0.88;
}

.ep-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.ep-feedback {
	font-size: 14px;
	min-height: 0;
}

.ep-feedback.ep-ok {
	color: #1a8917;
	font-weight: 600;
}

.ep-feedback.ep-error {
	color: #cc2222;
	font-weight: 600;
}

@media (max-width: 600px) {
	.ep-box-form {
		padding: 20px;
	}

	.ep-title {
		font-size: 20px;
	}
}
