/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
    color: #222;
    font-size: 10px;
    line-height: 1.4;
}

html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
*, *:before, *:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
  }

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Custom Font */
@font-face {
    font-family: 'Bebas';
    src: url('../fonts/bebasneue_regular-webfont.woff2') format('woff2'),
         url('../fonts/bebasneue_regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Bebas-bold';
    src: url('../fonts/bebasneue_bold-webfont.woff2') format('woff2'),
         url('../fonts/bebasneue_bold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'BebasNeueBold';
    src: url('../fonts/bebasneue_bold-webfont.woff2') format('woff2'),
         url('../fonts/bebasneue_bold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Bebas-thin';
    src: url('../fonts/bebasneue_thin-webfont.woff2') format('woff2'),
         url('../fonts/bebasneue_thin-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Lubalin';
    src: url('../fonts/LubalinGraphStd-Book.eot');
    src: url('../fonts/LubalinGraphStd-Book.eot?#iefix') format('embedded-opentype'),
         url('../fonts/LubalinGraphStd-Book.woff') format('woff'),
         url('../fonts/LubalinGraphStd-Book.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Lubalin-bold';
    src: url('../fonts/LubalinGraphStd-Demi.eot');
    src: url('../fonts/LubalinGraphStd-Demi.eot?#iefix') format('embedded-opentype'),
         url('../fonts/LubalinGraphStd-Demi.woff') format('woff'),
         url('../fonts/LubalinGraphStd-Demi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Resets */
html, body, div, h1 {
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  font-family: 'Bebas', sans-serif;
  overflow-x: hidden;
}

.table {
  display: table;
}
.table-row {
  display: table-row;
}
.table-cell {
  display: table-cell;
  vertical-align: middle;
}

.valign-center {
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}

/* ------------------------ */
/*      MAP PAGE STYLES     */
/* ------------------------ */

/* Disable text selection so touch drag doesn't select all the counties. */
* {
  -webkit-touch-callout:none;
  -webkit-user-select: none;  /* Chrome all / Safari all */
  -moz-user-select: none;     /* Firefox all */
  -ms-user-select: none;      /* IE 10+ */

  /* No support for these yet, use at own risk */
  -o-user-select: none;
  user-select: none;
}

#data-csv {
  display: none;
}

/* map page container */
.shell-main {
  width: 100vw;
  height: 100vh;
  background-color: #ccc;
  background-image: url('../images/bg-wood.jpg');
  border-collapse: collapse;
  position: relative;
}

.shell-map {
  width: 80%;
  height: 100%;
  padding: 4.6vh 3vw;
  position: relative;
}

.shell-map img, .shell-map svg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /* max-height: 100vh; */
}

.shell-map img {
  width: 92.5%;
  padding-right: .5vw;
  padding-bottom: 1vh;
}

.shell-map .container{
  width: 99%;
  height: 100%;
  /* min-width: 500px;
  min-height: 500px; */
  margin: 0;
  padding: .25vw .75vw .9vh .25vw;
  overflow: hidden;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.shell-map .container img.cloud {
  position: absolute;
  left: -15vw;
  top: 0;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
}

.shell-controls {
  height: 100%;
}

/* Map layers */

#Counties {
  z-index: 1;
  border-right: 10px solid #7d7859;
  border-image-source: url('../images/map-border-full.png');
  -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.22);
  -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.22);
  box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.22);
  cursor: pointer;
  border-image-slice: 0 20 20 0;
  border-bottom: 10px solid #7d7859;
}

/* Mouseover of counties when on the web. */
.whitefill {
  fill: #5d7d4b !important;
  transition: all .5s ease;
}

#Illustrations {
  z-index: 3;
  pointer-events: none;
  width: 90%;
}

img.map-grit {
  z-index: 4;
  pointer-events: none;
}

img.map-grunge {
  z-index: 4;
  opacity: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

img.map-illustrations {
  z-index: 3;
  pointer-events: none;
}

/* Instructions for the right side of the map page. */
.controls {
  width: 20.364vw;
  /* height: 61.48vh; */
  padding: 4.6vh 0;
  background-image: url('../images/controls-bg.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position-y: center;
}

.controls h1 {
  color: #9c1f24;
  text-transform: uppercase;
  font-family: 'Bebas', sans-serif;
  font-size: 2.5vw;
  font-weight: normal;
  text-align: left;
  padding: 1.5vh 3vw;
  margin-left: 4vw;
  background-image: url('../images/controls-tape.png');
  background-repeat: no-repeat;
  background-position: center right;
  background-size: contain;
}

.controls p {
  font-family: 'Lubalin', serif;
  font-size: 1vw;
  margin-left: 6vw;
  color: #2c2c29;
  line-height: 1.75;
  padding-right: 1.5vw;
}

.controls p.instructions {
  color: #9c1f24;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: .9vw;
  letter-spacing: .1vw;
  line-height: 1.25;
  font-weight: bold;
}

.controls img.controls-buffalo {
  width: 10vw;
  height: auto;
  display: block;
  margin-left: 4vw;
}

.controls-content {
  position: relative;
  top: -4vh;
}

.map-key {
  background-color: rgba(142,117,87,.48);
  padding: .25vw;
  margin-left: 5vw;
  border-radius: .25vw;
  /* mix-blend-mode: multiply; */
}

.map-key h3 {
  color: #9c1f24;
  text-transform: uppercase;
  font-size: 1.5vw;
  text-align: center;
  padding-left: 2vw;
  margin-left: 0;
}

.map-key p {
  margin-left: 1vw;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1;
  padding-right: .5vw;
}

.map-key img.icon-courthouse {
  padding: .1vh 1vw;
  position: relative;
  top: -.2vh;
  width: 4vw;
}

.map-key img.key-counties, .map-key img.key-districts {
  padding-right: .5vw;
  width: 4vw;
  height: .5vh;
}

.map-key img.key-title {
  margin-bottom: -2vh;
  padding-bottom: 1vh;
  position: relative;
  left: -1.75vw;
}

p.courthouse-key {
  margin-top: 0;
  position: relative;
  top: -2vh;
}

/* ------------------------ */
/*      DATA PAGE STYLES     */
/* ------------------------ */

.close {
  width: 4.5vw;
  height: 4.5vw;
  background-color: #9e1d20;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 22;
  cursor: pointer;
  transition: background-color .2s ease;
}

.close:hover {
  background-color: #430c0e;
}

.close img {
  display: block;
  margin: auto;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

/* Slider page divider */
.shell-slider {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  z-index: 20;
}

.slider-column-spacer {
  width: 8.4vw;
  pointer-events: none;
}

.shell-slider-content {
  vertical-align: top;
}

.slider-column-left {
  width: 58vw;
  height: 100vh;
  vertical-align: top;
  position: relative;
}

.slider-column-right {
  height: 100vh;
  vertical-align: top;
  position: relative;
}

.combo-shell {
  height: 100%;
  width: 100%;
  padding-right: 3vw;
  padding-left: 3vw;
}

.county-data-shell {
  display: block;
  width: 46vw;
  height: 13.5vw;
  position: absolute;
  left: -3vw;
  top: 1vw;
  background-image: url('../images/data-top-paper.png');
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
}

.county-data-strip {
  width: 100%;
  height: 80%;
  padding: 0 3vw;
  margin-top:  -1vw;;
}

.data-county-headline .table-cell {
  padding: 0 .5vw;
}

.data-county-name {
  color: #9c1f24;
  text-transform: uppercase;
  font-family: 'Bebas';
  font-size: 2.125vw;
  letter-spacing: .025vw;
}

.county-name-divider {
  font-family: 'Bebas-thin';
  color: #524e3f;
  font-size: 7vw;
  padding: 0 .5vw;
}

.data-district-name {
  text-transform: uppercase;
  color: #9c1f24;
  font-family: 'Lubalin';
  font-size: 1.25vw;
}

.data-district-number {
  font-family: 'Bebas-thin';
  font-size: 7vw;
  color: #9c1f24;
  padding: 0 .5vw;
}

.data-district-seat {
  color: #686353;
  text-transform: uppercase;
  font-family: 'Lubalin';
  font-size: 1.25vw;
  font-style: italic;
  padding: 0 .5vw;
}

.county-description-shell {
  height: 25%;
  padding: 8vw 0 1px;
}

.data-county-description {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.25vw;
  line-height: 1.75;
  color: #686353;
  background-color: #fff;
  padding: 3.25vw;
}

/* DISTRICT SECTION */

.district-shell {
  width: 100%;
  height: 75%;
}

.district-combo {
  width: 100%;
  height: 100%;
}

.district-data-photo {
  width: 55%;
}

.district-data-photo img {
  width: 100%;
  border: .75vw solid #f1f2f2;
  border-right: none;
}

.district-data-description {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1vw;
  line-height: 1.75;
  color: #ffffff;
  background-color: #9e1d20;
  padding: 1.5vw;
  position: relative;
}

.district-courthouse-container {
  position: relative;
}

.district-courthouse {
  position: relative;
  padding: 1.25vw 0 .75vw 3vw;;
  background-color: #fff;
  color: #686353;
}

.district-courthouse-container img {
  position: absolute;
  z-index: 2;
  top: -.5vw;
  left: -4vw;
  width: 6vw;
}

.district-courthouse h2 {
  font-family: 'Lubalin-bold';
  font-size: 1vw;
  margin: 0;
  padding: 0;
  line-height: 1;
  text-transform: uppercase;
}

.district-data-locations {
  font-family: 'Lubalin';
  font-size: .8vw;
  font-style: italic;
}

/* Fun Fact Section */
.funfact-shell {
  padding-top: 10vh;
}

.funfact-combo {
  background-color: #686353;
}

.funfact-combo h1 {
  color: #9e1d20;
  background-color: #e0c495;
  padding: 2vh 2vw 1vh 3vw;
  font-family: 'Lubalin';
  font-size: 2.25vw;
  text-transform: uppercase;
  letter-spacing: .35vw;
  margin-top: 1.75vw;
  margin-left: -1vw;
}

.funfact-data-description {
  padding: 2vh 2vw 2vh 3vw;
  color: #fff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1vw;
  line-height: 1.75;
}

.funfact-data-photo img {
  width: 104.5%;
  border: .75vw solid #f1f2f2;
  margin-left: -1.5vw;
}


/* Data page see-through overlays. */

.overlay, .overlay-offset {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  z-index: 10;
  background-color: rgba(82,78,63,1);
  mix-blend-mode: multiply;
}

.overlay-offset {
  z-index: 11;
  left: 7.6vw;
  width: 92.4vw;
}

/* Screen positioning styles. */
.offscreen {
  left: 100vw;
}

.onscreen {
  left: 0;
}


/* ------------------------ */
/*      MEDIA QUERIES       */
/* ------------------------ */


/* ----------------------
   Big-ass monitors
   ---------------------- */
@media (min-width: 2000px) {

}

/* ----------------------
   iPad
   ---------------------- */
@media (min-width: 600px) and (max-width: 1000px){

}

/* ------------------------------------
   Up to iPad
   ------------------------------------- */
@media screen and (max-width: 600px) {

}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}
