/* ==========================================================================
   7. SHARE MODAL (ShareThis)
   ========================================================================== */

.center, .st-custom-buttons-close {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Modal overlay --- */

/* Share modal must sit above ALL other modals (publisher, donate, TIM, etc.)
   so that sharing from inside another modal always takes top billing. */
.st-custom-buttons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 600000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.3s;
}

.st-custom-buttons.active {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}

/* --- Modal wrapper --- */

.st-custom-buttons-wrp {
  position: relative;
  background: var(--so-white);
  border-radius: 20px;
  padding: 48px 40px 40px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.st-custom-buttons.active .st-custom-buttons-wrp {
  transform: scale(1) translateY(0);
}

/* --- Modal title --- */

.st-custom-buttons-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--so-dark);
  margin-bottom: 28px;
  text-align: center;
}

/* --- Close button --- */

.st-custom-buttons-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 33333;
  width: 36px;
  height: 36px;
  background: var(--so-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.st-custom-buttons-close svg {
  width: 14px;
  height: 14px;
}

.st-custom-buttons-close:hover {
  background: var(--so-blue);
  transform: scale(1.05);
}

/* --- ShareThis button grid --- */

.st-custom-buttons .sharethis-inline-share-buttons {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 20px;
}

.st-custom-buttons .st-btn[data-network="skype"] {
  display: none !important;
}

.st-custom-buttons .st-btn {
  width: 100% !important;
  min-width: unset !important;
  height: auto !important;
  border-radius: 12px !important;
  margin: 0 !important;
  padding: 16px 8px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  transition: 0.15s !important;
  background: #e8f0fe !important;
  border: 1px solid #d0e0fc !important;
  box-sizing: border-box !important;
  opacity: 1;
  transform: none;
}

.st-custom-buttons .st-btn > img,
.st-custom-buttons .st-btn > svg {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) !important;
}

.st-custom-buttons .st-btn:hover {
  transform: translateY(-2px) !important;
  border-color: var(--so-blue) !important;
  background: #f8f9ff !important;
}

/* --- Social network labels (::after pseudo-elements) --- */

.st-custom-buttons .st-btn::after {
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.2;
}

.st-custom-buttons .st-btn[data-network="facebook"]::after { content: 'Facebook'; }
.st-custom-buttons .st-btn[data-network="twitter"]::after { content: 'Twitter'; }
.st-custom-buttons .st-btn[data-network="x"]::after { content: 'X'; }
.st-custom-buttons .st-btn[data-network="linkedin"]::after { content: 'LinkedIn'; }
.st-custom-buttons .st-btn[data-network="email"]::after { content: 'Email'; }
.st-custom-buttons .st-btn[data-network="whatsapp"]::after { content: 'WhatsApp'; }
.st-custom-buttons .st-btn[data-network="telegram"]::after { content: 'Telegram'; }
.st-custom-buttons .st-btn[data-network="messenger"]::after { content: 'Messenger'; }
.st-custom-buttons .st-btn[data-network="pinterest"]::after { content: 'Pinterest'; }
.st-custom-buttons .st-btn[data-network="reddit"]::after { content: 'Reddit'; }
.st-custom-buttons .st-btn[data-network="vk"]::after { content: 'VK'; }
.st-custom-buttons .st-btn[data-network="odnoklassniki"]::after { content: 'OK'; }
.st-custom-buttons .st-btn[data-network="ok"]::after { content: 'OK'; }
.st-custom-buttons .st-btn[data-network="viber"]::after { content: 'Viber'; }
.st-custom-buttons .st-btn[data-network="line"]::after { content: 'Line'; }
.st-custom-buttons .st-btn[data-network="gmail"]::after { content: 'Gmail'; }
.st-custom-buttons .st-btn[data-network="mailru"]::after { content: 'Mail.Ru'; }

/* --- Signal custom button --- */

.st-custom-buttons .st-signal-btn {
  width: 100% !important;
  min-width: unset !important;
  height: auto !important;
  border-radius: 12px !important;
  margin: 0 !important;
  padding: 16px 8px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  transition: 0.15s !important;
  background: #e8f0fe !important;
  border: 1px solid #d0e0fc !important;
  box-sizing: border-box !important;
  cursor: pointer;
}

.st-custom-buttons .st-signal-btn::after {
  content: 'Signal';
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
}

.st-custom-buttons .st-signal-btn svg {
  width: 32px !important;
  height: 32px !important;
}

.st-custom-buttons .st-signal-btn:hover {
  transform: translateY(-2px);
  border-color: var(--so-blue);
  background: #f8f9ff !important;
}

/* --- Extra buttons row (Copy Link) --- */

.st-custom-extra-buttons {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.st-extra-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 12px;
  border-radius: 12px;
  border: 1px solid #d0e0fc;
  background: #e8f0fe;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
  min-width: 100px;
  font-family: sans-serif;
}

.st-extra-btn svg {
  width: 32px;
  height: 32px;
  color: #1a1a1a;
}

.st-extra-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
}

.st-extra-btn:hover {
  border-color: var(--so-blue);
  background: #d0e0fc;
  transform: translateY(-2px);
}

/* --- Share modal: mobile responsive --- */

@media (max-width: 480px) {
  .st-custom-buttons .sharethis-inline-share-buttons {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .st-custom-buttons-wrp {
    padding: 40px 20px 24px;
  }
}
