/* ============================================================
   CSS 16.08 — Animation options
   ============================================================
   animation-delay: 0.5s;                 wait before starting
   animation-iteration-count: 3;          run 3 times (or infinite)
   animation-direction: alternate;        go forward, then backward, …
   animation-fill-mode: forwards;         KEEP the last frame when it ends
                                          (without it, it jumps back to the start)
   All in one line:
     animation: fill 1.5s ease-out 0.3s forwards;
                name duration timing delay fill-mode
   ============================================================ */

/* 1. Progress bar that fills once and stays full */
@keyframes fill {
  from { width: 0; }
  to   { width: 70%; }
}

.progress-fill {
  width: 0;
  animation: fill 1.5s ease-out 0.3s forwards;
}

/* 2. Notifications that slide in one after another */
@keyframes slide-in {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.note {
  opacity: 0;                       /* hidden until its animation starts */
  animation: slide-in 0.5s ease-out forwards;
}

.n1 { animation-delay: 0.5s; }
.n2 { animation-delay: 1s; }
.n3 { animation-delay: 1.5s; }

/* 3. Swing left and right forever */
@keyframes swing {
  from { transform: translateX(0); }
  to   { transform: translateX(200px); }
}

.swing {
  animation: swing 1.2s ease-in-out infinite alternate;
}
/* Try it: delete  forwards  from .progress-fill → when it ends, the bar
   jumps back to empty. */


/* ------------------------------------------------------------
   Only to make the parts visible — not part of this lesson
   ------------------------------------------------------------ */
body { font-family: Arial, sans-serif; padding: 10px; }

.progress {
  max-width: 400px;
  height: 18px;
  background-color: #E4E4E4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  background-color: #1F9D55;
}

.note {
  max-width: 360px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background-color: #EEF3FF;
  border-left: 4px solid #2D62EF;
  border-radius: 8px;
}

.swing {
  width: 110px;
  margin-top: 24px;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  color: #FFFFFF;
  background-color: #FFAF04;
  border-radius: 10px;
}
