/**
 * Waio Instant Prizes — Frontend Modal Styles
 *
 * All selectors are prefixed with "wip-" to avoid theme conflicts.
 * Uses CSS custom properties for easy theming.
 *
 * @package WaioInstantPrizes
 */

/* ── Custom properties ────────────────────────────────────────────── */

:root {
	--wip-overlay-bg: rgba(0, 0, 0, 0.6);
	--wip-modal-bg: #ffffff;
	--wip-modal-radius: 16px;
	--wip-modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	--wip-modal-max-width: 420px;
	--wip-text-color: #1a1a2e;
	--wip-text-muted: #666;
	--wip-btn-bg: #4361ee;
	--wip-btn-color: #fff;
	--wip-btn-hover-bg: #3a56d4;
	--wip-win-color: #2ecc71;
	--wip-lose-color: #95a5a6;
	--wip-blocked-color: #e74c3c;
}

/* ── Overlay ──────────────────────────────────────────────────────── */

.wip-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--wip-overlay-bg);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.wip-modal-overlay.wip-visible {
	opacity: 1;
	pointer-events: auto;
}

/* ── Modal ────────────────────────────────────────────────────────── */

.wip-modal {
	background: var(--wip-modal-bg);
	border-radius: var(--wip-modal-radius);
	box-shadow: var(--wip-modal-shadow);
	max-width: var(--wip-modal-max-width);
	width: 90%;
	padding: 40px 32px 32px;
	text-align: center;
	position: relative;
	transform: translateY(30px) scale(0.95);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ── Close button ─────────────────────────────────────────────────── */

.wip-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 28px;
	color: var(--wip-text-muted);
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	transition: color 0.2s;
}

.wip-modal-close:hover {
	color: var(--wip-text-color);
}

/* ── Icon ─────────────────────────────────────────────────────────── */

.wip-modal-icon {
	font-size: 56px;
	margin-bottom: 12px;
	line-height: 1.2;
}

/* ── Title ────────────────────────────────────────────────────────── */

.wip-modal-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--wip-text-color);
	margin: 0 0 8px;
}

/* ── Image ────────────────────────────────────────────────────────── */

.wip-modal-image {
	margin: 16px auto;
}

.wip-modal-image img {
	max-width: 200px;
	max-height: 160px;
	border-radius: 8px;
	object-fit: contain;
}

/* ── Message ──────────────────────────────────────────────────────── */

.wip-modal-message {
	font-size: 16px;
	color: var(--wip-text-muted);
	margin: 0 0 24px;
	line-height: 1.5;
}

/* ── CTA button ───────────────────────────────────────────────────── */

.wip-modal-btn {
	display: inline-block;
	background: var(--wip-btn-bg);
	color: var(--wip-btn-color);
	border: none;
	border-radius: 8px;
	padding: 12px 36px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.wip-modal-btn:hover {
	background: var(--wip-btn-hover-bg);
}

/* ── Status-specific colours ──────────────────────────────────────── */

.wip-modal-overlay[data-status="won"] .wip-modal-title {
	color: var(--wip-win-color);
}

.wip-modal-overlay[data-status="lost"] .wip-modal-title,
.wip-modal-overlay[data-status="inactive"] .wip-modal-title {
	color: var(--wip-lose-color);
}

.wip-modal-overlay[data-status="blocked"] .wip-modal-title {
	color: var(--wip-blocked-color);
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.wip-modal {
		padding: 32px 20px 24px;
	}

	.wip-modal-icon {
		font-size: 44px;
	}

	.wip-modal-title {
		font-size: 19px;
	}
}
