/* Phase 3: Collapsible Video Tip & Motion Guide Drawers */
.video-tip-drawer {
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, rgba(13, 19, 34, 0.96), rgba(9, 13, 24, 0.99));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-tip-drawer[open] {
  border-color: rgba(168, 85, 247, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(168, 85, 247, 0.2);
}

.video-tip-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: rgba(168, 85, 247, 0.08);
  transition: background 0.15s ease;
}
.video-tip-summary::-webkit-details-marker { display: none; }
.video-tip-summary:hover { background: rgba(168, 85, 247, 0.14); }

.video-summary-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
}

.video-summary-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: #d8b4fe;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.video-tip-body {
  padding: 0.9rem 0.95rem 1rem;
  border-top: 1px solid rgba(168, 85, 247, 0.24);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.video-drawer-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding-bottom: 0.55rem;
}

.video-tab-group { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.video-tab-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.42rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.video-tab-btn:hover { border-color: #c084fc; color: var(--text-primary); }
.video-tab-btn.is-active { background: rgba(168, 85, 247, 0.2); border-color: #c084fc; color: #f3e8ff; }
.video-tab-pane.is-hidden { display: none; }

/* Motion Canvas Stage & Controls */
.motion-player-box {
  background: #070b14;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 8px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
}

.motion-canvas-wrap {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at 50% 45%, #111c33 0%, #070b14 100%);
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 6px;
  overflow: hidden;
}

.motion-canvas { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }

.motion-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.motion-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.34rem 0.68rem;
  border-radius: 5px;
  cursor: pointer;
}
.motion-btn.is-active { background: rgba(16, 185, 129, 0.2); border-color: #34d399; color: #a7f3d0; }
.motion-scrubber { flex: 1; min-width: 120px; accent-color: #38bdf8; cursor: pointer; }
.motion-timecode { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.75rem; color: #38bdf8; min-width: 76px; text-align: right; }

/* 3 Timestamped Keyframe Coaching Callouts */
.keyframe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.55rem; }
.keyframe-card {
  text-align: left;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
}
.keyframe-card:hover, .keyframe-card.is-active { border-color: #38bdf8; background: rgba(56, 189, 248, 0.11); color: var(--text-primary); }
.keyframe-time { display: inline-block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.7rem; font-weight: 700; color: #38bdf8; background: rgba(56, 189, 248, 0.14); padding: 0.1rem 0.4rem; border-radius: 4px; margin-bottom: 0.25rem; }
.keyframe-label { display: block; font-size: 0.77rem; line-height: 1.38; }

/* YouTube / Custom Video Tab & Pro-Tip Mistake Badge */
.custom-video-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.custom-video-input { flex: 1 1 220px; min-width: 0; }
.video-embed-frame { width: 100%; max-width: 760px; aspect-ratio: 16 / 9; max-height: 410px; border: 1px solid rgba(168, 85, 247, 0.35); border-radius: 8px; background: #050811; display: block; margin: 0 auto; }
.coaching-note-box { background: rgba(56, 189, 248, 0.08); border-left: 3px solid #38bdf8; padding: 0.55rem 0.75rem; border-radius: 5px; font-size: 0.79rem; color: var(--text-secondary); line-height: 1.45; }
.mistake-badge-box { display: flex; align-items: flex-start; gap: 0.6rem; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.38); border-radius: 7px; padding: 0.6rem 0.8rem; font-size: 0.8rem; color: #fecaca; line-height: 1.42; }

@media (max-width: 768px) {
  .video-tab-group { width: 100%; }
  .video-tab-btn { flex: 1 1 100%; text-align: center; min-height: 42px; }
  .keyframe-grid { grid-template-columns: 1fr; }
  .custom-video-controls .btn { width: 100%; min-height: 44px; }
}
