/* YouTube-style Share sheet (light theme to match app) */

/* Hide legacy icon rows; QR-bearing containers keep a compact layout */
.share-container:not(.yt-share-keep),
.shareFlexIcons,
.shareDiv,
.sharecontainer {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.share-container.yt-share-keep {
  display: none;
  padding: 12px !important;
  text-align: center;
}

.share-container.yt-share-keep > a {
  display: none !important;
}

.share-container.yt-share-keep .showafter,
.share-container.yt-share-keep .fa-download {
  display: inline-block;
}

.yt-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.45);
  font-family: Poppins, Roboto, sans-serif;
}

.yt-share-overlay.is-open {
  display: flex;
}

.yt-share-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  padding: 18px 16px 16px;
  box-sizing: border-box;
  color: #0f172a;
  animation: ytShareIn 0.22s ease-out;
}

@keyframes ytShareIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.yt-share-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.yt-share-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.yt-share-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yt-share-close:hover {
  background: #e2e8f0;
}

.yt-share-apps-wrap {
  position: relative;
  margin-bottom: 16px;
}

.yt-share-apps {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.yt-share-apps::-webkit-scrollbar {
  display: none;
}

.yt-share-app {
  flex: 0 0 auto;
  width: 64px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.yt-share-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin: 0 auto 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.yt-share-icon--embed {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -1px;
}

.yt-share-icon--messages {
  background: #fff;
  color: #3b82f6;
  border: 1px solid #e2e8f0;
}

.yt-share-icon--whatsapp {
  background: #25d366;
}

.yt-share-icon--facebook {
  background: #1877f2;
}

.yt-share-icon--x {
  background: #0f172a;
}

.yt-share-icon--instagram {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.yt-share-icon--more {
  background: #64748b;
}

.yt-share-icon--email {
  background: #64748b;
}

.yt-share-icon--linkedin {
  background: #0a66c2;
}

.yt-share-icon--skype {
  background: #00aff0;
}

.yt-share-label {
  display: block;
  font-size: 11px;
  color: #475569;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-share-scroll-btn {
  position: absolute;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.yt-share-scroll-btn--left {
  left: 0;
}

.yt-share-scroll-btn--right {
  right: 0;
}

.yt-share-apps-wrap.can-scroll-left .yt-share-scroll-btn--left,
.yt-share-apps-wrap.can-scroll-right .yt-share-scroll-btn--right {
  display: inline-flex;
}

.yt-share-apps-wrap.can-scroll-left .yt-share-apps {
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 100%);
}

.yt-share-apps-wrap.can-scroll-right .yt-share-apps {
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
}

.yt-share-apps-wrap.can-scroll-left.can-scroll-right .yt-share-apps {
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.yt-share-link-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  box-sizing: border-box;
}

.yt-share-url {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-share-copy {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.yt-share-copy:hover,
.yt-share-copy.is-copied {
  background: #07a5fa;
  border-color: #07a5fa;
  color: #fff;
}

@media (min-width: 768px) {
  .yt-share-overlay {
    align-items: center;
  }

  .yt-share-panel {
    max-width: 480px;
  }
}

html[data-theme="dark"] .yt-share-overlay {
  background: rgba(2, 6, 23, 0.62);
}

html[data-theme="dark"] .yt-share-panel {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .yt-share-title {
  color: #f8fafc;
}

html[data-theme="dark"] .yt-share-close {
  background: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .yt-share-close:hover {
  background: #475569;
}

html[data-theme="dark"] .yt-share-label {
  color: #94a3b8;
}

html[data-theme="dark"] .yt-share-icon--embed {
  background: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] .yt-share-icon--messages {
  background: #0f172a;
  color: #38bdf8;
  border-color: #475569;
}

html[data-theme="dark"] .yt-share-scroll-btn {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}

html[data-theme="dark"] .yt-share-link-bar {
  background: #0f172a;
}

html[data-theme="dark"] .yt-share-url {
  color: #e2e8f0;
}

html[data-theme="dark"] .yt-share-copy {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}

html[data-theme="dark"] .yt-share-copy:hover,
html[data-theme="dark"] .yt-share-copy.is-copied {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
