/* =============================================================================
   EZDownload Pro — Widget CSS
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.ezdl-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

/* ── Info del archivo ────────────────────────────────────────────────────── */
.ezdl-file-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	line-height: 1.4;
}

.ezdl-filename {
	font-weight: 600;
	font-size: 0.95em;
	color: #1d2327;
}

.ezdl-file-meta {
	font-size: 0.8em;
	color: #646970;
	font-variant-numeric: tabular-nums;
}

/* ── Botón ───────────────────────────────────────────────────────────────── */
.ezdl-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	background-color: #ff8394;
	color: #ffffff;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color .22s ease,
		color .22s ease,
		transform .18s ease,
		box-shadow .22s ease,
		border-color .22s ease;
	will-change: transform;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ezdl-btn:hover {
	background-color: #c94b40;
	color: #ffffff;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(201, 75, 64, .35);
}

.ezdl-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

.ezdl-btn:focus-visible {
	outline: 3px solid #c94b40;
	outline-offset: 3px;
}

/* ── Icono dentro del botón ──────────────────────────────────────────────── */
.ezdl-btn__icon {
	font-size: 1em;
	flex-shrink: 0;
	line-height: 1;
	transition: transform .2s ease;
}

.ezdl-btn:hover .ezdl-btn__icon {
	transform: translateY(1px);
}

.ezdl-btn__text {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ezdl-counter {
	font-size: 0.85em;
	opacity: 0.85;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

/* ── Placeholder en el editor ────────────────────────────────────────────── */
.ezdl-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 32px 24px;
	border: 2px dashed #c3c4c7;
	border-radius: 8px;
	color: #646970;
	text-align: center;
	background: #f6f7f7;
}

.ezdl-placeholder .eicon-download-button {
	font-size: 48px;
	color: #0073aa;
	opacity: .6;
}

.ezdl-placeholder p {
	margin: 0;
	font-size: 13px;
	font-style: italic;
}

/* ── Notice de preview ────────────────────────────────────────────────────── */
.ezdl-editor-notice {
	font-size: 11px;
	color: #b32d2e;
	margin: 4px 0 0;
	font-style: italic;
	line-height: 1.3;
}

/* ── Variante: stretch (ancho completo) ──────────────────────────────────── */
.ezdl-wrap[style*="stretch"] .ezdl-btn,
.ezdl-wrap.ezdl-stretch .ezdl-btn {
	width: 100%;
	justify-content: center;
}

/* ── Animaciones Elementor ───────────────────────────────────────────────── */
.ezdl-btn.elementor-animation-grow:hover {
	transform: scale(1.06);
}

.ezdl-btn.elementor-animation-shrink:hover {
	transform: scale(.94);
}

.ezdl-btn.elementor-animation-pulse:hover {
	animation: ezdl-pulse .4s ease;
}

.ezdl-btn.elementor-animation-wobble-horizontal:hover {
	animation: ezdl-wobble .5s ease;
}

@keyframes ezdl-pulse {
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.06);
	}

	100% {
		transform: scale(1);
	}
}

@keyframes ezdl-wobble {

	0%,
	100% {
		transform: translateX(0);
	}

	25% {
		transform: translateX(-5px);
	}

	75% {
		transform: translateX(5px);
	}
}

/* ── Estado loading ─────────────────────────────────────────────────────── */
.ezdl-btn--loading {
	opacity: .75;
	pointer-events: none;
	cursor: wait;
}

.ezdl-btn--loading::after {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ezdl-spin .7s linear infinite;
	margin-left: 8px;
}

@keyframes ezdl-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.ezdl-btn {
		padding: 12px 20px;
		font-size: 0.9rem;
	}
}

/* ── Modal de autenticación requerida ────────────────────────────────────── */
.ezdl-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 20, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	padding: 16px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ezdl-modal-overlay[hidden] {
	display: none;
}

.ezdl-modal-overlay.ezdl-modal--visible {
	opacity: 1;
}

.ezdl-modal-overlay.ezdl-modal--visible .ezdl-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* ── Cuadro del modal ────────────────────────────────────────────────────── */
.ezdl-modal {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	padding: 40px 36px 32px;
	max-width: 400px;
	width: 100%;
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.18),
		0 4px 16px rgba(0, 0, 0, 0.10);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	transform: translateY(24px) scale(0.96);
	opacity: 0;
	transition:
		transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.22s ease;
}

/* ── Botón de cierre (×) ─────────────────────────────────────────────────── */
.ezdl-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #9ca3af;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
}

.ezdl-modal__close:hover {
	color: #374151;
	background: #f3f4f6;
}

.ezdl-modal__close:focus-visible {
	outline: 2px solid #c94b40;
	outline-offset: 2px;
}

/* ── Icono de candado ────────────────────────────────────────────────────── */
.ezdl-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: linear-gradient(135deg, #fff0f0 0%, #ffe4e4 100%);
	color: #c94b40;
	margin-bottom: 4px;
	flex-shrink: 0;
}

/* ── Textos ──────────────────────────────────────────────────────────────── */
.ezdl-modal__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
	margin: 0;
	line-height: 1.3;
}

.ezdl-modal__desc {
	font-size: 0.92rem;
	color: #6b7280;
	margin: 0;
	line-height: 1.5;
	max-width: 300px;
}

/* ── Botón de login (primario) ───────────────────────────────────────────── */
.ezdl-modal__login-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
	padding: 12px 32px;
	width: 100%;
	background: linear-gradient(135deg, #ff8394 0%, #c94b40 100%);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	transition:
		filter 0.18s ease,
		transform 0.15s ease,
		box-shadow 0.18s ease;
	box-shadow: 0 4px 14px rgba(201, 75, 64, 0.35);
}

.ezdl-modal__login-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(201, 75, 64, 0.45);
	color: #ffffff;
	text-decoration: none;
}

.ezdl-modal__login-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

/* ── Botón cancelar (secundario) ─────────────────────────────────────────── */
.ezdl-modal__cancel {
	background: none;
	border: none;
	color: #9ca3af;
	font-size: 0.85rem;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	margin-top: -4px;
	transition: color 0.15s ease;
}

.ezdl-modal__cancel:hover {
	color: #374151;
}

/* ── Responsive del modal ────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.ezdl-modal {
		padding: 32px 24px 24px;
	}

	.ezdl-modal__icon {
		width: 60px;
		height: 60px;
	}

	.ezdl-modal__title {
		font-size: 1.1rem;
	}
}

/* ── Reducción de movimiento ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.ezdl-modal-overlay,
	.ezdl-modal {
		transition: none;
	}
}