/* ============================================================
   CSS 04.09 — em : × the PARENT's font-size
   ============================================================
   1em = the font-size of the parent.
   font-size: 1.25em → 1.25 × the parent's font-size.
   Nested boxes multiply again and again:
     page 16px → level 1: 20px → level 2: 25px → level 3: 31.25px
   That "growing" surprise is why we rarely use em for font-size.
   ============================================================ */

.em-box {
  font-size: 1.25em;                /* 1.25 × the PARENT's font-size        */
  padding: 0.4em;                   /* em in padding = × this box's OWN font-size */
  margin-top: 0.4em;
}
/* Try it: change 1.25em to 1.5em → level 3 becomes 54px (16 × 1.5 × 1.5 × 1.5). */


/* Where em IS useful: padding that matches the text size.
   padding: 0.5em 1em → half a letter top/bottom, one letter left/right. */
.em-button {
  font-size: 16px;
  padding: 0.5em 1em;               /* 16px text → 8px 16px padding */
  border-radius: 0.4em;
}

.em-button.small { font-size: 12px; }   /* smaller text → smaller padding (6px 12px), automatically */
.em-button.big   { font-size: 24px; }   /* bigger text  → bigger padding (12px 24px),  automatically */
/* Try it: change .em-button.big font-size to 32px → the padding grows too,
   without touching the padding line. */


/* ------------------------------------------------------------
   Only to make the boxes visible — not part of this lesson
   ------------------------------------------------------------ */
.em-box {
  border: 2px solid #FFAF04;
  border-radius: 8px;
}

.em-button {
  background-color: #2D62EF;
  color: #FFFFFF;
  border: none;
  margin-right: 8px;
}
