/* RePlace front-end slot styles */

.rp-slot {
	position: relative;
	margin: 0;
	overflow: visible;
	line-height: 0;
}

.rp-slot--text,
.rp-slot--post {
	line-height: 1.4;
}

.rp-slot img {
	max-width: 100%;
	height: auto;
}

.rp-slot iframe {
	border: 0;
	display: block;
	max-width: 100%;
}

.rp-mark {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	font-size: 11px;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.55);
	padding: 2px 6px;
	text-align: left;
	background: rgba(255, 255, 255, 0.75);
	white-space: nowrap;
}

.rp-mark--top-right {
	top: 0;
	left: auto;
	right: 0;
}

.rp-mark--bottom-left {
	top: auto;
	bottom: 0;
	left: 0;
}

.rp-mark--bottom-right {
	top: auto;
	bottom: 0;
	left: auto;
	right: 0;
}

.rp-mark a {
	color: inherit;
	text-decoration: underline;
}

.rp-mark--icon {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 1px 4px;
}

.rp-mark__toggle {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: inherit;
	line-height: 1.2;
}

.rp-mark__ic {
	flex-shrink: 0;
}

.rp-mark__small {
	display: inline-block;
	white-space: nowrap;
}

.rp-mark__pop {
	position: absolute;
	top: 130%;
	right: 0;
	z-index: 2147483000;
	min-width: 200px;
	max-width: 280px;
	max-height: calc(100vh - 24px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	color: #1d2327;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	padding: 6px 8px;
	font-size: 12px;
	line-height: 1.5;
	white-space: normal;
}

.rp-mark__pop[hidden] {
	display: none;
}

.rp-mark__pop-inner {
	position: relative;
	padding-right: 18px;
}

.rp-mark__close {
	position: absolute;
	top: 0;
	right: 0;
	border: 0;
	background: transparent;
	color: #787c82;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	padding: 2px;
}

.rp-text,
.rp-card {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #111;
}

.rp-text {
	display: block;
	text-decoration: none;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
}

.rp-text:hover {
	border-color: rgba(0, 0, 0, 0.35);
}

.rp-text__title {
	display: block;
	font-weight: 700;
	color: #1a73e8;
}

.rp-text__desc {
	display: block;
	color: #444;
	margin-top: 4px;
}

.rp-text__cta {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: #1a73e8;
	border-radius: 4px;
	padding: 4px 10px;
}

.rp-card__cover {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 8px;
}

.rp-card__title a {
	color: #1a73e8;
	text-decoration: none;
}

.rp-card__title a:hover {
	text-decoration: underline;
}

.rp-card__excerpt {
	color: #444;
}

/* Значок «?» AdChoices и его меню (1.6.2) */
.rp-ac {
	position: relative;
	display: inline-block;
	margin-left: 6px;
	vertical-align: middle;
	line-height: 1;
}

.rp-ac__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.rp-ac__btn:hover {
	background: rgba(0, 0, 0, 0.75);
}

.rp-ac__btn--fa {
	width: 18px;
	height: 18px;
	font-size: 12px;
}

.rp-ac__pop {
	position: absolute;
	bottom: 130%;
	right: 0;
	z-index: 2147483000;
	min-width: 200px;
	max-width: 280px;
	max-height: calc(100vh - 24px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	color: #1d2327;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	padding: 6px 8px;
	font-size: 12px;
	line-height: 1.5;
}

.rp-ac__pop[hidden] {
	display: none;
}

.rp-ac__pop-inner {
	position: relative;
	padding-right: 18px;
}

.rp-ac__close {
	position: absolute;
	top: 0;
	right: 0;
	border: 0;
	background: transparent;
	color: #787c82;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	padding: 2px;
}

.rp-ac__row {
	display: block;
	padding: 2px 0;
}

.rp-ac__row + .rp-ac__row {
	border-top: 1px solid #f0f0f1;
}

.rp-ac__row a {
	color: #1a73e8;
	text-decoration: underline;
}

/* Верхние углы: меню «?» открывается под плашкой */
.rp-mark--top-right .rp-ac__pop,
.rp-mark--top-left .rp-ac__pop {
	bottom: auto;
	top: 130%;
}

/* Нижние углы: панель бейджа открывается над плашкой */
.rp-mark--bottom-left .rp-mark__pop,
.rp-mark--bottom-right .rp-mark__pop {
	top: auto;
	bottom: 130%;
}

@media (pointer: coarse) {
	.rp-ac__pop,
	.rp-mark__pop {
		bottom: auto;
		top: 130%;
	}
}