//
// @description :
// @author      : Adarsh Pastakia
// @copyright   : 2017
// @license     : MIT
@import "compass/reset";

body,
html {
  height          : 100%;
  width           : 100%;
  padding         : 0;
  margin          : 0;
  line-height     : 1.5;
  overflow        : hidden;
  cursor          : default;
  @include user-select(none);

  color           : $base-text;
  background-color: $base-bg;

  font            : {
    family: $base-font-family;
    size  : $base-font-size;
    weight: $font-weight-normal;
  }

  .ui-selectable {
    cursor: text;
    @include user-select(text);
  }
}

*,
*:after,
*:before {
  @include box-sizing(border-box);
  @include selection($secondary, contrast-color($secondary));
  @include input-placeholder {
    color: rgba($input-text,.3);
  }
}

input::-ms-clear,
select::-ms-clear,
textarea::-ms-clear {
  display: none;
}

input:-webkit-autofill,
select:-webkit-autofill,
textarea:-webkit-autofill {
  background-color: transparent !important;
}

a {
  text-decoration: none;
}

img {
  border: none;
}

hr {
  background  : none;
  margin      : 0.25em;
  border      : 1px solid transparent;
  border-width: 1px 0;
  border-color: rgba(#373737, .3) rgba(#373737, .3) #F7F9F0 #F7F9F0;
  @include transform(scaleY(.5));
}

a,
button {
  cursor : pointer;
  outline: none;
  color  : inherit;
}

.ui-link,
a {
  position: relative;
  color   : $link-text;

  &:hover {
    color: $link-hover-text;
  }

  &:not(.noarrow)[target="_blank"]:after {
    content       : '\2B08';
    font-size     : 0.85em;
    display       : inline-block;
    width         : 1em;
    height        : 1em;
    margin        : 0 0.1em;
    vertical-align: super;
  }
}

textarea {
  resize: vertical;
}

input,
textarea {
  font-size  : 1em;
  line-height: 1;
  outline    : none !important;
  font-family: $base-font-family-input;
}

table {
  table-layout   : fixed;
  border-spacing : 0;
  border-collapse: collapse;
}

caption,
td,
th {
  padding   : 0;
  text-align: start;
}

.ui-table {
  caption,
  td,
  th {
    padding: 0 0.25em;
  }

  &.bordered {
    th {
      font-weight: $font-weight-strong;
      border     : 1px solid rgba($base-border-color, .5);
    }

    td {
      border: 1px solid rgba($base-border-color, .5);
    }
  }

   > tr,
  > tbody > tr {
    &:nth-child(odd) > td {
      background: $datagrid-row-odd-bg;
      color     : $datagrid-row-odd-text;
    }

    &:nth-child(even) > td {
      background: $datagrid-row-even-bg;
      color     : $datagrid-row-even-text;
    }
  }
}
