/* ============================================================
   CSS 09.08 — Form states: :checked and :disabled
   ============================================================
   :checked   → a ticked checkbox / chosen radio button
   :disabled  → a field or button that has the  disabled  attribute

   input:checked + span …  would style the NEXT element.
   Here the checkbox is INSIDE the label, so we use  label:has(…)
   ":has()" = "a label that HAS a checked input inside" (newer CSS,
   works in all modern browsers).
   ============================================================ */

.state-form input[type="checkbox"] {
  accent-color: #1F9D55;            /* colour of the tick box itself      */
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.state-form label:has(input:checked) {
  color: #1F9D55;
  font-weight: 700;
}

.btn:disabled {
  background-color: #E4E4E4;
  color: #9A9A9A;
  cursor: not-allowed;              /* the "no" mouse cursor              */
}
/* Try it: delete  disabled  from the button in the HTML → it turns blue
   and can be clicked. */


/* ------------------------------------------------------------
   Only to make the form look neat — not part of this lesson
   ------------------------------------------------------------ */
.state-form label {
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
}

.btn {
  font: inherit;                    /* buttons don't inherit fonts by default — this fixes it */
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;                  /* the "hand" — tells people "you can click this" */
  margin-right: 8px;
}

.btn-primary {
  background-color: #2D62EF;
  color: #FFFFFF;
}
