/* ТЦ «Город»: кнопки «Поделиться» конкурса (TCGC_Share, share.js), 24.11.2026.
   Кнопка и меню живут внутри обёртки .tcgc-share (position: relative): меню остаётся в том же окне, что и кнопка.
   Цвета на белом: текст #0B2340 15.8:1, значок #0077A8 5:1; в тёмной теме сайта (#tcg-dark-css) текст #ececee.
   Движение задаёт share.js (opacity и transform, 160 мс ease-out). Наведение только для мыши. */

.tcgc-share {
  --tcgcs-ink: #0B2340;
  --tcgcs-ink-2: #44566D;
  --tcgcs-icon: #0077A8;
  --tcgcs-line: #A9D3EC;
  --tcgcs-hover: #EEF6FB;
  --tcgcs-bg: #fff;
  --tcgcs-menu: #fff;
  --tcgcs-menu-line: rgba(11, 35, 64, 0.08);
  --tcgcs-focus: #0079b0;
  --tcgcs-ease: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  max-width: 100%;
}
.tcgc-share[hidden] { display: none !important; }

.tcgc-share .tcgc-share__btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--tcgcs-bg);
  box-shadow: inset 0 0 0 1.5px var(--tcgcs-line);
  color: var(--tcgcs-ink);
  font: 600 16px/1.2 "TCGC Golos", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 160ms var(--tcgcs-ease), box-shadow 150ms ease, background-color 150ms ease;
}
.tcgc-share .tcgc-share__btn:hover, .tcgc-share .tcgc-share__btn:focus { background: var(--tcgcs-bg); color: var(--tcgcs-ink); }
.tcgc-share .tcgc-share__btn:active { transform: scale(0.97); }
.tcgc-share .tcgc-share__btn:focus-visible { outline: 3px solid var(--tcgcs-focus); outline-offset: 2px; }
.tcgc-share .tcgc-share__btn[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--tcgcs-icon); }
.tcgc-share .tcgc-share__ic { flex: none; width: 18px; height: 18px; color: var(--tcgcs-icon); }
@media (hover: hover) and (pointer: fine) {
  .tcgc-share .tcgc-share__btn:hover { background: var(--tcgcs-hover); box-shadow: inset 0 0 0 1.5px var(--tcgcs-icon); }
}

/* ---------- меню ---------- */
.tcgc-share .tcgc-share__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: 232px;
  margin: 0;
  padding: 6px;
  border-radius: 16px;
  background: var(--tcgcs-menu);
  box-shadow: 0 0 0 1px var(--tcgcs-menu-line), 0 18px 40px -14px rgba(11, 35, 64, 0.38), 0 4px 10px -4px rgba(11, 35, 64, 0.16);
  text-align: left;
}
.tcgc-share .tcgc-share__menu[hidden] { display: none; }
.tcgc-share .tcgc-share__menu.is-up { top: auto; bottom: calc(100% + 8px); }
.tcgc-share .tcgc-share__item {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  color: var(--tcgcs-ink);
  font: 600 15.5px/1.2 "TCGC Golos", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.tcgc-share .tcgc-share__item:hover, .tcgc-share .tcgc-share__item:focus { color: var(--tcgcs-ink); text-decoration: none; background: transparent; }
.tcgc-share .tcgc-share__item:focus-visible { outline: 2px solid var(--tcgcs-focus); outline-offset: -2px; background: var(--tcgcs-hover); }
.tcgc-share .tcgc-share__item:active { background: var(--tcgcs-hover); }
@media (hover: hover) and (pointer: fine) {
  .tcgc-share .tcgc-share__item:hover { background: var(--tcgcs-hover); }
}
.tcgc-share .tcgc-share__i { flex: none; width: 22px; height: 22px; }
.tcgc-share .tcgc-share__item--vk .tcgc-share__i { color: #0077FF; }
.tcgc-share .tcgc-share__item--tg .tcgc-share__i { color: #229ED9; }
.tcgc-share .tcgc-share__item--wa .tcgc-share__i { color: #1FAF54; }
/* разделитель перед «Скопировать ссылку» */
.tcgc-share .tcgc-share__item--copy { position: relative; margin-top: 7px; }
.tcgc-share .tcgc-share__item--copy::before { content: ""; position: absolute; left: 12px; right: 12px; top: -5px; height: 1px; background: var(--tcgcs-menu-line); pointer-events: none; }
.tcgc-share .tcgc-share__i--copy { color: var(--tcgcs-ink-2); }
.tcgc-share .tcgc-share__i--ok { display: none; color: #1E6B45; }
.tcgc-share .tcgc-share__item--copy.is-done .tcgc-share__i--copy { display: none; }
.tcgc-share .tcgc-share__item--copy.is-done .tcgc-share__i--ok { display: block; }
.tcgc-share .tcgc-share__item--copy.is-done { color: #1E6B45; }
.tcgc-share .tcgc-share__live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- страница конкурса: «Рассказать друзьям» рядом с главным действием вкладки ---------- */
.tcgc-land .tcgc-formslot__bar { display: grid; gap: 10px; }
.tcgc-land .tcgc-formslot__bar .tcgc-formslot__open { max-width: none; }
.tcgc-land .tcgc-tell { margin-top: 20px; }
.tcgc-land .tcgc-tell .tcgc-share { display: flex; }
/* 27.11 («много баблов»): рядом с жёлтой кнопкой второстепенное действие - текстом со значком, без рамки */
.tcgc-land .tcgc-share--tell .tcgc-share__btn,
.tcgc-land .tcgc-share--tell .tcgc-share__btn:hover,
.tcgc-land .tcgc-share--tell .tcgc-share__btn:focus,
.tcgc-land .tcgc-share--tell .tcgc-share__btn[aria-expanded="true"] { min-height: 48px; padding: 0 12px; background: transparent; box-shadow: none; font-size: 16.5px; }
.tcgc-land .tcgc-share--tell .tcgc-share__btn[aria-expanded="true"] { color: var(--tcgcs-icon); }
@media (hover: hover) and (pointer: fine) { .tcgc-land .tcgc-share--tell .tcgc-share__btn:hover { color: var(--tcgcs-icon); } }
@media (min-width: 600px) {
  .tcgc-land .tcgc-formslot__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
  .tcgc-land .tcgc-formslot__bar .tcgc-formslot__open { flex: 0 1 420px; max-width: 420px; }
  .tcgc-land .tcgc-formslot__bar .tcgc-share--tell { flex: none; }
  .tcgc-land .tcgc-tell .tcgc-share { display: inline-flex; }
  .tcgc-land .tcgc-tell .tcgc-share__btn { margin-left: -12px; }
}
/* 600-767 (R3 25.11): жёлтая кнопка в 420 px не оставляла места соседке, и «Рассказать друзьям» уходила на вторую строку.
   Здесь обе в одну строку: жёлтая занимает всё, что осталось. */
@media (min-width: 600px) and (max-width: 767px) {
  .tcgc-land .tcgc-formslot__bar { flex-wrap: nowrap; }
  .tcgc-land .tcgc-formslot__bar .tcgc-formslot__open { flex: 1 1 0; max-width: none; min-width: 0; }
}
@media (min-width: 900px) { .tcgc-land .tcgc-tell { margin-top: 28px; } }

/* ---------- после отправки: «Расскажите о конкурсе друзьям» ---------- */
.tcgc .tcgc-done-share {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--c-blue-soft, #EAF6FC);
}
.tcgc .tcgc-done-share-t { margin: 0; color: var(--c-text, #0B2340); font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.tcgc .tcgc-done-share .tcgc-share { display: flex; }
.tcgc .tcgc-done-share .tcgc-share__btn { --tcgcs-line: var(--c-blue-line, #9ED8F2); min-height: 48px; }
@media (min-width: 560px) {
  .tcgc .tcgc-done-share { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 12px 12px 12px 18px; }
  .tcgc .tcgc-done-share .tcgc-share__btn { padding: 0 22px; }
}

/* ---------- доска: кнопка в окне просмотра работы, на бумаге карточки ---------- */
.tcgc-share--board { --tcgcs-bg: transparent; --tcgcs-line: rgba(11, 35, 64, 0.26); --tcgcs-hover: rgba(1, 160, 226, 0.1); }
.tcgc-share--board .tcgc-share__btn { min-height: 44px; padding: 0 18px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .tcgc-share .tcgc-share__btn { transition: background-color 150ms ease, box-shadow 150ms ease; }
  .tcgc-share .tcgc-share__btn:active { transform: none; }
}

/* ---------- тёмная тема сайта ---------- */
@media (prefers-color-scheme: dark) {
  html:has(#tcg-dark-css) .tcgc-share {
    --tcgcs-ink: #ececee;
    --tcgcs-ink-2: #b4b4bb;
    --tcgcs-icon: #4cc3f5;
    --tcgcs-line: #3a3b41;
    --tcgcs-hover: #2a2b30;
    --tcgcs-bg: #1f2024;
    --tcgcs-menu: #1f2024;
    --tcgcs-menu-line: #34353b;
    --tcgcs-focus: #4cc3f5;
  }
  html:has(#tcg-dark-css) .tcgc-share .tcgc-share__menu { box-shadow: 0 0 0 1px var(--tcgcs-menu-line), 0 18px 40px -14px #000; }
  html:has(#tcg-dark-css) .tcgc-share .tcgc-share__item--vk .tcgc-share__i { color: #5aa2ff; }
  html:has(#tcg-dark-css) .tcgc-share .tcgc-share__item--wa .tcgc-share__i { color: #3ed07a; }
  html:has(#tcg-dark-css) .tcgc-share .tcgc-share__i--ok, html:has(#tcg-dark-css) .tcgc-share .tcgc-share__item--copy.is-done { color: #6fd39b; }
  html:has(#tcg-dark-css) .tcgc .tcgc-done-share .tcgc-share__btn { --tcgcs-bg: #1a1b1f; --tcgcs-line: rgba(76, 195, 245, 0.45); }
  /* окно просмотра работы остаётся бумажным (светлым): кнопка тёмным по светлому, меню тёмное */
  html:has(#tcg-dark-css) .tcgc-share--board { --tcgcs-ink: #0B2340; --tcgcs-icon: #0077A8; --tcgcs-line: rgba(11, 35, 64, 0.3); --tcgcs-bg: transparent; --tcgcs-hover: rgba(1, 160, 226, 0.12); --tcgcs-focus: #0079b0; }
  html:has(#tcg-dark-css) .tcgc-share--board .tcgc-share__menu { --tcgcs-ink: #ececee; --tcgcs-ink-2: #b4b4bb; --tcgcs-hover: #2a2b30; --tcgcs-focus: #4cc3f5; }
}

@media print { .tcgc-share { display: none !important; } }
