/*
   Hands-on Project 7-1
   Sung Kim | 7-5-26 | IST-239-W01
   Program: Password Validation Form

   Purpose:
   This project creates an account form that validates a password before accepting it.
   It provides feedback when the password does not meet the required validation rules.
   The submitted account information is displayed on a separate confirmation page.
   
   This CSS file controls the layout and appearance of both HTML pages and their form elements.

   Filename: styles.css
   Related: project07-01.html, project07-01.js, formsubmit.html
*/

/* Applies consistent box sizing to every element. */
* {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

/* Removes default spacing and formatting from page elements. */
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;
}

/* Displays HTML5 layout elements as blocks in older browsers. */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
   display: block;
}

/* Sets the overall page width, background, and font. */
body {
   line-height: 1;
   width: 960px;
   background: white;
   margin: 0 auto;
   font-family: Verdana, Geneva, sans-serif;
}

/* Removes bullets and numbers from lists. */
ol, ul {
   list-style: none;
}

/* Styles the main page header. */
header {
   background: #5472B2;
   width: 100%;
   color: #FFFFFF;
   font-size: 48px;
   text-align: center;
   line-height: 1.5em;
}

/* Styles the main content area. */
article {
   width: 960px;
   height: 560px;
   text-align: left;
   background: #FFDB70;
   position: relative;
}

/* Styles the password feedback message. */
div#feedback {
   clear: left;
   color: red;
   margin-left: 25px;
   margin-bottom: 20px;
}

/* Styles the headings inside each section. */
section h1 {
   font-size: 1.4em;
   margin: 20px 0;
}

/* Styles and centers the account form box. */
fieldset {
   border: 1px solid rgb(192,192,192);
   background-color: #EBE09C;
   box-shadow: 3px 3px 20px gray;
   padding: 30px;
   display: block;
   width: 600px;
   margin: 0 auto;
}

/* Styles the form legend text. */
fieldset legend {
   color: rgb(80,80,80);
   width: 300px;
   text-align: left;
   background: rgba(255, 255, 255, 0.3);
   font-size: 1.05em;
}

/* Formats the Username and Password labels. */
label {
   display: block;
   width: 100px;
   float: left;
   clear: left;
   margin-bottom: 15px;
   text-align: right;
   margin-right: 20px;
   font-size: 1em;
   font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
   color: rgb(80,80,80);
}

/* Formats the Username and Password input fields. */
input {
   display: block;
   float: left;
   font-size: 1.05em;
   color: rgb(80, 80, 80);
   margin-bottom: 15px;
}

/* Highlights an input field when its value is invalid. */
input:invalid {
   border-color: red;
   box-shadow: 2px 2px 5px red;
}

/* Formats and centers the Save button. */
input[type='submit'] {
   clear: left;
   display: block;
   margin: 0 auto;
   float: none;
   font-size: 1.1em;
   background-color: #BF7E21;
   color: white;
   padding: 3px;
   width: 100px;
}

/* Adds left spacing to the main section heading. */
section > h1 {
   margin-left: 30px;
}

/* Positions and formats the account information table. */
table {
   margin-left: 30px;
   border-collapse: collapse;
}

/* Adds borders and spacing to the table cells. */
table td {
   border: 1px solid rgb(150,150,150);
   padding: 5px;
}

/* Highlights the label column in the account table. */
table tr td:first-of-type {
   background-color: #E3E09B;
}
