/*
   New Perspectives on HTML and CSS
   Tutorial 6
   Case Problem 1

   Comment Form Style Sheet
   Author: Breiona Bankhead
   Date:   10/19/2025

   Filename:         comments.css
   Supporting Files: go.png, stop.png

*/
/* Step 11 - Style the field set */
#comments {
  background-color: rgb(245, 245, 255);
  margin: 15px auto;
  padding: 5px;
  width: 90%;
}

/* Step 12 - Label styling on the left */
#comments label {
  display: block;
  float: left;
  clear: left;
  font-size: 0.9em;
  width: 100%;
  margin-top: 5px;
  margin-bottom: 5px;
}

/* Step 13 - Input and textarea styling on the right */
#comments input[type="text"],
#comments input[type="email"],
#comments input[type="password"],
#comments textarea {
  display: block;
  float: right;
  font-size: 0.9em;
  width: 55%;
  margin-left: 10px;
  margin-right: 10px;
}

#comments textarea {
  height: 150px;
}

/* Step 14 - Submit button styling */
#comments input[type="submit"] {
  display: block;
  width: 200px;
  height: 30px;
  margin: 5px auto;
}

/* Step 15 - Change background color on focus */
#comments input:focus,
#comments textarea:focus {
  background-color: rgb(225, 225, 240);
}

/* Step 16 - Valid input with background image (go.png) */
#comments input:focus:valid,
#comments textarea:focus:valid {
  background-color: rgb(225, 240, 225);
  background-image: url('go.png');
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
}

/* Step 17 - Invalid input with background image (stop.png) */
#comments input:focus:invalid,
#comments textarea:focus:invalid {
  background-image: url('red.png');
  background-color: rgb(255, 240, 240);
}



