/* ============================================
   FINISH POPUP + SHARE CARD / SHARE MODAL
============================================ */

/* ---------- Finish confirmation popup ---------- */
.finish-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(60, 50, 70, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 10000;
}
.finish-modal {
  background: #faf7f2;
  border-radius: 28px;
  padding: 2rem 2rem 1.5rem;
  width: 100%; max-width: 420px;
}
.finish-modal-title { margin: 0 0 0.4rem; font-size: 1.5rem; color: #3b2f4f; }
.finish-modal-sub   { margin: 0 0 1.2rem; color: #8a8076; font-size: 1.05rem; }

.finish-stats {
  background: #efe6dc;
  border-radius: 18px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.finish-stat-row { display: flex; align-items: center; gap: 0.9rem; font-size: 1.15rem; color: #3b2f4f; }

.finish-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.finish-icon.completed { background: #3fae7a; }
.finish-icon.completed::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.finish-icon.skipped { background: #ecb927; }
.finish-icon.skipped::before,
.finish-icon.skipped::after {
  content: ""; position: absolute;
  width: 12px; height: 2.5px; background: #fff; border-radius: 2px;
}
.finish-icon.skipped::before { transform: rotate(45deg); }
.finish-icon.skipped::after  { transform: rotate(-45deg); }
.finish-icon.untouched { background: transparent; border: 2px solid #b9b0a6; }

.finish-primary-btn, .finish-secondary-btn {
  width: 100%; border-radius: 12px; padding: 0.9rem;
  font-size: 1.05rem; font-weight: 700; color: #3b2f4f; cursor: pointer;
}
.finish-primary-btn { background: #c9b6e2; border: none; margin-bottom: 0.7rem; }
.finish-primary-btn:disabled { opacity: 0.6; }
.finish-secondary-btn { background: transparent; border: 1.5px solid #ddd2c4; }

/* ---------- Share section ---------- */
.share-section {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid #eee6da;
}
.share-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #4b3f5c;
  margin: 0 0 0.8rem;
}
.share-mode-toggle {
  display: flex;
  gap: 6px;
  background: #eee6da;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1rem;
}
.share-mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8a8073;
  cursor: pointer;
}
.share-mode-btn.active { background: #fff; color: #4b3f5c; }
.share-mode-btn:disabled { cursor: not-allowed; }

.share-achievement-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}
.share-achievement-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f2ede4;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b3f5c;
}
.share-achievement-option.selected { background: #c6b7e2; color: #3f3550; }

.share-colorway-row {
  display: flex;
  gap: 14px;
  margin-bottom: 1.2rem;
}
.share-colorway-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.share-colorway-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(138, 128, 115, 0.35);
  display: block;
  box-sizing: border-box;
}
.share-colorway-swatch.active .share-colorway-dot {
  border: 2px solid #4b3f5c;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4b3f5c;
}
.share-colorway-swatch span { font-size: 0.72rem; font-weight: 600; color: #8a8073; }
.share-colorway-swatch.active span { color: #4b3f5c; }

/* ---------- Share card ---------- */
.share-card {
  width: 320px;
  max-width: 100%;
  border-radius: 26px;
  padding: 24px 22px 20px;
  margin: 0 auto 1rem;
  box-shadow: 0 16px 40px -18px rgba(63,53,80,0.35);
  position: relative;
  box-sizing: border-box;
}
.share-card-logo { position: absolute; top: 16px; right: 20px; width: 70px; height: auto; }
.share-card-eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.share-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 4px 84px 14px 0;   /* clears the 70px logo + gap */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-card-stats { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid; }
.share-card-stat-value { font-size: 1.1rem; font-weight: 700; text-align: center; }
.share-card-stat-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; margin-top: 2px; }
.share-card-achievement { display: flex; flex-direction: column; align-items: center; padding: 16px 0 4px; }
.share-card-achievement-icon { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.share-card-achievement-detail { font-size: 0.78rem; font-weight: 600; }
.share-card-achievement-stat { font-size: 1.8rem; font-weight: 700; margin-top: 2px; }
.share-card-achievement-label { font-size: 0.9rem; font-weight: 600; margin-top: 4px; }

/* ---------- Share modal ---------- */
.share-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.share-modal-panel {
  background: #faf7f2;
  border-radius: 22px;
  padding: 1.4rem 1.3rem;
  width: 340px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 16px 40px -18px rgba(63,53,80,0.35);
  box-sizing: border-box;
}
.share-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #4b3f5c;
  cursor: pointer;
}
/* "Show aerobic" choice under the colorways (only for workouts with aerobic) */
.share-aerobic-toggle { display: flex; align-items: center; gap: 0.45rem; margin: -0.6rem 0 1.1rem; font-size: 0.85rem; color: #4b3f5c; cursor: pointer; }
.share-aerobic-toggle input { width: 18px; height: 18px; accent-color: #7c5cbf; margin: 0; }
