@charset "utf-8";

body {
  font-family: Verdana, Geneva, sans-serif;
  color: rgb(91, 91, 91);
  background-color: ivory;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

h1,
h2 {
  text-shadow: 4px 4px 5px gray;
}

h2 {
  font-size: 1.3em;
}

/* nav {
  background-color: rgb(70, 130, 180);
  padding: 15px;
  text-align: center;
}

nav > a {
  padding-left: 10px;
  padding-right: 10px;
  text-decoration: none;
  color: white;
}
*/

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  padding-left: 10px;
  padding-right: 10px;
  color: white;
  display: block;
  background-color: rgb(70, 130, 180);
  line-height: 2.8em;
  text-decoration: none;
  text-align: center;
}

nav a:hover {
  text-decoration: underline;
  color: navy;
  background-color: ivory;
}

main {
  padding: 20px;
  margin-top: 35px;
}

header img {
  width: 100%;
}

body > footer {
  background-color: rgb(70, 130, 180);
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
  font-size: 0.9em;
  line-height: 3em;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  clear: both;
}

main ol.Schools ol {
  list-style-type: lower-roman;
}

main ol.Schools ul {
  list-style-type: disc;
}

main hr {
  clear: both;
}

/* Flexbox styles for Vacation images */
div.gallery {
  display: flex;
  flex-flow: wrap;
  align-items: center;
}

div.imgGallery {
  flex-basis: 23%;
  max-width: 25%;
  padding: 0 4px;
}

div.imgGallery img {
  width: 100%;
}

/* Family Table Settings */
table.family {
  background-color: azure;
  width: 100%;
  border: 10px solid rgb(50, 100, 180);
  border-collapse: collapse;
}

table.family th,
table.family td {
  border: 3px solid rgb(70, 130, 180);
}

table.family thead {
  background-color: rgb(70, 130, 180);
  color: white;
}

table.family tbody th {
  background-color: rgb(70, 130, 180);
  color: white;
  text-align: left;
}

table.family tfoot {
  background-color: rgb(70, 130, 180);
  color: white;
}

table.family col#name {
  width: 10%;
}

table.family col#relationship,
table.family col#birthday {
  width: 20%;
}

table.family col#interestingFacts {
  width: 50%;
}

/* Form Settings */
form input:focus,
form select:focus,
form textarea:focus {
  background-color: rgb(220, 255, 220);
}

form input#zip:focus:valid,
form input#phone:focus:valid {
  background: rgb(220, 255, 220) url(rb_valid.png) bottom right/contain
    no-repeat;
}

form input#zip:focus:invalid,
form input#phone:focus:invalid {
  background: rgb(255, 232, 233) url(rb_invalid.png) bottom right/contain
    no-repeat;
}

/* Mobile Devices */
@media only screen and (max-width: 768px) {
  header {
    padding: 0;
  }

  main > img {
    width: 90%;
    float: none;
    padding: 0px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  body {
    width: 100%;
    margin: 0;
  }

  nav li {
    float: none;
    font-size: x-large;
    width: 100%;
  }

  nav a {
    border-bottom: 1px solid black;
  }

  div.imgGallery {
    flex-basis: 100%;
    max-width: 100%;
  }

  table,
  tbody,
  tr,
  td,
  th {
    display: block;
  }

  thead,
  tfoot {
    display: none;
  }

  tbody td {
    position: relative;
    padding-left: 40%;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    top: 0px;
    left: 0px;
    width: 40%;
  }

  /* Week 6 Forms */
  form {
    width: 100%;
    font-size: large;
  }

  fieldset {
    width: 100%;
    padding: 5px;
    margin: 0;
  }

  input,
  select {
    position: inherit;
    display: block;
    height: 50px;
    padding: 5px;
    width: 90%;
  }

  label {
    position: inherit;
    display: block;
    height: 50px;
    width: 90%;
  }

  textarea {
    height: 100px;
    width: 95%;
  }

  input[type="submit"],
  input[type="reset"] {
    float: none;
    width: 90%;
    margin: 10px;
    font-size: 1.2em;
  }
}

/* Tablet Devices */
@media only screen and (min-width: 769px) and (max-width: 1100px) {
  header {
    padding: 0;
  }

  main > img {
    width: 90%;
    float: none;
    padding: 0px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  body {
    width: 100%;
    margin: 0;
  }

  nav li {
    float: none;
    font-size: x-large;
    width: 100%;
  }

  nav a {
    border-bottom: 1px solid black;
  }

  div.imgGallery {
    flex-basis: 48%;
    max-width: 50%;
  }

  table,
  tbody,
  tr,
  td,
  th {
    display: block;
  }

  thead,
  tfoot {
    display: none;
  }

  tbody td {
    position: relative;
    padding-left: 40%;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    top: 0px;
    left: 0px;
    width: 40%;
  }

  /* Week 6 Forms */
  form {
    width: 100%;
    font-size: large;
  }

  fieldset {
    width: 100%;
    padding: 5px;
    margin: 0;
  }

  input,
  select {
    position: inherit;
    display: block;
    height: 50px;
    padding: 5px;
    width: 90%;
  }

  label {
    position: inherit;
    display: block;
    height: 50px;
    width: 90%;
  }

  textarea {
    height: 100px;
    width: 95%;
  }

  input[type="submit"],
  input[type="reset"] {
    float: none;
    width: 90%;
    margin: 10px;
    font-size: 1.2em;
  }
}

/* Desktop Devices */
@media only screen and (min-width: 1101px) {
  html {
    background-image: url(background.jpg);
    background-repeat: round;
    background-position: top left;
  }

  header {
    text-align: center;
    padding: 20px;
  }

  main > img {
    width: 25%;
    padding: 25px;
    float: right;
  }

  nav li {
    display: block;
    width: 20%;
    float: left;
  }

  /* Week 6 Forms */
  form {
    width: 90%;
  }

  fieldset {
    width: 90%;
    padding: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
  }

  input,
  select {
    display: block;
    position: relative;
    left: 30%;
    padding: 5px;
    height: auto;
    width: 60%;
  }

  label {
    display: block;
    position: absolute;
    padding: 5px;
    width: 30%;
  }

  input[type="radio"] {
    display: inline;
    position: inherit;
    left: 0;
    width: auto;
  }

  label.radio {
    display: inline;
    position: inherit;
  }

  textarea {
    margin-top: 25px;
    height: 100px;
    width: 95%;
  }

  input[type="submit"],
  input[type="reset"] {
    display: block;
    float: left;
    left: 0;
    text-align: center;
    width: 40%;
    padding: 10px;
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 10px;
  }

  footer {
    clear: both;
  }
}
