/*
 * Aaron Popup widget styles.
 * Every rule is scoped under #ap-popup-widget so nothing here can
 * leak onto the host site's own elements.
 */

#ap-popup-widget {
	all: initial;
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	display: none;
}

#ap-popup-widget.ap-visible {
	display: block;
}

#ap-popup-widget .ap-box {
	position: relative;
	width: 260px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	box-sizing: border-box;
}

#ap-popup-widget .ap-box * {
	box-sizing: border-box;
}

#ap-popup-widget .ap-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	line-height: 24px;
	text-align: center;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	padding: 0;
	z-index: 1;
}

#ap-popup-widget .ap-close:hover {
	background: rgba(0, 0, 0, 0.75);
}

#ap-popup-widget .ap-media-link {
	display: block;
	text-decoration: none;
}

#ap-popup-widget img.ap-media,
#ap-popup-widget video.ap-media {
	display: block;
	width: 100%;
	height: auto;
	max-height: 260px;
	object-fit: cover;
	border: none;
}

@media (max-width: 480px) {
	#ap-popup-widget {
		right: 8px;
		bottom: 8px;
	}
	#ap-popup-widget .ap-box {
		width: 200px;
	}
}
