/* share-card.css - "Share my progress" (C179, with js/share-card.js). Prefix sc-. Uses the app tokens (skin.css / brand/tokens.css). */

/* the entry buttons the script adds (Profile player card, onboarding reveal, Today's training end card) */
.sc-row { display: flex; justify-content: flex-start; margin-top: 14px; }
.sc-open { display: inline-flex; align-items: center; gap: 8px; }
.sc-open svg { width: 18px; height: 18px; flex: none; }
.sc-open-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 44px; margin-top: 6px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--accent-text, #F5B83D); font: inherit; font-weight: 700; font-size: var(--fs-sm, 13.5px); cursor: pointer;
}
.sc-open-link:hover { background: var(--accent-soft, rgba(245, 184, 61, .16)); }
.sc-open-link:focus-visible, .sc-open:focus-visible { outline: 2px solid var(--accent, #F5B83D); outline-offset: 2px; }
.sc-open-link svg { width: 18px; height: 18px; flex: none; }

/* the sheet */
.sc-back {
  position: fixed; inset: 0; z-index: 100030; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 8, 16, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: sc-fade .18s ease-out;
}
.sc-sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface, #161D30); color: var(--text, #F4EFE4);
  border: 1px solid var(--border-strong, rgba(244, 239, 228, .15)); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-3, 0 26px 70px rgba(0, 0, 0, .62));
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: sc-up .24s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 720px) {
  .sc-back { align-items: center; padding: 24px; }
  .sc-sheet { border-radius: 22px; border-bottom: 1px solid var(--border-strong, rgba(244, 239, 228, .15)); padding: 22px 24px 24px; max-height: calc(100vh - 48px); }
}
.sc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sc-head h2 { margin: 0; font-size: var(--fs-md, 18px); font-weight: 800; flex: 1; min-width: 0; }
.sc-x {
  flex: none; width: 44px; height: 44px; margin: -6px -8px -6px 0; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2, #B9BFCF); cursor: pointer;
}
.sc-x:hover { background: var(--surface-2, #1F2840); color: var(--text, #F4EFE4); }
.sc-x svg { width: 20px; height: 20px; }

.sc-prev {
  position: relative; display: flex; justify-content: center; align-items: center; margin: 0 auto 14px;
  padding: 12px; border-radius: 16px; background: var(--well, #0A0E1A); border: 1px solid var(--border, rgba(244, 239, 228, .08));
}
.sc-prev img {
  display: block; height: auto; max-width: 100%; max-height: 52vh; width: auto; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); background: #0A0E1A; aspect-ratio: 1080 / 1350;
}
.sc-prev[data-format="story"] img { aspect-ratio: 1080 / 1920; }
.sc-prev.is-busy img { opacity: .55; transition: opacity .15s; }

.sc-ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.sc-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2, #1F2840); border: 1px solid var(--border, rgba(244, 239, 228, .08)); }
.sc-seg button {
  min-height: 38px; min-width: 76px; padding: 6px 14px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-2, #B9BFCF); font: inherit; font-weight: 700; font-size: var(--fs-sm, 13.5px); cursor: pointer;
}
.sc-seg button[aria-pressed="true"] { background: var(--surface, #161D30); color: var(--text, #F4EFE4); box-shadow: var(--shadow-1); }
.sc-seg button:focus-visible { outline: 2px solid var(--accent, #F5B83D); outline-offset: 1px; }
.sc-seg small { font-weight: 600; color: var(--text-3, #8F98AE); margin-left: 4px; }

.sc-name { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm, 13.5px); color: var(--text, #F4EFE4); }
.sc-name input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent, #F5B83D); cursor: pointer; }

.sc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-acts .btn { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sc-acts .btn svg { width: 18px; height: 18px; flex: none; }
.sc-acts .sc-main { grid-column: 1 / -1; }
.sc-note { margin: 12px 0 0; text-align: center; color: var(--text-3, #8F98AE); font-size: var(--fs-xs, 12px); line-height: 1.45; }
.sc-status { min-height: 1.2em; margin: 10px 0 0; text-align: center; font-size: var(--fs-sm, 13.5px); font-weight: 700; color: var(--good, #4CC38A); }
.sc-status.is-err { color: var(--bad, #FF6B6B); }

@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sc-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-back, .sc-sheet { animation: none; } }
