/* ARP Device Popup */

.arp-dm {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	overflow-y: auto;
}

.arp-dm.is-open {
	display: flex;
}

body.arp-dm-lock {
	overflow: hidden;
}

.arp-dm__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(8, 20, 40, 0.55);
}

.arp-dm__panel {
	position: relative;
	width: 100%;
	max-width: 780px;
	padding: 26px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(8, 20, 40, 0.28);
	animation: arp-dm-in 0.22s ease-out;
}

@keyframes arp-dm-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.arp-dm__panel { animation: none; }
}

button.arp-dm__close {
	position: absolute;
	top: 18px;
	right: 20px;
	width: 38px;
	height: 38px;
	padding: 0;
	font-size: 30px;
	font-weight: 500;
	line-height: 1;
	color: #000;
	background: none;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.arp-dm__close:hover {
	background: #eef3fa;
	color: #12335f;
}

/* Neutralise the theme/Elementor global button hover, popup only. */
.arp-dm [type=button]:focus,
.arp-dm [type=button]:hover,
.arp-dm [type=submit]:focus,
.arp-dm [type=submit]:hover,
.arp-dm button:focus,
.arp-dm button:hover {
	background-color: #ffffff;
	color: #000000;
	text-decoration: none;
}

.arp-dm__category {
	margin: 0 0 10px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #6f8099;
}

.arp-dm__title {
	margin: 0 0 5px;
	font-size: 1.85rem;
	line-height: 1.25;
	font-weight: 700;
	color: #0e2f5c;
}

.arp-dm__figure {
	margin: 0 0 28px;
	padding: 15px;
	text-align: center;
	background: linear-gradient(180deg, #f5faff 0%, #edf4fd 100%);
	border-radius: 14px;
}

.arp-dm__figure img {
	max-width: 100%;
	max-height: 200px;
	height: auto;
	display: inline-block;
}

.arp-dm__content {
	color: #41678f;
	font-size: 1.02rem;
	line-height: 1.75;
}

.arp-dm__content > *:first-child {
	margin-top: 0;
}

.arp-dm__content > *:last-child {
	margin-bottom: 0;
}

.arp-dm__content ul {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.arp-dm__content ul li {
	position: relative;
	margin-bottom: 12px;
	padding-left: 22px;
}

.arp-dm__content ul li::before {
	content: "";
	position: absolute;
	top: 0.66em;
	left: 2px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #3d7ac0;
}

.arp-dm__reference {
	display: inline-block;
	margin-top: 10px;
	font-weight: 700;
	color: #123a6b;
	text-decoration: none;
}

.arp-dm__reference:hover {
	text-decoration: underline;
}

/* Loading state — panel is visible before the fetch resolves. */
.arp-dm.is-loading .arp-dm__panel {
	min-height: 260px;
}

.arp-dm.is-loading .arp-dm__panel::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid #dbe6f4;
	border-top-color: #3d7ac0;
	border-radius: 50%;
	animation: arp-dm-spin 0.7s linear infinite;
}

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

@media (max-width: 782px) {
	.arp-dm {
		padding: 16px 12px;
	}

	.arp-dm__panel {
		padding: 34px 22px 30px;
		border-radius: 14px;
	}

	.arp-dm__title {
		font-size: 1.4rem;
		margin-bottom: 20px;
	}

	.arp-dm__figure {
		padding: 18px;
		margin-bottom: 22px;
	}
}
