/* Share-workout sheet chrome only. ShareCard.tsx provides the live preview;
   Django/Pillow produces the downloaded PNG. Sheet shell (cp-sheet) comes
   from ui.css via BottomSheet. */

/* Head row is hidden (BottomSheet hideHead) — Share/Close live in the body. */
.share-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.share-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
}

.share-loading {
  padding: 32px 8px;
  text-align: center;
  color: var(--slate);
  font-family: var(--font);
  font-size: var(--fs-lg);
}

/* Flat frame around the scaled preview (Level 0 — border only). */
.share-preview-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #0c0d12; /* matches the card's darkest gradient stop */
}

/* Tells the user the dark backdrop is preview-only: share_card.py renders
   every variant on an empty RGBA canvas, so the saved PNG has no background. */
.share-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  pointer-events: none;
}

/* Mirrors .share-badge to the right edge — same inset and pill treatment, but
   tappable: it copies the PNG straight to the clipboard (useShareCard.copyCard),
   which the native share sheet's own Copy action cannot do reliably on iOS. */
.share-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.share-copy:active {
  background: rgba(255, 255, 255, 0.28);
}

.share-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

.share-carousel::-webkit-scrollbar { display: none; }

.share-carousel-track {
  display: flex;
}

.share-carousel-page {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  scroll-snap-align: start;
}

/* Sized to the scaled card so the frame hugs it (no extra space below). */
.share-preview-scale {
  overflow: hidden;
}

/* Page dots — decorative only; the carousel itself is the control. */
.share-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.share-dot.active {
  width: 16px;
  background: var(--blue);
}

.share-error {
  color: #c0392b;
  font-family: var(--font);
  font-size: var(--fs-md);
  text-align: center;
}

/* Post-finish share offer. It is portaled to body for iOS-safe fixed positioning. */
.share-offer-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-offer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
}

.share-offer-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 24px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.share-offer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--slate);
  font-size: var(--fs-3xl);
  line-height: 1;
  cursor: pointer;
}
.share-offer-close:hover { color: var(--blue); }

.share-offer-title {
  margin-bottom: 8px;
  font-size: var(--fs-4xl);
  line-height: 1.1;
  color: var(--ink);
}

.share-offer-copy {
  margin-bottom: 18px;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--slate);
}

.share-offer-actions {
  display: grid;
  gap: 10px;
}
