/*  JavaScript 7th Edition
    Chapter 6
    Chapter Case

    Filename: stylesa.css
*/

/* apply a natural box layout model to all elements */
* {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

/* reset rules */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
   margin: 0;
   padding: 0;
   border: 0;
   font-size: 100%;
   font: inherit;
   vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
   display: block;
}

body {
   line-height: 1;
   width: 1000px;
   background: white;
   margin: 0 auto;
   font-family: Arial, Helvetica, sans-serif; 
}

ol, ul {
   list-style: none;
}


/* Styles for this Project */

html {
   font-family: Verdana, Geneva, sans-serif;
   font-size: 12px;
   color: rgb(101, 101, 101);
}

body {
   display: -webkit-flex;
   display: flex;
   -webkit-flex-flow: row wrap;
   flex-flow: row wrap;  

   background: white;
   max-width: 1020px;
   min-width: 420px;
   margin: 0px auto;
}

p {
   font-size: 1.2em;
   line-height: 1.4em;
   margin: 15px;
}


/* Header Styles */

body > header {
   width: 100%;
}

body > header > img {
   display: block;
   width: 100%;
}


/* Section Styles */

section#summary {
   -webkit-flex: 1 1 50px;
   flex: 1 1 50px;
   padding: 20px 0px 10px 20px;
}

section#summary h1 {
   font-size: 1.8em;
   letter-spacing: 0.1em;
   line-height: 1.2em;
   font-weight: normal;
   margin-bottom: 10px;
}

section#summary h2 {
   font-size: 1.25em;
   font-weight: normal;
}

section#summary h3 {
   font-size: 1em;
   font-weight: normal; 
   margin-bottom: 20px;  
}

section#summary > img {
   display: block;
   width: 50%;
   margin: 0px auto;
}

section#summary p {
   font-size: 1.2em;
   text-align: justify;
}

section#orderSection {
   -webkit-flex: 1 1 200px;
   flex: 1 1 200px;
   margin: 20px;
}
   
/* Order Table Styles */

table#orderTable {
   margin: 15px;
   width: 95%;
   border-collapse: collapse;
   font-size: 1.3em;
}

form#orderForm fieldset {
   border: none;
   margin-left: -10px;
}

form#orderForm input[type="text"] {
   background-color: rgba(240, 233, 222, 0.5);
}

table#orderTable caption {
   font-size: 1.6em;
   font-weight: bold;
   letter-spacing: 0.2em;
   text-align: left;
   caption-side: top;
   margin-bottom: 20px;
}


table#orderTable td {
   height: 40px;
   vertical-align: top;
}


form#orderForm input[type="text"] {
   color: rgb(101, 101, 101);
}

form#orderForm select {
   display: inline-block;
   margin-left: 10px;
   color: rgb(101, 101, 101);
}

table#orderTable tr:first-of-type {
   border-bottom: 1px solid rgb(151, 151, 151);
}



table#orderTable tr:first-of-type label {
   font-size: 1.15em;
   line-height: 2;
}

table#orderTable tr:first-of-type select {
   font-size: 1em;
}

table#orderTable tr td:last-of-type input {
   text-align: right;
   border: none;
   font-size: 1em;
}

table#orderTable tr:nth-of-type(2) td {
   vertical-align: bottom;
   padding-bottom: 20px;
}

table#orderTable tr:nth-of-type(2) {
   border-bottom: 1px solid rgb(151, 151, 151);
}

table#orderTable tr:nth-of-type(1) td, table#orderTable tr:nth-of-type(3) td {
   padding-top: 15px;
}

table#orderTable tr:nth-of-type(4) td {
   border-bottom: 6px double rgb(151, 151, 151);
}

table#orderTable tr:last-of-type td {
   padding-top: 15px;
}

table#orderTable td.rightA {
   text-align: right;
   padding-right: 10px;
}

table#orderTable legend {
   font-size: 1.2em;
   line-height: 2;
}
form#orderForm fieldset label {
   line-height: 2;
   display: inline-block;
}

form#orderForm input#buttonAdd {
   display: block;
   width: 120px;
   height: 35px;
   margin: 15px auto;
   background-color: rgba(232, 218, 201, 0.8);
   font-size: 1.3em;
   border-radius: 20px;
}
