/*
   New Perspectives on HTML and CSS
   Tutorial 6
   Case Problem 1

   Comment Form Style Sheet
   Author: 
   Date:   

   Filename:         comments.css
   Supporting Files: go.png, stop.png
*/

/* 11. Fieldset styling */
fieldset#commentFS {
  background-color: rgb(245, 245, 255);
  margin: 15px auto;
  padding: 5px;
  width: 90%;
}

/* 12. Label styling */
label {
  display: block;
  float: left;
  clear: left;
  font-size: 0.9em;
  width: 100%;
  margin: 5px 0;
}

/* 13. Input and textarea styling */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  display: block;
  float: right;
  font-size: 0.9em;
  width: 55%;
  margin: 0 10px;
  box-sizing: border-box;
}

/* Set height for textarea */
textarea {
  height: 150px;
  resize: none;
}

/* 14. Submit button styling */
input[type="submit"] {
  display: block;
  clear: both;
  width: 200px;
  height: 30px;
  margin: 5px auto;
  font-size: 1em;
  cursor: pointer;
}

/* 15. Focus styling */
input:focus,
textarea:focus {
  background-color: rgb(225, 225, 240);
  outline: none;
}

/* 16. Valid input with go.png icon */
input:focus:valid {
  background-color: rgb(225, 240, 225);
  background-image: url('go.png');
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
}

/* 17. Invalid input with stop.png icon */
input:focus:invalid {
  background-color: rgb(240, 225, 225);
  background-image: url('stop.png');
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
}
