/**
 * plg_content_vcshare — блок «Поделись с другом»
 * Vedic-Culture.in.ua
 *
 * Селекторы намеренно «тяжёлые» + точечные !important:
 * шаблоны Joomla часто вешают на a{} свои background-image / text-indent,
 * из-за чего кнопки «разваливаются».
 */

.vcshare {
	margin: 28px 0;
	padding: 0;
	clear: both;
	font-family: inherit;
	line-height: 1.4;
	--vcs-bg: #ecebe6;
	--vcs-bd: #cfcabd;
	--vcs-fg: #444;
}

.vcshare.vcs--box {
	background: var(--vcs-bg);
	border: 2px dashed var(--vcs-bd);
	border-radius: 14px;
	padding: 18px 16px 20px;
}

.vcshare.vcs--center { text-align: center; }
.vcshare.vcs--left   { text-align: left; }
.vcshare.vcs--right  { text-align: right; }

.vcshare .vcs-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--vcs-fg);
}

.vcshare .vcs-article {
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
	font-style: italic;
	color: #6b6b6b;
}

.vcshare .vcs-sub {
	margin: 0 0 14px;
	padding: 0;
	font-size: 15px;
	color: var(--vcs-fg);
}

/* .vcs-list — колонка рядов, .vcs-row — один ряд кнопок */
.vcshare .vcs-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vcshare .vcs-list .vcs-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.vcshare.vcs--center .vcs-list .vcs-row { justify-content: center; }
.vcshare.vcs--right  .vcs-list .vcs-row { justify-content: flex-end; }
.vcshare.vcs--left   .vcs-list .vcs-row { justify-content: flex-start; }

/* ---------- кнопка ---------- */

.vcshare .vcs-list .vcs-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	margin: 0;
	padding: 9px 15px;
	width: auto !important;
	height: auto !important;
	min-width: 0;
	border: 0 !important;
	border-radius: var(--vcs-r, 6px);
	background-color: #6c757d;
	background-image: none !important;
	background-position: 0 0 !important;
	background-repeat: no-repeat !important;
	color: #fff !important;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.15 !important;
	text-align: center;
	text-decoration: none !important;
	text-indent: 0 !important;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.vcshare .vcs-list .vcs-btn:hover,
.vcshare .vcs-list .vcs-btn:focus {
	color: #fff !important;
	text-decoration: none !important;
	opacity: .9;
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}

.vcshare .vcs-list .vcs-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

.vcshare .vcs-list .vcs-btn:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

.vcshare .vcs-list .vcs-btn .vcs-i {
	display: inline-block !important;
	flex: 0 0 auto;
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	background: none !important;
	vertical-align: middle;
	fill: currentColor;
	pointer-events: none;
}

.vcshare .vcs-list .vcs-btn .vcs-t {
	display: inline-block;
	min-width: 0;
	max-width: 100%;
	background: none !important;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* только иконки */
.vcshare.vcs--icons .vcs-list .vcs-btn { padding: 10px; }
.vcshare.vcs--icons .vcs-list .vcs-btn .vcs-t {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* размеры */
.vcshare.vcs--sm .vcs-list .vcs-btn { padding: 6px 11px; font-size: 13px; gap: 6px; }
.vcshare.vcs--sm .vcs-list .vcs-btn .vcs-i { width: 15px !important; height: 15px !important; }
.vcshare.vcs--lg .vcs-list .vcs-btn { padding: 12px 20px; font-size: 16px; }
.vcshare.vcs--lg .vcs-list .vcs-btn .vcs-i { width: 21px !important; height: 21px !important; }

/* ---------- цвета: фолбэк для браузеров без CSS-переменных ---------- */
.vcshare .vcs-list .vcs-tg { background-color: #0088cc; }
.vcshare .vcs-list .vcs-wa { background-color: #25d366; }
.vcshare .vcs-list .vcs-vb { background-color: #7360f2; }
.vcshare .vcs-list .vcs-fb { background-color: #1877f2; }
.vcshare .vcs-list .vcs-vk { background-color: #0077ff; }
.vcshare .vcs-list .vcs-ok { background-color: #ee8208; }
.vcshare .vcs-list .vcs-x  { background-color: #000000; }
.vcshare .vcs-list .vcs-li { background-color: #0a66c2; }
.vcshare .vcs-list .vcs-rd { background-color: #ff4500; }
.vcshare .vcs-list .vcs-pn { background-color: #e60023; }
.vcshare .vcs-list .vcs-em { background-color: #5b7083; }
.vcshare .vcs-list .vcs-pr { background-color: #495057; }
.vcshare .vcs-list .vcs-ws { background-color: #8e44ad; }
.vcshare .vcs-list .vcs-cp { background-color: #6c757d; }

/* основной цвет — из инлайнового --vcs-c */
.vcshare.vcs--flat .vcs-list .vcs-btn {
	background-color: var(--vcs-c, #6c757d) !important;
}

/* ---------- стиль «контур» ---------- */
.vcshare.vcs--outline .vcs-list .vcs-btn {
	background-color: transparent !important;
	color: var(--vcs-c, #444) !important;
	box-shadow: inset 0 0 0 2px var(--vcs-c, #444);
}

.vcshare.vcs--outline .vcs-list .vcs-btn:hover,
.vcshare.vcs--outline .vcs-list .vcs-btn:focus {
	background-color: var(--vcs-c, #444) !important;
	color: #fff !important;
	box-shadow: inset 0 0 0 2px var(--vcs-c, #444);
}

/* ---------- стиль «мягкий» ---------- */
.vcshare.vcs--soft .vcs-list .vcs-btn {
	background-color: #fff !important;
	color: var(--vcs-c, #444) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

.vcshare.vcs--soft .vcs-list .vcs-btn:hover,
.vcshare.vcs--soft .vcs-list .vcs-btn:focus {
	color: var(--vcs-c, #444) !important;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
}

/* состояние «Скопировано!» */
.vcshare .vcs-list .vcs-btn.vcs-ok-state.vcs-ok-state:is(:link, :visited, :hover, :focus, :active) {
	background-color: #2f9e44 !important;
	color: #fff !important;
	box-shadow: none !important;
	opacity: 1 !important;
	transform: none !important;
}


.vcshare .vcs-btn[hidden] { display: none !important; }


/* ==========================================================================
   Кнопки одной ширины (класс vcs--eq, настройка «Растягивать кнопки»)
   ==========================================================================
   Ряд перестаёт переноситься: 3 мессенджера сверху, 2 утилиты снизу — ровно
   так, как задумано, на любой ширине экрана. Ширина делится поровну через
   flex-basis: 0, поэтому длина подписи на неё не влияет.
   -------------------------------------------------------------------------- */

.vcshare.vcs--eq .vcs-list .vcs-row {
	flex-wrap: nowrap;
	align-items: stretch;
}

.vcshare.vcs--eq .vcs-list .vcs-row > .vcs-btn,
.vcshare.vcs--eq .vcs-list .vcs-row > .vcs-mwrap {
	flex: 1 1 0;
	min-width: 0;
}

/* «Только иконки» — растягивать незачем, кнопки остаются квадратными. */
.vcshare.vcs--eq.vcs--icons .vcs-list .vcs-row {
	flex-wrap: wrap;
}

.vcshare.vcs--eq.vcs--icons .vcs-list .vcs-row > .vcs-btn,
.vcshare.vcs--eq.vcs--icons .vcs-list .vcs-row > .vcs-mwrap {
	flex: 0 0 auto;
}


/* ==========================================================================
   Кнопка «Поделиться» и её выпадающее меню
   ========================================================================== */

.vcshare .vcs-mwrap {
	position: relative;
	display: flex;
	margin: 0;
	padding: 0;
}

.vcshare .vcs-mwrap > .vcs-btn {
	width: 100% !important;
}

.vcshare .vcs-btn .vcs-caret {
	flex: 0 0 auto;
	width: 12px !important;
	height: 12px !important;
	margin: 0 0 0 -2px !important;
	background: none !important;
	opacity: .75;
	pointer-events: none;
	transition: transform .18s ease;
}

.vcshare .vcs-mwrap.is-open > .vcs-btn .vcs-caret {
	transform: rotate(180deg);
}

/* На смартфоне кнопка открывает системный диалог — стрелочка там врёт. */
.vcshare .vcs-btn.vcs-native-mode .vcs-caret { display: none !important; }

.vcshare .vcs-more[hidden] { display: none !important; }

.vcshare .vcs-more {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	left: 50%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	box-sizing: border-box;
	width: max-content;
	min-width: 100%;
	max-width: min(340px, 88vw);
	margin: 0;
	padding: 10px;
	text-align: left;
	background: #fff;
	border: 1px solid #e2ded1;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(70, 64, 45, .18);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -6px);
	transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.vcshare .vcs-mwrap.is-open .vcs-more {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition: opacity .16s ease, transform .16s ease, visibility 0s;
}

/* Хвостик-стрелка к кнопке. */
.vcshare .vcs-more::before {
	content: '';
	position: absolute;
	top: -6px;
	left: 50%;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	background: #fff;
	border-left: 1px solid #e2ded1;
	border-top: 1px solid #e2ded1;
	transform: rotate(45deg);
}

.vcshare .vcs-more .vcs-btn {
	width: 100% !important;
	justify-content: flex-start;
}

/* Прижать меню к краю блока, если кнопка у самого края экрана. */
.vcshare.vcs--left .vcs-more  { left: 0; transform: translate(0, -6px); }
.vcshare.vcs--left .vcs-mwrap.is-open .vcs-more { transform: translate(0, 0); }
.vcshare.vcs--left .vcs-more::before { left: 28px; }

.vcshare.vcs--right .vcs-more { left: auto; right: 0; transform: translate(0, -6px); }
.vcshare.vcs--right .vcs-mwrap.is-open .vcs-more { transform: translate(0, 0); }
.vcshare.vcs--right .vcs-more::before { left: auto; right: 28px; }

@media (prefers-reduced-motion: reduce) {
	.vcshare .vcs-more,
	.vcshare .vcs-btn .vcs-caret { transition: none; }
}


/* ==========================================================================
   Вариант А — «Нейтральный»: белые кнопки, цветные только логотипы
   ========================================================================== */

.vcshare.vcs--neutral .vcs-list .vcs-btn,
.vcshare.vcs--neutral .vcs-more .vcs-btn {
	background-color: #fffdf8 !important;
	color: #4a5043 !important;
	box-shadow: inset 0 0 0 1px #e4dfd1, 0 1px 2px rgba(70, 64, 45, .05);
	font-weight: 600;
}

.vcshare.vcs--neutral .vcs-btn .vcs-i {
	color: var(--vcs-c, #6c757d);
}

.vcshare.vcs--neutral .vcs-list .vcs-btn:hover,
.vcshare.vcs--neutral .vcs-list .vcs-btn:focus,
.vcshare.vcs--neutral .vcs-more .vcs-btn:hover,
.vcshare.vcs--neutral .vcs-more .vcs-btn:focus {
	background-color: var(--vcs-c, #6c757d) !important;
	color: #fff !important;
	opacity: 1;
	box-shadow: 0 4px 12px rgba(70, 64, 45, .18);
}

.vcshare.vcs--neutral .vcs-btn:hover .vcs-i,
.vcshare.vcs--neutral .vcs-btn:focus .vcs-i { color: #fff; }

/* Нижний ряд утилит — спокойнее мессенджеров. */
.vcshare.vcs--neutral .vcs-btn.vcs-u {
	background-color: #f4f1e8 !important;
	color: #6b7061 !important;
	box-shadow: inset 0 0 0 1px #e4dfd1;
}

.vcshare.vcs--neutral .vcs-btn.vcs-u .vcs-i { color: #8a8f7d; }

.vcshare.vcs--neutral .vcs-btn.vcs-u:hover,
.vcshare.vcs--neutral .vcs-btn.vcs-u:focus,
.vcshare.vcs--neutral .vcs-mwrap.is-open > .vcs-btn.vcs-u {
	background-color: #e9e5d8 !important;
	color: #4a5043 !important;
	box-shadow: inset 0 0 0 1px #d9d3c1;
}

.vcshare.vcs--neutral .vcs-btn.vcs-u:hover .vcs-i,
.vcshare.vcs--neutral .vcs-btn.vcs-u:focus .vcs-i,
.vcshare.vcs--neutral .vcs-mwrap.is-open > .vcs-btn.vcs-u .vcs-i { color: #6b7061; }


/* ==========================================================================
   Вариант Б — «Пастельный бренд-код» (стиль по умолчанию)
   ==========================================================================
   Фон получается из фирменного цвета кнопки: color-mix подмешивает его
   в белый, поэтому свои цвета из настроек («Цвет кнопки») работают как есть.
   Первая строка background-color — фолбэк для браузеров без color-mix.
   -------------------------------------------------------------------------- */

.vcshare.vcs--pastel .vcs-list .vcs-btn,
.vcshare.vcs--pastel .vcs-more .vcs-btn {
	background-color: #f1efe7 !important;
	background-color: color-mix(in srgb, var(--vcs-c, #6c757d) 15%, #fff) !important;
	color: #40473a !important;
	box-shadow: inset 0 0 0 1px rgba(70, 64, 45, .07);
	font-weight: 600;
}

.vcshare.vcs--pastel .vcs-btn .vcs-i {
	color: #5c6350;
	color: color-mix(in srgb, var(--vcs-c, #6c757d) 78%, #26301f);
}

.vcshare.vcs--pastel .vcs-list .vcs-btn:hover,
.vcshare.vcs--pastel .vcs-list .vcs-btn:focus,
.vcshare.vcs--pastel .vcs-more .vcs-btn:hover,
.vcshare.vcs--pastel .vcs-more .vcs-btn:focus {
	background-color: #e6e2d6 !important;
	background-color: color-mix(in srgb, var(--vcs-c, #6c757d) 30%, #fff) !important;
	color: #2f362a !important;
	opacity: 1;
	transform: translateY(-1px);
	box-shadow: inset 0 0 0 1px rgba(70, 64, 45, .07), 0 4px 12px rgba(70, 64, 45, .16);
}

/* Нижний ряд утилит — бежево-серый, без бренд-цвета. */
.vcshare.vcs--pastel .vcs-btn.vcs-u {
	background-color: #f2efe6 !important;
	color: #676d5d !important;
	box-shadow: inset 0 0 0 1px rgba(70, 64, 45, .08);
}

.vcshare.vcs--pastel .vcs-btn.vcs-u .vcs-i { color: #8a8f7d; }

.vcshare.vcs--pastel .vcs-btn.vcs-u:hover,
.vcshare.vcs--pastel .vcs-btn.vcs-u:focus,
.vcshare.vcs--pastel .vcs-mwrap.is-open > .vcs-btn.vcs-u {
	background-color: #e9e5d8 !important;
	color: #414734 !important;
	box-shadow: inset 0 0 0 1px rgba(70, 64, 45, .12), 0 4px 12px rgba(70, 64, 45, .14);
}

.vcshare.vcs--pastel .vcs-btn.vcs-u:hover .vcs-i,
.vcshare.vcs--pastel .vcs-btn.vcs-u:focus .vcs-i,
.vcshare.vcs--pastel .vcs-mwrap.is-open > .vcs-btn.vcs-u .vcs-i { color: #6b7061; }

/* «Скопировано!» перебивает всё — правило ниже по файлу, но в новых стилях
   фон объявлен с !important, поэтому дублируем его тут с большей специфичностью. */
.vcshare.vcs--pastel .vcs-list .vcs-btn.vcs-ok-state,
.vcshare.vcs--neutral .vcs-list .vcs-btn.vcs-ok-state {
	background-color: #2f9e44 !important;
	color: #fff !important;
	box-shadow: none !important;
	transform: none !important;
}

.vcshare.vcs--pastel .vcs-btn.vcs-ok-state .vcs-i,
.vcshare.vcs--neutral .vcs-btn.vcs-ok-state .vcs-i { color: #fff; }


/* ---------- мобильные ---------- */
@media (max-width: 480px) {
	.vcshare.vcs--box { padding: 14px 10px 16px; border-radius: 10px; }
	.vcshare .vcs-title { font-size: 17px; }
	.vcshare .vcs-list { gap: 8px; }
	.vcshare .vcs-list .vcs-row { gap: 8px; }
	.vcshare .vcs-list .vcs-btn { padding: 9px 10px; font-size: 13px; gap: 6px; }
	.vcshare .vcs-more { grid-template-columns: 1fr; max-width: 86vw; }
}

/* --------------------------------------------------------------------------
   Узкий экран: три кнопки одной ширины больше не вмещают слово «WhatsApp»,
   а обрезанное «Whats…» выглядит хуже, чем чистый логотип. Поэтому у сетей
   подпись прячется (остаётся для скринридеров и в title), а у нижнего ряда
   («Ссылка», «Поделиться») сохраняется — эти две кнопки без слов не читаются.
   Кнопок внутри меню «Поделиться» правило не касается: там колонка, места хватает.
   -------------------------------------------------------------------------- */
@media (max-width: 430px) {
	.vcshare.vcs--eq .vcs-list .vcs-row > .vcs-btn:not(.vcs-u) {
		padding: 11px 8px;
	}

	.vcshare.vcs--eq .vcs-list .vcs-row > .vcs-btn:not(.vcs-u) .vcs-t {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.vcshare.vcs--eq .vcs-list .vcs-row > .vcs-btn:not(.vcs-u) .vcs-i {
		width: 20px !important;
		height: 20px !important;
	}
}

/* Совсем узкие экраны: нижнему ряду тоже нужен запас. */
@media (max-width: 360px) {
	.vcshare.vcs--eq .vcs-list .vcs-btn.vcs-u { padding: 9px 6px; font-size: 12px; gap: 5px; }
}

/* печать — блок не нужен */
@media print {
	.vcshare { display: none !important; }
}
