/* ── Share bar ───────────────────────────────────────────── */

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hero-share {
  position: relative;
  margin-top: 16px;
}

.record-share {
  max-width: 900px;
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #ece6dc;
  border-left: 4px solid var(--saffron);
  border-radius: 10px;
  background: #fff8ef;
  box-shadow: 0 12px 28px rgba(21, 29, 38, .07);
}

.record-share .share-actions {
  gap: 8px;
}

@media (max-width: 900px) {
  .hero-share {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-share .share-btn {
    min-height: 34px;
    padding: 5px 12px;
    font-size: 12px;
  }

  .record-share {
    padding: 12px;
  }

  .record-share .share-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .record-share .share-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
    scroll-snap-align: start;
  }

  .record-share .share-sound {
    min-width: 112px;
  }
}

.share-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd3da;
  border-radius: 999px;
  color: #222830;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.share-btn:hover,
.share-btn:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.share-btn.share-wa:hover { background: #128c3e; border-color: #128c3e; }
.share-btn.share-fb:hover { background: #1a56b0; border-color: #1a56b0; }

/* ── Support page ────────────────────────────────────────── */

.support-options {
  display: grid;
  gap: 14px;
}

.donor-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.donor-footnote {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.support-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: card-in 0.32s ease both;
}

.support-rank {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  background: #f2efe8;
  border: 1px solid #d9d2c7;
  border-radius: 999px;
  color: var(--rss);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.support-card h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.support-card p {
  margin-bottom: 12px;
  color: #37312c;
  font-size: 14px;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fbfaf8;
  border: 1px solid #ebdcd0;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(223, 107, 43, 0.04);
  transition: all 0.25s ease;
}

.support-qr:hover {
  border-color: var(--bjp) !important;
  box-shadow: 0 6px 18px rgba(223, 107, 43, 0.08);
  transform: translateY(-1px);
}

.support-qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  background: repeating-conic-gradient(#eef2f4 0 25%, #ffffff 0 50%) 0 0 / 24px 24px;
  border: 1px dashed #b7c0c8;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.support-qr img {
  width: 128px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-qr span {
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 720px) {
  .support-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .donor-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .donor-quick-actions .text-button {
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .donor-options {
    gap: 10px;
  }

  .donor-options .support-card {
    padding: 16px;
    border-radius: 12px;
  }

  .donor-options .support-card h3 {
    font-size: 18px;
  }
}

/* ── Author link styling ───────────────────────────────────── */

.author-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  position: relative;
  text-decoration: underline;
  text-decoration-color: rgba(255, 103, 31, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  color: var(--ink);
}

/* ── Support QR image ──────────────────────────────────────── */

.server-fund-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  margin-top: 20px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.server-fund-qr:hover {
  border-color: #d1c4b7;
  background: #f4efea;
}

.server-fund-qr-placeholder {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.02);
  flex-shrink: 0;
}

.server-fund-qr span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.server-fund-qr-image {
  width: 110px;
  height: 110px;
  border: 1px solid #dfd5cb;
  border-radius: 8px;
  padding: 4px;
  background: #fff;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.server-fund-qr:hover .server-fund-qr-image {
  transform: scale(1.03);
}

.server-fund-qr-info {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-fund-qr-info strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.server-fund-qr-info small {
  display: block;
  font-family: monospace;
  font-size: 13px;
  color: var(--ink);
  background: rgba(0,0,0,0.04);
  padding: 4px 8px;
  border-radius: 4px;
}

.server-fund-qr-info .upi-app-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #138808;
}

.upi-id-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.copy-upi-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.copy-upi-btn:hover,
.copy-upi-btn:focus-visible {
  border-color: var(--bjp);
  box-shadow: 0 8px 18px rgba(255, 103, 31, 0.16);
  transform: translateY(-1px);
}

.copy-upi-btn.is-copied {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

.author-link:hover {
  text-decoration-color: var(--bjp);
}

.link-icon {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.9em;
  opacity: 0.6;
}

.author-link:hover .link-icon {
  opacity: 1;
  animation: link-bounce 0.4s ease;
}

@keyframes link-bounce {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(2px) translateY(-2px); }
}

/* ── Support QR image ──────────────────────────────────────── */

.support-qr-image {
  width: 110px;
  height: 110px;
  border: 1px solid #dfd5cb;
  border-radius: 8px;
  padding: 4px;
  background: #fff;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.support-qr:hover .support-qr-image {
  transform: scale(1.03);
}

.support-qr-info {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.support-qr-info strong {
  display: block;
  color: var(--bjp);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.support-qr-info small {
  display: block;
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.4;
}

.support-qr-info .upi-app-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(37, 211, 102, 0.1);
  color: #128c7e;
  border-radius: 99px;
  font-weight: 750;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Share icons (brand colours) ─────────────────────────── */

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #cbd3da;
  border-radius: 999px;
  color: #222830 !important;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.share-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.share-btn:hover svg {
  transform: scale(1.1);
}

.share-btn.share-wa {
  border-color: rgba(37, 211, 102, 0.45);
}
.share-btn.share-wa svg {
  color: #25d366;
}
.share-btn.share-wa:hover {
  background: #25d366 !important;
  border-color: #25d366 !important;
  color: #ffffff !important;
}
.share-btn.share-wa:hover svg {
  color: #ffffff;
}

.share-btn.share-x {
  border-color: rgba(15, 20, 25, 0.35);
}
.share-btn.share-x svg {
  color: #0f1419;
}
.share-btn.share-x:hover {
  background: #0f1419 !important;
  border-color: #0f1419 !important;
  color: #ffffff !important;
}
.share-btn.share-x:hover svg {
  color: #ffffff;
}

.share-btn.share-fb {
  border-color: rgba(24, 119, 242, 0.4);
}
.share-btn.share-fb svg {
  color: #1877f2;
}
.share-btn.share-fb:hover {
  background: #1877f2 !important;
  border-color: #1877f2 !important;
  color: #ffffff !important;
}
.share-btn.share-fb:hover svg {
  color: #ffffff;
}

.share-btn.share-li {
  border-color: rgba(10, 102, 194, 0.42);
}
.share-btn.share-li svg {
  color: #0a66c2;
}
.share-btn.share-li:hover {
  background: #0a66c2 !important;
  border-color: #0a66c2 !important;
  color: #ffffff !important;
}
.share-btn.share-li:hover svg {
  color: #ffffff;
}

.share-btn.share-tg {
  border-color: rgba(42, 171, 238, 0.42);
}
.share-btn.share-tg svg {
  color: #229ed9;
}
.share-btn.share-tg:hover {
  background: #229ed9 !important;
  border-color: #229ed9 !important;
  color: #ffffff !important;
}
.share-btn.share-tg:hover svg {
  color: #ffffff;
}

.share-btn.share-ig {
  border-color: rgba(225, 48, 108, 0.4);
}
.share-btn.share-ig svg {
  color: #e1306c;
}
.share-btn.share-ig:hover {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%) !important;
  border-color: #d6249f !important;
  color: #ffffff !important;
}
.share-btn.share-ig:hover svg {
  color: #ffffff;
}

.share-btn.share-copy {
  border-color: #cbd3da;
}
.share-btn.share-copy svg {
  color: var(--muted);
}
.share-btn.share-copy:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #ffffff !important;
}
.share-btn.share-copy:hover svg {
  color: #ffffff;
}

.share-btn.share-copy.is-copied {
  background: #138808 !important;
  border-color: #138808 !important;
  color: #ffffff !important;
}
.share-btn.share-copy.is-copied svg {
  color: #ffffff;
}

.share-btn.share-native {
  border-color: rgba(255, 153, 51, 0.46);
}
.share-btn.share-native svg {
  color: var(--saffron);
}
.share-btn.share-native:hover {
  background: var(--saffron) !important;
  border-color: var(--saffron) !important;
  color: #171717 !important;
}
.share-btn.share-native:hover svg {
  color: #171717;
}
.share-btn.share-native.is-copied {
  background: #138808 !important;
  border-color: #138808 !important;
  color: #ffffff !important;
}
.share-btn.share-native.is-copied svg {
  color: #ffffff;
}

/* ── UI Alignments & Spacing Fixes ─────────────────────────── */
@media (min-width: 960px) {
  .topnav {
    gap: 12px !important;
  }
  .topnav a {
    padding: 8px 16px !important;
    font-size: 13.5px !important;
  }
}

.stats-toolbar {
  align-items: end !important;
}

.stats-toolbar .clear-filters-button {
  margin-bottom: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
}

.stats-result {
  padding-bottom: 12px !important;
  align-self: end !important;
}
