/* === TDN Social Nudge – Theme-aligned styles === */
.tdn-nudge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--tdn-z, 2147483000);
  pointer-events: none;
  transform: translate3d(0, 22px, 0);
  opacity: 0;
}
.tdn-nudge--open { transform: none; opacity: 1; }
.tdn-nudge--enter,
.tdn-nudge--leave { transition: transform 160ms ease, opacity 160ms ease; }
@media (prefers-reduced-motion: reduce) {
  .tdn-nudge--enter, .tdn-nudge--leave { transition: none; }
}

/* Card matches your post/grid cards */
.tdn-nudge__card {
  pointer-events: auto;
  width: min(380px, 92vw);
  background: var(--tdn-bg, #fff);
  color: var(--tdn-text, #0f0f0f);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: var(--tdn-radius, 10px);
  box-shadow: var(--tdn-card-shadow, 0 8px 24px rgba(0,0,0,0.08));
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.tdn-nudge--dark .tdn-nudge__card {
  --tdn-bg: #121212;
  --tdn-text: #f3f3f3;
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* Header and footer */
.tdn-nudge__header,
.tdn-nudge__footer {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
}
.tdn-nudge__header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.tdn-nudge--dark .tdn-nudge__header { border-bottom-color: rgba(255,255,255,0.16); }

.tdn-nudge__title {
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: .1px;
}

/* Close button */
.tdn-nudge__close {
  background: transparent; border: 0;
  font-size: 22px; line-height: 1;
  padding: 0 4px; color: inherit; cursor: pointer;
  opacity: .7;
}
.tdn-nudge__close:hover { opacity: 1; }

/* Body */
.tdn-nudge__body { padding: 12px 14px; }
.tdn-nudge__subtext {
  font-size: 14px; line-height: 1.45;
  opacity: .9; margin-bottom: 12px;
}

/* Social grid */
.tdn-nudge__social {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Buttons */
.tdn-nudge__btn {
  appearance: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px; line-height: 1.1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff; color: #111;
}
.tdn-nudge--dark .tdn-nudge__btn {
  background: #1b1b1b; color: #f3f3f3; border-color: rgba(255,255,255,0.14);
}

.tdn-nudge__btn--primary {
  border-color: var(--tdn-accent, #d5001f);
  color: var(--tdn-accent, #d5001f);
  background: color-mix(in srgb, var(--tdn-accent, #d5001f) 10%, transparent);
}
.tdn-nudge__btn--primary:hover {
  background: color-mix(in srgb, var(--tdn-accent, #d5001f) 18%, transparent);
}

/* Ghost buttons */
.tdn-nudge__btn--ghost {
  background: transparent;
  color: inherit;
  border-style: dashed;
  opacity: .85;
}
.tdn-nudge__btn--ghost:hover { opacity: 1; }

/* Footer border */
.tdn-nudge__footer {
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.tdn-nudge--dark .tdn-nudge__footer { border-top-color: rgba(255,255,255,0.16); }

/* Inline SVG icon sizing */
.tdn-nudge__icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  line-height: 0;
}
.tdn-nudge__icon svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: currentColor;
}

/* Mobile */
@media (max-width: 480px) {
  .tdn-nudge { right: 10px; left: 10px; bottom: 10px; }
  .tdn-nudge__card { width: 100%; }
  .tdn-nudge__social { grid-template-columns: 1fr; gap: 8px; }
  .tdn-nudge__title { font-size: 15px; }
}
