//Default styles
html {
 box-sizing: border-box;
}
*, *:before, *:after {
 box-sizing: inherit;
}

body {
  // display: flex;
  // min-height: 100vh;
  // flex-direction: column;
}

main {
  // flex: 1 0 auto;
}

ul {
  &:not(.browser-default) {
    padding-left: 0;
    list-style-type: unset;

    & > li {
      list-style-type: unset;
    }
  }
}

a {
	color: $link-color;
	text-decoration: none;

  // Gets rid of tap active state
  -webkit-tap-highlight-color: transparent;
}


// Positioning
.valign-wrapper {
  display: flex;
  align-items: center;
}

/*mobile and up styles -----------------------------------*/ 
@media (min-width:$small-screen-up) {

  .valign-wrapper-medium {
    display:flex;
    align-items: center;
  }

}
@media screen and (min-width: $large-screen-up) {
  .valign-wrapper-large {
    display:flex;
    align-items: center;
  }
}



// classic clearfix
.clearfix {
  clear: both;
}



/*Helpers and wordpress required styles --------------------------------- */

img.alignright, .alignright {float:right; margin:0 0 $gutter-width/2 $gutter-width}
img.alignleft, .alignleft {float:left; margin:0 $gutter-width $gutter-width/2 0}
img.aligncenter, .aligncenter {display: block; margin-left: auto; margin-right: auto}
a img.alignright {float:right; margin:0 0 $gutter-width/2 $gutter-width}
a img.alignleft {float:left; margin:0 $gutter-width $gutter-width/2 0}
a img.aligncenter {display: block; margin-left: auto; margin-right: auto}


.clearfix:after {
  clear: both;
  display: table;
  content: " ";
  width: 100%;
}

.dont-break-out {

  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;

}


/*********************
  Media Query Classes
**********************/
.hide-on-small-only, .hide-on-small-and-down {
  @media #{$small-and-down} {
    display: none !important;
  }
}
.hide-on-med-and-down {
  @media #{$medium-and-down} {
    display: none !important;
  }
}
.hide-on-med-and-up {
  @media #{$medium-and-up} {
    display: none !important;
  }
}
.hide-on-med-only {
  @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) {
    display: none !important;
  }
}
.hide-on-large-only {
  @media #{$large-and-up} {
    display: none !important;
  }
}
.show-on-large {
  @media #{$large-and-up} {
    display: block !important;
  }
}
.show-on-medium {
  @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) {
    display: block !important;
  }
}
.show-on-small {
  @media #{$small-and-down} {
    display: block !important;
  }
}
.show-on-medium-and-up {
  @media #{$medium-and-up} {
    display: block !important;
  }
}
.show-on-medium-and-down {
  @media #{$medium-and-down} {
    display: block !important;
  }
}


// Center text on mobile
.center-on-small-only {
  @media #{$small-and-down} {
    text-align: center;
  }
}

// Tables
table, th, td {
   border: none;
}

table {
  width:100%;
  display: table;

  &.bordered > thead > tr,
  &.bordered > tbody > tr {
    border-bottom: 1px solid $table-border-color;
  }

  &.striped > tbody {
    > tr:nth-child(odd) {
      background-color: $table-striped-color;
    }

    > tr > td {
      border-radius: 0;
    }
  }

  &.highlight > tbody > tr {
    transition: background-color .25s ease;
    &:hover {
      background-color: $table-striped-color;
    }
  }

  &.centered {
    thead tr th, tbody tr td {
      text-align: center;
    }
  }

}

thead {
  border-bottom: 1px solid $table-border-color;
}

td, th{
  padding: 15px 5px;
  display: table-cell;
  text-align: left;
  vertical-align: middle;
  border-radius: 2px;
}

// Responsive Table
@media #{$medium-and-down} {

  table.responsive-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    display: block;
    position: relative;

    td:empty:before {
      content: '\00a0';
    }

    th,
    td {
      margin: 0;
      vertical-align: top;
    }

    th { text-align: left; }
    thead {
      display: block;
      float: left;

      tr {
        display: block;
        padding: 0 10px 0 0;

        th::before {
          content: "\00a0";
        }
      }
    }
    tbody {
      display: block;
      width: auto;
      position: relative;
      overflow-x: auto;
      white-space: nowrap;

      tr {
        display: inline-block;
        vertical-align: top;
      }
    }
    th {
      display: block;
      text-align: right;
    }
    td {
      display: block;
      min-height: 1.25em;
      text-align: left;
    }
    tr { padding: 0 10px; }

    /* sort out borders */
    thead {
      border: 0;
      border-right: 1px solid $table-border-color;
    }

    &.bordered {
      th { border-bottom: 0; border-left: 0; }
      td { border-left: 0; border-right: 0; border-bottom: 0; }
      tr { border: 0; }
      tbody tr { border-right: 1px solid $table-border-color; }
    }

  }

}




// Responsive Videos
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;

    iframe, object, embed {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
}
/*******************
  Utility Classes
*******************/

.hide {
  display: none !important;
}

// Text Align
.left-align {
  text-align: left;
}
.right-align {
  text-align: right
}
.center, .center-align {
  text-align: center;
}

.left {
  float: left !important;
}
.right {
  float: right !important;
}

// No Text Select
.no-select {
  user-select: none;
}

.circle {
  border-radius: 50%;
}

.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.truncate {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-padding {
  padding: 0 !important;
}


/*Social sharing links -----------------------------------------------------*/
.sharing a {
  display:inline-block;
}

.icon-links {
  svg, g, path, polygon {
    fill: currentColor;
  }
  
}

// Video ------
// ------------------------------------------------------
 .youtube-player {
        position: relative;
        padding-bottom: 56.23%;
        /* Use 75% for 4:3 videos */
        height: 0;
        overflow: hidden;
        max-width: 100%;
        background: #000;
        margin: 5px;
    }
    
    .youtube-player iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 100;
        background: transparent;
    }
    
    .youtube-player img {
        bottom: 0;
        display: block;
        left: 0;
        margin: auto;
        max-width: 100%;
        width: 100%;
        position: absolute;
        right: 0;
        top: 0;
        border: none;
        height: auto;
        cursor: pointer;
        -webkit-transition: .4s all;
        -moz-transition: .4s all;
        transition: .4s all;
    }
    
    .youtube-player img:hover {
        -webkit-filter: brightness(75%);
    }
    
    .youtube-player .play {
        height: 72px;
        width: 72px;
        left: 50%;
        top: 50%;
        margin-left: -36px;
        margin-top: -36px;
        position: absolute;
        cursor: pointer;
 /*       width:50%;
        height: 50%;*/
        // background-color: #fff;

        border-radius: 50%;
        transition: all .2s;
    }
    .youtube-player .play:hover {
        // background-color: #075a81;
    }

    .youtube-player .play:after {
    content: " ";
      display: block;
      background-color: transparent;
      border-left: 40px solid $primary-color;
      border-bottom: 20px solid transparent;
      border-top: 20px solid transparent;
      height: 0;
      width: 0;
      margin-left: 5px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);

  }


  // Wordpress elements 
  // -------------------------------------------------------- */


  /* Search form
  -------------------------------------------------------- */
  .searchform {
    font-size: 0px;
    label {
      display:block;
    }
    label, input {
      font-size: 1rem;
    }
    input {
      display: inline-block;
    }
    input[type=text] {
      width:66.66%;
    }
    input[type=submit], input[type=button] {
      width: 33.33%;
    }
  }
