/* Workout story composer — markup in index.html, logic in src/js/workout-story.js */
.wstory {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.wstory[hidden],
.wstory [hidden] { display: none !important; }
body.wstory-open { overflow: hidden; }

.wstory-sheet {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 9:16 preview of the story. Height-led so the buttons stay on screen. */
.wstory-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(60vh, 620px);
  max-width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #0f2318 0%, #060d0a 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  touch-action: none;
}
.wstory-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.wstory-sticker {
  position: absolute;
  transform: translate(-50%, -50%);
  height: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.wstory-sticker:active { cursor: grabbing; }

.wstory-hint {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
}

.wstory-photo-row { display: flex; gap: 10px; }
.wstory-photo-btn { flex: 1; }
.wstory-clear { flex: 0 0 auto; width: auto; padding: 0 18px; }

.wstory-ig { width: 100%; }
.wstory .story-save { white-space: nowrap; }
/* Save drops to the outline style when Instagram takes the filled button. */
.wstory .story-save.mx-outline { gap: 8px; padding: 0 14px; }
.wstory .story-save.mx-outline .mx-cta-icon { background: none; width: auto; height: auto; }

.wstory-link {
  background: none;
  border: 0;
  padding: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
