/*
   New Perspectives on HTML5 and CSS3, 8th Edition
   Tutorial 7
   Case Problem 1

   ACGIP Registration Validation Style Sheet
   Author: Andrew Hainline
   Date:   11/11/2025

   Filename: cg_validate.css

*/


/* Validation Styles */

input:focus,
select:focus,
textarea:focus {
  background-color: rgb(245, 245, 140);
  outline: none;
}

#fnBox:focus,
#lnBox:focus,
#mailBox:focus,
#phoneBox:focus,
#idBox:focus {
  background-position: right center;
  background-repeat: no-repeat;
}

#fnBox:focus:valid,
#lnBox:focus:valid,
#mailBox:focus:valid,
#phoneBox:focus:valid,
#idBox:focus:valid {
  background-color: rgb(220, 255, 220);
  background-image: url("cg_valid.png");
  background-position: right center;
  background-repeat: no-repeat;
}

#fnBox:focus:invalid,
#lnBox:focus:invalid,
#mailBox:focus:invalid,
#phoneBox:focus:invalid,
#idBox:focus:invalid {
  background-color: rgb(255, 232, 232);
  background-image: url("cg_invalid.png");
  background-position: right center;
  background-repeat: no-repeat;
}