/*! Adapted from: normalize.css 2011-09-22T17:42 UTC - http://github.com/necolas/normalize.css */

// HTML5
//------------------------------------------------------------------------------

// Corrects block display not defined in IE6/7/8/9 & FF3.
@include reset-html5;

// Corrects inline-block display not defined in IE6/7/8/9 & FF3.
audio,
canvas,
video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}

// Prevents modern browsers from displaying 'audio' without controls.
audio:not([controls]) {
  display: none;
}

// Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
[hidden] {
  display: none;
}


// Base
//------------------------------------------------------------------------------

html {
  margin: 0;
  padding: 0;
  // Corrects text resizing oddly in IE6/7 when body font-size is set using em
  // units. http://clagnut.com/blog/348/#c790
  font-size: 100%;
  // Keeps page centred in all browsers regardless of content height.
  overflow-y: scroll;
  // Prevents iOS text size adjust after orientation change, without disabling
  // user zoom. http://www.456bereastreet.com/archive/201012/
  // -webkit-text-size-adjust: 100%;
  // -ms-text-size-adjust: 100%;
}

body {
  font-family: $sans;
  color: #7d7d7d;
  font-size: 75%; // 12px
  line-height: 1.5;
  padding: 0;
  // Addresses margins handled incorrectly in IE6/7.
  margin: 0;
}

.clear-block,
.clearfix {
  @include bp-clearfix();
}

.float-right {
  @include float(right);
}
.float-left {
  @include float(left);
}

// Links
//------------------------------------------------------------------------------

a {
  text-decoration: none;
  outline: none;
  @include link-colors($link, $link, $link);
  &:focus {
    // Addresses outline displayed oddly in Chrome.
    outline: thin dotted;
  }
  &:hover,
  &:active {
    text-decoration: underline;
    @include link-colors($link-hover, $link-hover, $link-hover);
    // Improves readability when focused and also mouse hovered in all browsers.
    // http://people.opera.com/patrickl/experiments/keyboard/test
    outline: 0;
  }
}


// Typography
//------------------------------------------------------------------------------

p {
  line-height: 1.5;
  margin: 20px 0;
  &:first-child {
    margin-top: 0;
  }
}

#{headings()} {
  font-weight: 400;
  line-height: 1;
  margin: 0 0 0.833em 0;
  padding: 0;
}

h1 { 
  font-size: 3em; 
  line-height: 1; 
  margin-bottom: 10px; 
} 
h2 { 
  font-size: 2em; 
  margin-bottom: 10px; 
} 
h3 { 
  font-size: 1.5em; 
  line-height: 1; 
  margin-bottom: 10px; 
} 
h4 { 
  font-size: 1.2em; 
  line-height: 1.25; 
  margin-bottom: 10px; 
} 
h5 { 
  font-size: 1em; 
  font-weight: bold; 
  margin-bottom: 10px; 
} 
h6 { 
  font-size: 1em; 
  font-weight: bold; 
} 

h2#page-title {
  margin: 1em 1em 0 1em;
}
abbr[title] {
  // Addresses styling not present in IE7/8/9, S5, Chrome.
  border-bottom: 1px dotted;
}

b, 
strong { 
  // Addresses style set to 'bolder' in FF3/4, S4/5, Chrome.
  font-weight: bold; 
}

blockquote {
  margin: 1em 40px;
  &:first-child {
    margin-top: 0;
  }
}

dfn {
  // Addresses styling not present in S5, Chrome.
  font-style: italic;
}

mark {
  // Addresses styling not present in IE6/7/8/9.
  background: #ff0;
  color: #000;
}

pre,
code,
kbd,
samp {
  // Corrects font family set oddly in IE6, S4/5, Chrome.
  // http://en.wikipedia.org/wiki/User:Davidgothberg/Test59
  font-family: monospace, serif;
  _font-family: "courier new", monospace;
  font-size: 1em;
}

pre,
.codeblock {
  background-color: #f5f5f5;
  border: solid 1px #ddd;
  padding: 1em;
  @include border-radius(4px);
  // Improves readability of pre-formatted text in all browsers.
  white-space: pre;
  white-space: pre-wrap;
  word-wrap: break-word;
}

q {
  // Addresses CSS quotes not supported in IE6/7.
  quotes: none;
  &:before,
  &:after {
    // Addresses quote property not supported in S4.
    content: '';
    content: none;
  }
}

small {
  font-size: 75%;
}

// Prevents sub and sup affecting line-height in all browsers.
// http://gist.github.com/413930
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

// Lists
//------------------------------------------------------------------------------

/*ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}*/

dl {
  margin: 1em 0;
  &:first-child {
    margin-top: 0;
  }
  &:only-child {
    margin: 0;
  }
}
dt {
  font-weight: bold;
}
dd {
  margin: 0 0 1em 1em;
}


// Embedded content
//------------------------------------------------------------------------------

img {
  // Removes border when inside 'a' element in IE6/7/8/9, FF3.
  border: 0;
  // Improves image quality when scaled in IE7.
  // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
  -ms-interpolation-mode: bicubic;
}
svg:not(:root) {
  // Corrects overflow displayed oddly in IE9.
  overflow: hidden;
}


// Figures
//------------------------------------------------------------------------------

figure {
  // Addresses margin not present in IE6/7/8/9, S5, O11.
  margin: 0;
}


// Tables
//------------------------------------------------------------------------------

table {
  // Remove most spacing between table cells.
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}
td, th {
  padding: 6px;
  vertical-align: middle;
}
th {
  font-weight: bold;
  text-transform: uppercase;
  text-align: left;
  border-bottom: #000 solid 2px;
  &.field-label {
    background: #e5e5e5;
    border-bottom: none;
    label {
      padding-left: .5em;
    }
  }
}

table.field-multiple-table {
  border: #e5e5e5 solid 1px;
}

tr.even,
tr.odd {
  border-width: 0 1px 0 1px;
  border-style: solid;
  border-color: #e5e5e5;
  background: #f2f2f2;
}
tr.odd {
  background: #fff;
}
tr.drag {
  background: #fe7;
}
tr.drag-previous {
  background: #ffb;
}



