/*
   New Perspectives on HTML and CSS, 7th Edition
   Tutorial 7
   Tutorial Case

   Survey Forms Style Sheet
   Author: Boe Mathewson
   Date:   09/27/22

   Filename:         rb_forms.css

*/

/* Form Layout Styles */
/* See Tutorial 5 for details on using a flexible layout */
/* random Flexbox information: order: <-- you can choose what order to put things in with 1 or 2 or 3 etc without changing html 

align-items: Stretch; <----default since it stretchs the boxes to have equal hight and width (flex-end evens bottom coreners while flex-start evens to top without stretching but stretch is default)
flex-basis: 30% 30+30+30=90 leaving 10% for margin in the middle to do the justify-content command
justify-content: space-between; <--space dash between places a margin between items
For small screen s you can have them return to normal layout by doing @ media (min-width: 900px) then class for example .call_out_container

*/

form#survey {
  display: -webkit-flex;
  display: flex;                  /* "sets to use flex" alone makes the layout side by side and sets to us flex*/
  -webkit-flex-flow: row wrap;     /* Row wrap wraps when wi dth is met*/ /* column no wrap would make just in a column*/
  flex-flow: row wrap;      
}

form#survey > fieldset {
  -webkit-flex: 1 1 300px;
  flex: 1 1 300px;
  background-color: rgb(241,232,181);   /* Colored the survay box a yellow*/
  border-radius: 20px;                    /* rounded the corners*/
  font-size: .85em;
  padding: 10px;                         
}

div.formRow {
  display: -webkit-flex;
  display: flex;              /* "sets to use flex" alone makes the layout side by side and sets to us flex*/
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  padding: 7px 0px;
}

div.formRow > * {
  -webkit-flex: 1 1 150px;        /* just in case more broswers*/
  flex: 1 1 150px;                /* Flex: 1<-- Makes them perfectly equal in width for the textbox's  /  the 150px controls how far the box feild is going */
}

/* Legend Styles */
legend {                  /*legends like customer information and Share your experiences */
  background-color: rgb(179,20,25);   
  color: white;
  padding: 5px;
}
/* Text Area Styles */
textarea {              /* Make the tell about your experience textbox bigger with height and width*/
  margin: 10px;
  height: 100px;
  width: 95%;
}
/* Spinner Styles */
/* See Tutorial 5 for details on using a flexible layout */

div.formRow > input#dineSpin {   /* input element for for spinner(How many times do you dine out per month) set to 50px */
  -webkit-flex: 0 0 50px;
  flex: 0 0 50px;
}

/* Form Button Styles */
div#buttons{
  text-align: center;
  width: 100%;
}

input[type="submit"], input[type="reset"] {
  font-size: 1.2em;
  padding: 5px;
  margin: 15px;
}
/* Validation Styles */
/*  focus:valid  allows for it to check validation beforehand displaying picture next to it*/
input#name:focus:valid, 
input#zip:focus:valid, 
input#phone:focus:valid, 
input#mail:focus:valid{
  background: rgb(220,255,220) url(../images/rb_valid.png) bottom right/contain no-repeat; /*  */
}
/*  focus:invalid  allows for it to check validation for invalid before hand displaying picture next to it*/
input#name:focus:invalid, 
input#zip:focus:invalid, 
input#phone:focus:invalid, 
input#mail:focus:invalid{
  background: rgb(255,232,233) url(../images/rb_invalid.png) bottom right/contain no-repeat; /*  */
}