/* ============================================
   Bonus Gift Page — paleta home Extranjería
   ============================================ */

/* Respeta el atributo HTML `hidden` aun cuando otras reglas usen display:flex/inline-flex/etc. */
.bew-bonus-gift [hidden],
.bew-bonus-gift-viewer[hidden],
.bew-bonus-gift-viewer [hidden] {
	display: none !important;
}

.bew-bonus-gift {
	max-width: 1080px;
	margin: 30px auto 64px;
	padding: 0 20px;
	font-family: inherit;
}

.bew-bonus-gift-inner {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 48px;
	align-items: start;
	padding: 40px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(47, 72, 88, 0.10);
}

.bew-bonus-gift-cover {
	position: sticky;
	top: 90px;
}

.bew-bonus-gift-cover-img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(47, 72, 88, 0.18);
	display: block;
}

.bew-bonus-gift-cover-ribbon {
	position: absolute;
	top: 14px;
	right: -10px;
	padding: 6px 18px;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	border-radius: 4px;
	box-shadow: 0 6px 14px rgba(201, 104, 13, 0.36);
	transform: rotate(8deg);
	white-space: nowrap;
}

.bew-bonus-gift-badge {
	display: inline-block;
	padding: 5px 12px;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	border-radius: 100px;
	margin-bottom: 16px;
}

.bew-bonus-gift-title {
	font-size: clamp(26px, 3.4vw, 36px);
	font-weight: 800;
	color: #14283f;
	margin: 0 0 12px;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.bew-bonus-gift-subtitle {
	font-size: 16px;
	color: #4a5563;
	line-height: 1.55;
	margin: 0 0 28px;
}

.bew-bonus-gift-steps {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: grid;
	gap: 14px;
}

.bew-bonus-gift-step {
	display: flex;
	gap: 14px;
	padding: 14px 16px;
	background: #f9f8f5;
	border: 1px solid rgba(47, 72, 88, 0.08);
	border-radius: 12px;
	transition: background .2s ease, border-color .2s ease, opacity .2s ease;
	opacity: 0.6;
}

.bew-bonus-gift-step--active {
	opacity: 1;
	background: #fff7ee;
	border-color: #f3d4a8;
}

.bew-bonus-gift-step--done {
	opacity: 1;
	background: #eef9f1;
	border-color: #c5e2cd;
}

.bew-bonus-gift-step-num {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(47, 72, 88, 0.12);
	color: #14283f;
	font-weight: 800;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bew-bonus-gift-step--active .bew-bonus-gift-step-num {
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
}

.bew-bonus-gift-step--done .bew-bonus-gift-step-num {
	background: #1f7a4d;
	color: #fff;
}

.bew-bonus-gift-step--done .bew-bonus-gift-step-num::before {
	content: "✓";
	font-size: 16px;
}

.bew-bonus-gift-step--done .bew-bonus-gift-step-num {
	font-size: 0;
}

.bew-bonus-gift-step-text strong {
	display: block;
	font-size: 15px;
	color: #14283f;
	margin-bottom: 2px;
}

.bew-bonus-gift-step-text span {
	font-size: 13px;
	color: #6a7785;
	line-height: 1.5;
}

.bew-bonus-gift-actions {
	display: grid;
	gap: 16px;
	margin: 0 0 24px;
}

.bew-bonus-gift-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px 24px;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
	font-family: inherit;
}

.bew-bonus-gift-btn--amazon {
	background: linear-gradient(135deg, #FFA200 0%, #f28a2b 100%);
	box-shadow: 0 6px 18px rgba(255, 140, 0, 0.30);
}

.bew-bonus-gift-btn--amazon:hover:not(:disabled):not(.is-completed) {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(255, 140, 0, 0.45);
	background: linear-gradient(135deg, #f28a2b 0%, #E07000 100%);
}

.bew-bonus-gift-btn--amazon.is-completed {
	background: #1f7a4d;
	cursor: default;
	box-shadow: 0 4px 12px rgba(31, 122, 77, 0.30);
}

.bew-bonus-gift-btn--claim {
	background: rgba(47, 72, 88, 0.18);
	color: rgba(47, 72, 88, 0.55);
	cursor: not-allowed;
	box-shadow: none;
}

.bew-bonus-gift-btn--claim.is-ready {
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(201, 104, 13, 0.34);
}

.bew-bonus-gift-btn--claim.is-ready:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(201, 104, 13, 0.46);
	background: linear-gradient(135deg, #dd7419 0%, #c05f0e 100%);
}

.bew-bonus-gift-timer {
	padding: 18px 22px;
	background: #fff7ee;
	border: 1px solid #f3d4a8;
	border-radius: 12px;
	text-align: center;
}

.bew-bonus-gift-timer-label {
	font-size: 13px;
	color: #6a4516;
	font-weight: 600;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.bew-bonus-gift-timer-display {
	font-size: 42px;
	font-weight: 800;
	color: #dd7419;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
	line-height: 1;
	margin-bottom: 12px;
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.bew-bonus-gift-timer-bar {
	width: 100%;
	height: 6px;
	background: rgba(201, 104, 13, 0.18);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 8px;
}

.bew-bonus-gift-timer-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #f28a2b, #dd7419);
	border-radius: 3px;
	transition: width .35s ease;
}

.bew-bonus-gift-timer-help {
	font-size: 12px;
	color: #6a4516;
	margin: 0 0 12px;
}

.bew-bonus-gift-skip-btn {
	margin-top: 4px;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	color: #dd7419;
	background: #ffffff;
	border: 2px solid #dd7419;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .12s ease;
	letter-spacing: 0.02em;
	animation: bewGiftSkipFadeIn .35s ease;
}

.bew-bonus-gift-skip-btn:hover {
	background: #dd7419;
	color: #fff;
	transform: translateY(-1px);
}

@keyframes bewGiftSkipFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.bew-bonus-gift-note {
	margin: 0;
	padding: 14px 16px;
	background: #f4f4f0;
	border-radius: 10px;
	font-size: 13px;
	color: #5a6975;
	line-height: 1.55;
	text-align: center;
}

/* PDF viewer modal */
.bew-bonus-gift-viewer[hidden] {
	display: none !important;
}

.bew-bonus-gift-viewer {
	position: fixed;
	inset: 0;
	z-index: 2147483647; /* max int32 — escapa cualquier menú/sticky bar del tema */
	display: flex;
	align-items: stretch;
	justify-content: stretch;
}

.bew-bonus-gift-viewer-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 17, 21, 0.78);
	backdrop-filter: blur(2px);
	animation: bewGiftFadeIn .2s ease;
}

.bew-bonus-gift-viewer-modal {
	position: relative;
	margin: auto;
	width: min(96vw, 1100px);
	height: min(94vh, 900px);
	background: #1a1d24;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
	animation: bewGiftZoomIn .25s ease;
}

@keyframes bewGiftFadeIn {
	from { opacity: 0; } to { opacity: 1; }
}
@keyframes bewGiftZoomIn {
	from { opacity: 0; transform: scale(.97); }
	to   { opacity: 1; transform: scale(1); }
}

.bew-bonus-gift-viewer-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 16px;
	background: linear-gradient(180deg, #2a2e38 0%, #22252e 100%);
	border-bottom: 1px solid rgba(255,255,255,0.06);
}

.bew-bonus-gift-viewer-title {
	flex: 1 1 auto;
	min-width: 0;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bew-bonus-gift-viewer-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bew-bonus-gift-viewer-download {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.02em;
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(201, 104, 13, 0.32);
	transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}

.bew-bonus-gift-viewer-download:hover {
	transform: translateY(-1px);
	background: linear-gradient(135deg, #dd7419 0%, #c05f0e 100%);
	box-shadow: 0 5px 14px rgba(201, 104, 13, 0.45);
	color: #fff !important;
}

.bew-bonus-gift-viewer-close {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	max-width: 36px !important;
	max-height: 36px !important;
	flex: 0 0 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	box-sizing: border-box !important;
	aspect-ratio: 1 / 1;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	text-shadow: none;
	box-shadow: none;
}

.bew-bonus-gift-viewer-close:hover {
	background: rgba(255,255,255,0.22);
}

.bew-bonus-gift-viewer-body {
	flex: 1 1 auto;
	min-height: 0;
	background: linear-gradient(180deg, #1a1d24 0%, #0f1115 100%);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 18px;
}

/* ── Flipbook stage ── */
.bew-bonus-gift-flipbook {
	width: 100%;
	height: 100%;
	max-width: 1100px;
	max-height: 100%;
	position: relative;
}

.bew-flipbook-page {
	background: #fff;
	overflow: hidden;
}

.bew-flipbook-page canvas,
.bew-flipbook-page img {
	display: block;
	width: 100%;
	height: 100%;
	user-select: none;
	-webkit-user-drag: none;
}

/* Single-page mode: muestra la imagen centrada sin StPageFlip */
.bew-bonus-gift-flipbook--single {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
}
.bew-bonus-gift-flipbook--single .bew-flipbook-page {
	max-width: min(95%, 800px);
	max-height: 95%;
	height: auto !important;
	width: auto !important;
	box-shadow: 0 12px 40px rgba(0,0,0,0.40);
	border-radius: 4px;
}
.bew-bonus-gift-flipbook--single .bew-flipbook-page canvas,
.bew-bonus-gift-flipbook--single .bew-flipbook-page img {
	width: auto !important;
	height: auto !important;
	max-width: 100%;
	max-height: 80vh;
}

/* ── Loading / error status ── */
.bew-bonus-gift-flipbook-status {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(15, 17, 21, 0.92);
	color: #d8dee6;
	font-size: 14px;
	font-weight: 500;
	z-index: 10;
	padding: 24px;
	text-align: center;
}

.bew-bonus-gift-flipbook-spinner {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid rgba(255,255,255,0.18);
	border-top-color: #f28a2b;
	animation: bewGiftSpin 1s linear infinite;
}

@keyframes bewGiftSpin {
	to { transform: rotate(360deg); }
}

/* ── Nav buttons in header ── */
.bew-bonus-gift-viewer-nav {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255,255,255,0.10);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .15s ease;
	flex: 0 0 32px;
}

.bew-bonus-gift-viewer-nav:hover {
	background: rgba(255,255,255,0.22);
}

.bew-bonus-gift-viewer-pages {
	font-size: 12px;
	font-weight: 700;
	color: #d8dee6;
	font-variant-numeric: tabular-nums;
	min-width: 56px;
	text-align: center;
	padding: 0 4px;
}

@media (max-width: 600px) {
	.bew-bonus-gift-viewer-modal {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}
	.bew-bonus-gift-viewer-download span {
		display: none;
	}
}

@media (max-width: 760px) {
	.bew-bonus-gift-inner {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 24px;
	}
	.bew-bonus-gift-cover {
		position: static;
		max-width: 220px;
		margin: 0 auto;
	}
	.bew-bonus-gift-title {
		font-size: 24px;
	}
	.bew-bonus-gift-timer-display {
		font-size: 36px;
	}
}

/* ============================================================
 *  Gift delivery area (audio / video / mixed gift box)
 * ============================================================ */
.bew-bonus-gift-delivery {
	margin: 32px 0 0;
	padding: 40px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(47, 72, 88, 0.10);
	animation: bew-gift-reveal .35s ease both;
}

@media (max-width: 600px) {
	.bew-bonus-gift-delivery { padding: 24px 18px; }
}
@keyframes bew-gift-reveal {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}
.bew-bonus-gift-delivery-head {
	margin: 0 0 26px;
	text-align: center;
}
.bew-bonus-gift-delivery-title {
	margin: 0;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: #14283f;
}
.bew-bonus-gift-delivery-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 14px auto 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
}
.bew-bonus-gift-delivery-intro {
	margin: 14px auto 0;
	max-width: 640px;
	font-size: 17px;
	line-height: 1.55;
	color: #5a6975;
}

/* ── Audio player ── */
.bew-gift-audio {
	display: flex;
	gap: 18px;
	align-items: center;
	background: #ffffff;
	border: 1px solid #f0e2cc;
	border-radius: 14px;
	padding: 16px;
}
.bew-gift-audio-cover {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	border-radius: 10px;
	object-fit: cover;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	box-shadow: 0 4px 14px rgba(201,104,13,.25);
}
.bew-gift-audio-main {
	flex: 1;
	min-width: 0;
}
.bew-gift-audio-track-title {
	font-size: 16px;
	font-weight: 700;
	color: #14283f;
	margin: 0 0 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bew-gift-audio-track-desc {
	font-size: 13px;
	color: #6a7785;
	margin: 0 0 10px;
}
.bew-gift-audio audio {
	width: 100%;
	display: block;
}
.bew-gift-audio-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
	flex-wrap: wrap;
}
.bew-gift-speed,
.bew-gift-audio-dl {
	font-size: 12px;
	font-weight: 700;
	border-radius: 8px;
	border: 1px solid #e2c79d;
	background: #fff7ee;
	color: #dd7419;
	padding: 6px 10px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.bew-gift-audio-dl:hover,
.bew-gift-speed:hover { background: #ffe9cf; }

/* ── Playlist ── */
.bew-gift-playlist {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	border-top: 1px solid #f0e2cc;
}
.bew-gift-playlist-title {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #6a7785;
	margin: 18px 0 8px;
	font-weight: 700;
}
.bew-gift-track {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
	transition: background .15s ease;
}
.bew-gift-track:hover { background: #fff1df; }
.bew-gift-track.is-active {
	background: #fff;
	box-shadow: inset 0 0 0 2px #f28a2b;
}
.bew-gift-track-num {
	flex: 0 0 26px;
	height: 26px;
	border-radius: 50%;
	background: #f0e2cc;
	color: #dd7419;
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bew-gift-track.is-active .bew-gift-track-num {
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
}
.bew-gift-track-label {
	flex: 1;
	font-size: 14px;
	color: #14283f;
	font-weight: 600;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Video ── */
.bew-gift-video {
	border-radius: 14px;
	overflow: hidden;
	background: #000;
}
.bew-gift-video video,
.bew-gift-video iframe {
	width: 100%;
	display: block;
	border: 0;
	aspect-ratio: 16 / 9;
}
.bew-gift-video-dl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 700;
	color: #dd7419;
	text-decoration: none;
}
.bew-gift-video-caption {
	margin: 12px 0 0;
	font-size: 15px;
	font-weight: 700;
	color: #14283f;
}

/* ── Mixed gift box (cards) ── */
.bew-gift-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.bew-gift-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #f0e2cc;
	border-radius: 14px;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.bew-gift-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(47,72,88,.12);
}
.bew-gift-card-cover {
	height: 120px;
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%) center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.bew-gift-card-cover svg { width: 38px; height: 38px; opacity: .9; }
.bew-gift-card-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}
.bew-gift-card-kind {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #dd7419;
	font-weight: 800;
}
.bew-gift-card-title {
	font-size: 15px;
	font-weight: 700;
	color: #14283f;
}
.bew-gift-card-desc {
	font-size: 13px;
	color: #6a7785;
	flex: 1;
}
.bew-gift-card-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}
.bew-gift-card-btn {
	flex: 1;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	padding: 9px 10px;
	border-radius: 9px;
	border: none;
	cursor: pointer;
	text-decoration: none;
}
.bew-gift-card-btn--open {
	background: linear-gradient(135deg, #f28a2b 0%, #dd7419 100%);
	color: #fff;
}
.bew-gift-card-btn--dl {
	background: #fff7ee;
	border: 1px solid #e2c79d;
	color: #dd7419;
}
.bew-gift-card-panel {
	padding: 0 14px 14px;
}

@media (max-width: 600px) {
	.bew-gift-audio { flex-direction: column; align-items: stretch; text-align: center; }
	.bew-gift-audio-cover { margin: 0 auto; }
}

/* ============================================================
 *  Media popup (audio / video opened from a gift-box card)
 * ============================================================ */
.bew-gift-media-modal {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.bew-gift-media-overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 30, 45, 0.62);
	backdrop-filter: blur(2px);
}
.bew-gift-media-dialog {
	position: relative;
	width: min(820px, 100%);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
	padding: 40px;
	animation: bew-gift-reveal .25s ease both;
}
.bew-gift-media-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: #f1efe8;
	color: #14283f;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
}
.bew-gift-media-close:hover { background: #e4e0d4; }
.bew-gift-media-body .bew-bonus-gift-delivery-head { margin-bottom: 20px; }

@media (max-width: 600px) {
	.bew-gift-media-modal { padding: 0; }
	.bew-gift-media-dialog { border-radius: 0; max-height: 100vh; padding: 56px 18px 24px; }
}
