// Contains all basic styles of elements.
// -----------------------------------------------------------------------------
// Make all elements from the DOM inherit from the parent box-sizing
//  Since `*` has a specificity of 0, it does not override the `html` value
//  making all elements inheriting from the root box-sizing value
//  See:  https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/


// Apply a natural box layout model to all elements, but allowing components
// to change. Html is set to 62.5% so that all the REM measurements throughout
// are based on 10px sizing. So basically 1.4rem = 14px

// html {
//   font-size: 62.5%;
// }

// body {
//   font-size: 1.5em; // currently ems cause chrome bug misinterpreting rems on body element
//   line-height: 1.6;
//   font-weight: 400;
//   font-family: @font-sans-serif;
//   color: @font-color;
// }

html {
  box-sizing: border-box;
  font-size: 62.5%;
  height: 100%;
  overflow-y: scroll;

  @media (hover: hover) {
   overflow-x: hidden;
  }
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-size: @font-size;
  line-height: @line-height;
  font-weight: 400;
  font-family: @font-base;
  color: @font-color;
}

// Links
a {
  color: @text-color;
  text-decoration: none;
  word-wrap: break-word;

  &:hover {
    color: shade(@text-color, 15%);
  }
}


// Misc
//––––––––––––––––––––––––––––––––––––––––––––––––––
hr {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  border-width: 0;
  border-top: 1px solid @gray-light;
}

// Lists
//––––––––––––––––––––––––––––––––––––––––––––––––––

ul {
  list-style: circle none;
}

ol {
	list-style: decimal none;
	padding-left: 0;
	margin-top: 0;
}

ul {
  padding-left: 0;
  margin-top: 0;
  ul, ol {
    margin: 1.5rem 0 1.5rem 3rem;
  }
}

ol {
  ol, ul {
    margin: 1.5rem 0 1.5rem 3rem;
  }
}

li {
  margin-bottom: 1rem;
}

dt {
  font-style: italic;
}

dd {
  padding-left: 2rem;
}

ul:not([class]) {
    padding-left: 3rem;
}

// Images/Video
//––––––––––––––––––––––––––––––––––––––––––––––––––
img,
video {
  display: table;
  max-width: 100%;
}

figure {
  margin: 0 auto;
  padding-bottom: 2.4rem;

  img {
    display: table;
    margin: 0 auto;
  }
}

caption,
figcaption {
  font-size: @font-size--sm;
  font-style: italic;
  text-align: center;
}

// Tables
//––––––––––––––––––––––––––––––––––––––––––––––––––


table {
  // border-spacing: 0;
  // border: 0;
  border-collapse: collapse;
  border-color: gray;
  border-spacing: 2px;
  max-width: 100%;
  width: 100%;

  thead th {
    vertical-align: bottom;
    border-top: none;
    border-bottom: 1px solid @gray-light;
  }

  th,
  td {
    padding: 0.6rem;
    vertical-align: top;
    border-top: 1px solid @gray-light;
  }

  th,
  tfoot td {
    font-weight: 700;
    text-align: left;
  }
}

// Forms
//––––––––––––––––––––––––––––––––––––––––––––––––––

textarea,
select {
  height: 38px;
  padding: 6px 10px; // The 6px vertically centers text on FF, ignored by Webkit
  background-color: #fff;
  border: 1px solid @border-color;
  box-shadow: none;
  min-height: 38px; // Safari fix

  &:focus {
    border: 1px solid @color-primary;
    outline: 0;
  }
}

form {
    margin-bottom: 0;
}

// Removes awkward default styles on some inputs for iOS
input {
  &[type="email"],
  &[type="number"],
  &[type="search"],
  &[type="text"],
  &[type="tel"],
  &[type="url"],
  &[type="file"],
  &[type="password"] {
    .input-field();
  }

  &[type="file"] {
      padding: 4px 10px;
  }

  &[readonly]:not(.flatpickr-input) {
    background-color: transparent;
    border: none;
    font-size: inherit;
    height: auto;
    padding: 0;

    &:focus {
      border: none;
      outline: 0;
    }
  }

  &::placeholder {
    color: @gray-light;
  }
}

textarea {
  appearance: none;
  min-height: 65px;
  padding-bottom: 6px;
  padding-top: 6px;
  -moz-appearance: none;
  -webkit-appearance: none;
  resize: vertical;

  &::placeholder {
    color: @gray-light;
  }
}

label {
    font-weight: 500;
    cursor: pointer;
}

label,
legend {
  display: block;
  margin-bottom: .5rem;
}

fieldset {
  padding: 0;
  border-width: 0;
}

input {
  &[type="checkbox"],
  &[type="radio"] {
    display: inline;
  }
  
  &[type="radio"] {
    vertical-align: top;
    margin-top: 4px;
    margin-right: 2px;
  }
}

label > .label-body {
  display: inline-block;
  font-weight: normal;
  margin-left: .5rem;
}

// Code
//––––––––––––––––––––––––––––––––––––––––––––––––––

// Contain overflow in all browsers.
pre {
  overflow: auto;
}

code {
  background: lighten(@gray-light, 6.4%);
  border-radius: @global-radius;
  border: 1px solid @gray-light;
  font-size: 90%;
  margin: 0 .2rem;
  padding: .2rem .5rem;
  white-space: nowrap;
}

pre > code {
  display: block;
  padding: 1rem 1.5rem;
  white-space: pre;
}


//Iframe

iframe {
    width: 100%;
    height: 100%;
    border: none;
}
