/*!
 * PPID Extension / Adblocker Detector - UI styles
 * Modal warning + noscript banner.
 */

:root {
	--ppid-ext-bg: #071227;
	--ppid-ext-panel: #0f2442;
	--ppid-ext-panel-strong: #162f53;
	--ppid-ext-line: rgba(157, 189, 230, 0.22);
	--ppid-ext-line-hot: rgba(255, 168, 84, 0.58);
	--ppid-ext-text: #f7fbff;
	--ppid-ext-muted: #b8c7dd;
	--ppid-ext-soft: #dbe9ff;
	--ppid-ext-body: #cfe0f7;
	--ppid-ext-amber: #ff9f3d;
	--ppid-ext-amber-2: #ffd089;
	--ppid-ext-cyan: #64d7ff;
	--ppid-ext-green: #55d6a5;
	--ppid-ext-danger: #ff675f;
	--ppid-ext-shadow: 0 28px 80px -22px rgba(0, 0, 0, 0.78);
}

/* ===== Noscript banner (JS dimatikan total) ============================ */
.ppid-noscript-banner {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(135deg, rgba(7, 18, 39, 0.94), rgba(11, 31, 58, 0.9)),
		rgba(6, 14, 30, 0.94);
	color: var(--ppid-ext-text);
	font-family: "Segoe UI", Tahoma, Arial, sans-serif;
	padding: 22px;
	text-align: center;
}

.ppid-noscript-card {
	position: relative;
	max-width: 580px;
	width: 100%;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 36%),
		linear-gradient(145deg, #0c1e37, #102a4e 64%, #0a1c35);
	border: 1px solid var(--ppid-ext-line-hot);
	border-radius: 8px;
	padding: 30px 28px;
	box-shadow: var(--ppid-ext-shadow);
	overflow: hidden;
}

.ppid-noscript-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ppid-ext-danger), var(--ppid-ext-amber), var(--ppid-ext-cyan));
}

.ppid-noscript-card h2 {
	margin: 0 0 12px;
	font-size: 21px;
	font-weight: 800;
	color: var(--ppid-ext-text);
	letter-spacing: 0;
}

.ppid-noscript-card p {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.62;
	color: var(--ppid-ext-soft);
}

.ppid-noscript-card ol {
	text-align: left;
	margin: 14px 0 0;
	padding-left: 20px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--ppid-ext-soft);
}

/* ===== Shared alert body ============================================== */
.ppid-alert-shell {
	text-align: left;
	color: var(--ppid-ext-soft);
	font-size: 13.5px;
	line-height: 1.62;
}

.ppid-alert-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	margin: 0 0 14px;
	padding: 7px 10px;
	border: 1px solid rgba(255, 159, 61, 0.38);
	border-radius: 8px;
	background: rgba(255, 159, 61, 0.11);
	color: #ffe2b7;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0;
}

.ppid-alert-status--info {
	border-color: rgba(100, 215, 255, 0.36);
	background: rgba(100, 215, 255, 0.1);
	color: #ccefff;
}

.ppid-alert-status-dot {
	width: 8px;
	height: 8px;
	flex: 0 0 8px;
	border-radius: 999px;
	background: var(--ppid-ext-amber);
	box-shadow: 0 0 0 5px rgba(255, 159, 61, 0.14);
}

.ppid-alert-status--info .ppid-alert-status-dot {
	background: var(--ppid-ext-cyan);
	box-shadow: 0 0 0 5px rgba(100, 215, 255, 0.14);
}

.ppid-alert-shell p {
	margin: 0 0 11px;
	color: var(--ppid-ext-body);
}

.ppid-alert-shell strong {
	color: #ffffff;
	font-weight: 800;
}

.ppid-alert-shell em {
	color: #ffffff;
	font-style: italic;
}

.ppid-alert-lead {
	color: var(--ppid-ext-text);
	font-size: 14px;
	line-height: 1.65;
}

.ppid-alert-impact-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin: 14px 0;
}

.ppid-alert-impact-item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 10px 8px;
	border: 1px solid rgba(100, 215, 255, 0.2);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.045);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	color: #dcecff;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.ppid-alert-panel {
	margin: 13px 0 0;
	padding: 13px 14px;
	border: 1px solid var(--ppid-ext-line);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
		rgba(8, 22, 43, 0.56);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ppid-alert-panel--reason {
	border-color: rgba(255, 159, 61, 0.38);
	background:
		linear-gradient(180deg, rgba(255, 159, 61, 0.12), rgba(255, 159, 61, 0.04)),
		rgba(8, 22, 43, 0.6);
}

.ppid-alert-panel--steps {
	border-color: rgba(100, 215, 255, 0.28);
	background:
		linear-gradient(180deg, rgba(100, 215, 255, 0.1), rgba(100, 215, 255, 0.035)),
		rgba(8, 22, 43, 0.6);
}

.ppid-alert-panel--safe {
	border-color: rgba(85, 214, 165, 0.28);
	background:
		linear-gradient(180deg, rgba(85, 214, 165, 0.1), rgba(85, 214, 165, 0.03)),
		rgba(8, 22, 43, 0.6);
}

.ppid-alert-panel p:last-child {
	margin-bottom: 0;
}

.ppid-alert-panel-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 850;
	line-height: 1.35;
}

.ppid-alert-panel-title::before {
	content: "";
	width: 6px;
	height: 18px;
	flex: 0 0 6px;
	border-radius: 999px;
	background: var(--ppid-ext-amber);
}

.ppid-alert-panel--steps .ppid-alert-panel-title::before {
	background: var(--ppid-ext-cyan);
}

.ppid-alert-panel--safe .ppid-alert-panel-title::before {
	background: var(--ppid-ext-green);
}

.ppid-alert-shell ul,
.ppid-alert-shell ol {
	margin: 0;
	padding-left: 20px;
}

.ppid-alert-shell li {
	margin: 4px 0;
	color: var(--ppid-ext-soft);
}

.ppid-alert-shell kbd {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 5px;
	padding: 1px 6px;
	font-family: "Consolas", monospace;
	font-size: 12px;
	color: #fff;
}

/* ===== SweetAlert2 skin =============================================== */
.swal2-container.ppid-swal-ext-container {
	z-index: 2147483645 !important;
	align-items: flex-start !important;
	justify-items: center !important;
	padding: 24px 16px !important;
	overflow-y: auto !important;
}

.swal2-container.ppid-swal-ext-container.swal2-backdrop-show {
	background: rgba(3, 11, 28, 0.76);
}

.swal2-popup.ppid-swal-ext-modal {
	position: relative;
	width: min(94vw, 620px);
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 1px solid rgba(255, 159, 61, 0.42);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 32%),
		linear-gradient(145deg, #0b1b33 0%, #132a4c 55%, #08182f 100%);
	box-shadow: var(--ppid-ext-shadow);
	color: var(--ppid-ext-text);
	overflow: hidden;
	display: flex !important;
	flex-direction: column;
}

.swal2-popup.ppid-swal-ext-modal::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ppid-ext-danger), var(--ppid-ext-amber), var(--ppid-ext-cyan));
}

.swal2-popup.ppid-swal-ext-info {
	border-color: rgba(100, 215, 255, 0.38);
}

.swal2-popup.ppid-swal-ext-info::before {
	background: linear-gradient(90deg, var(--ppid-ext-green), var(--ppid-ext-cyan), var(--ppid-ext-amber));
}

.swal2-popup.ppid-swal-ext-modal .swal2-icon {
	margin: 28px auto 12px;
	width: 66px;
	height: 66px;
	border-width: 2px;
	box-shadow:
		0 0 0 8px rgba(255, 159, 61, 0.11),
		0 18px 34px -20px rgba(255, 159, 61, 0.9);
}

.swal2-popup.ppid-swal-ext-modal .swal2-icon.swal2-warning {
	border-color: var(--ppid-ext-amber-2);
	color: var(--ppid-ext-amber-2);
}

.swal2-popup.ppid-swal-ext-info .swal2-icon {
	box-shadow:
		0 0 0 8px rgba(100, 215, 255, 0.11),
		0 18px 34px -20px rgba(100, 215, 255, 0.9);
}

.swal2-popup.ppid-swal-ext-info .swal2-icon.swal2-info {
	border-color: var(--ppid-ext-cyan);
	color: var(--ppid-ext-cyan);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-title {
	margin: 0;
	padding: 0 26px;
	color: #ffffff;
	font-size: 21px;
	font-weight: 850;
	line-height: 1.28;
	letter-spacing: 0;
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-content {
	margin: 14px 0 0;
	padding: 0 28px;
	color: var(--ppid-ext-soft);
	text-align: left;
	overflow-y: auto;
	max-height: min(52vh, 460px);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-actions {
	flex: 0 0 auto;
	width: 100%;
	margin: 0;
	padding: 18px 28px 24px;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
	background: rgba(0, 0, 0, 0.16);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.swal2-popup.ppid-swal-ext-info .ppid-swal-ext-actions {
	grid-template-columns: minmax(0, 220px);
	justify-content: center;
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm,
.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel {
	width: 100%;
	min-height: 42px;
	margin: 0;
	border-radius: 7px;
	padding: 10px 14px;
	border: 1px solid transparent;
	font-family: "Segoe UI", Tahoma, Arial, sans-serif;
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0;
	box-shadow: none;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		border-color 0.18s ease,
		background 0.18s ease;
	white-space: normal;
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm {
	background: linear-gradient(135deg, #ff8c1f, #ffc06f);
	border-color: rgba(255, 192, 111, 0.72);
	color: #201307;
	box-shadow: 0 14px 30px -18px rgba(255, 159, 61, 0.85);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel {
	background: rgba(255, 255, 255, 0.075);
	border-color: rgba(184, 213, 255, 0.24);
	color: #edf5ff;
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm:hover,
.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel:hover {
	transform: translateY(-1px);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm:hover {
	box-shadow: 0 18px 34px -18px rgba(255, 159, 61, 0.95);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(184, 213, 255, 0.38);
}

.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm:focus,
.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel:focus {
	box-shadow:
		0 0 0 3px rgba(100, 215, 255, 0.28),
		0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

/* ===== Fallback modal ================================================ */
#ppid-ext-blocker-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483645;
	background:
		linear-gradient(135deg, rgba(7, 18, 39, 0.86), rgba(8, 19, 38, 0.76)),
		rgba(6, 14, 30, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	font-family: "Segoe UI", Tahoma, Arial, sans-serif;
	animation: ppidExtFade 0.25s ease;
}

@keyframes ppidExtFade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.ppid-ext-blocker-modal {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 36px);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 34%),
		linear-gradient(145deg, #0b1b33, #132a4c 58%, #08182f);
	border: 1px solid rgba(255, 159, 61, 0.42);
	border-radius: 8px;
	box-shadow: var(--ppid-ext-shadow);
	color: var(--ppid-ext-text);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: ppidExtPop 0.28s ease;
}

.ppid-ext-blocker-modal::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ppid-ext-danger), var(--ppid-ext-amber), var(--ppid-ext-cyan));
}

.ppid-ext-blocker-modal--info {
	border-color: rgba(100, 215, 255, 0.38);
}

.ppid-ext-blocker-modal--info::before {
	background: linear-gradient(90deg, var(--ppid-ext-green), var(--ppid-ext-cyan), var(--ppid-ext-amber));
}

@keyframes ppidExtPop {
	from {
		transform: translateY(14px) scale(0.97);
		opacity: 0;
	}
	to {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}

.ppid-ext-blocker-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 24px 28px 15px;
}

.ppid-ext-blocker-icon {
	width: 54px;
	height: 54px;
	flex: 0 0 54px;
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 159, 61, 0.18), rgba(255, 159, 61, 0.06)),
		rgba(255, 255, 255, 0.04);
	color: var(--ppid-ext-amber-2);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 159, 61, 0.42);
	box-shadow: 0 16px 34px -24px rgba(255, 159, 61, 0.92);
}

.ppid-ext-blocker-modal--info .ppid-ext-blocker-icon {
	background:
		linear-gradient(180deg, rgba(100, 215, 255, 0.16), rgba(100, 215, 255, 0.05)),
		rgba(255, 255, 255, 0.04);
	border-color: rgba(100, 215, 255, 0.38);
	color: #ccefff;
	box-shadow: 0 16px 34px -24px rgba(100, 215, 255, 0.9);
}

.ppid-ext-blocker-header h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 850;
	line-height: 1.28;
	letter-spacing: 0;
	color: #ffffff;
}

.ppid-ext-blocker-body {
	padding: 0 28px 16px;
	overflow-y: auto;
}

.ppid-ext-blocker-footer {
	padding: 18px 28px 24px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(0, 0, 0, 0.16);
}

.ppid-ext-blocker-modal--info .ppid-ext-blocker-footer {
	grid-template-columns: minmax(0, 220px);
	justify-content: center;
}

.ppid-ext-blocker-btn {
	min-height: 42px;
	border: 1px solid transparent;
	border-radius: 7px;
	padding: 10px 14px;
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.25;
	cursor: pointer;
	transition:
		transform 0.18s ease,
		background 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease;
	font-family: inherit;
	white-space: normal;
}

.ppid-ext-blocker-btn:hover {
	transform: translateY(-1px);
}

.ppid-ext-blocker-btn:focus {
	outline: none;
	box-shadow:
		0 0 0 3px rgba(100, 215, 255, 0.28),
		0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

.ppid-ext-blocker-btn--secondary {
	background: rgba(255, 255, 255, 0.075);
	border-color: rgba(184, 213, 255, 0.24);
	color: #edf5ff;
}

.ppid-ext-blocker-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(184, 213, 255, 0.38);
}

.ppid-ext-blocker-btn--primary {
	background: linear-gradient(135deg, #ff8c1f, #ffc06f);
	border-color: rgba(255, 192, 111, 0.72);
	color: #201307;
	box-shadow: 0 14px 30px -18px rgba(255, 159, 61, 0.85);
}

.ppid-ext-blocker-btn--primary:hover {
	box-shadow: 0 18px 34px -18px rgba(255, 159, 61, 0.95);
}

@media (max-width: 560px) {
	.ppid-alert-impact-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.ppid-noscript-banner,
	#ppid-ext-blocker-overlay {
		align-items: flex-start;
		padding: 12px;
		overflow-y: auto;
	}

	.ppid-noscript-card {
		padding: 24px 18px 20px;
	}

	.swal2-popup.ppid-swal-ext-modal {
		width: min(100%, 390px);
		max-height: calc(100vh - 24px);
		overflow-y: auto;
	}

	.swal2-popup.ppid-swal-ext-modal .swal2-icon {
		margin-top: 24px;
		width: 58px;
		height: 58px;
	}

	.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-title {
		padding: 0 18px;
		font-size: 19px;
	}

	.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-content {
		padding: 0 18px;
	}

	.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-actions,
	.ppid-ext-blocker-footer {
		grid-template-columns: 1fr;
		padding: 14px 18px 18px;
	}

	.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-confirm,
	.swal2-popup.ppid-swal-ext-modal .ppid-swal-ext-cancel,
	.ppid-ext-blocker-btn {
		min-height: 44px;
	}

	.ppid-ext-blocker-modal {
		max-height: calc(100vh - 24px);
	}

	.ppid-ext-blocker-header {
		padding: 22px 18px 12px;
		align-items: flex-start;
	}

	.ppid-ext-blocker-icon {
		width: 48px;
		height: 48px;
		flex-basis: 48px;
	}

	.ppid-ext-blocker-header h2 {
		font-size: 19px;
	}

	.ppid-ext-blocker-body {
		padding: 0 18px 14px;
	}

	.ppid-alert-shell {
		font-size: 13px;
	}
}
