$sam-header-row-height: 56px;
$sam-row-height: 48px;
$sam-row-horizontal-padding: 24px;

/**
 * Flex-based table structure
 */
sam-datatable {
  display: block;
}

table.sam-table{
  width: 100%;
}

sam-header-row, tr[sam-header-row] {
  min-height: $sam-header-row-height;
}

sam-row, tr[sam-row], .sam-footer-row {
  padding: 4px 0px 4px 0px;
  min-height: $sam-row-height;
}

sam-row, tr[sam-row], sam-header-row, tr[sam-header-row], .sam-footer-row {
  display: flex;
  // Define a border style, but then widths default to 3px. Reset them to 0px except the bottom
  // which should be 1px;
  border-width: 0;
  border-bottom-width: 1px;
  border-style: solid;
  align-items: center;
  box-sizing: border-box;

  // Workaround for https://goo.gl/pFmjJD in IE 11. Adds a pseudo
  // element that will stretch the row the correct height. See:
  // https://connect.microsoft.com/IE/feedback/details/802625
  &::after {
    display: inline-block;
    min-height: inherit;
    content: '';
  }
}

sam-cell:first-child, sam-header-cell:first-child, .sam-footer-cell:first-child,
td[sam-cell]:first-child, th[sam-header-cell]:first-child {
  padding-left: $sam-row-horizontal-padding;

  [dir='rtl'] & {
    padding-left: 0;
    padding-right: $sam-row-horizontal-padding;
  }
}

sam-cell:last-child, sam-header-cell:last-child, .sam-footer-cell:last-child,
td[sam-cell]:last-child, th[sam-header-cell]:last-child {
  padding-right: $sam-row-horizontal-padding;

  [dir='rtl'] & {
    padding-right: 5px;
    padding-left: $sam-row-horizontal-padding;
  }
}

sam-cell, sam-header-cell, .sam-footer-cell,
td[sam-cell], th[sam-header-cell] {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  min-height: inherit;
  padding: 0 10px 0 10px;
}
sam-cell, sam-header-cell, th[sam-header-cell]{
  flex: 1 0 auto;
}
sam-header-cell{
  overflow: visible;
}
/**
 * SORT
 */
 $sam-sort-header-arrow-margin: 6px;
 $sam-sort-header-arrow-container-size: 12px;
 $sam-sort-header-arrow-stem-size: 10px;
 $sam-sort-header-arrow-pointer-length: 6px;
 $sam-sort-header-arrow-thickness: 2px;
 $sam-sort-header-arrow-hint-opacity: 0.38;

 .sam-sort-header-container {
   display: flex;
   cursor: pointer;
   align-items: center;

   .sam-sort-header-disabled & {
     cursor: default;
   }
 }

 .sam-sort-header-position-before {
   flex-direction: row-reverse;
 }

 .sam-sort-header-button {
   justify-content: center;
   border: none;
   background: 0 0;
   display: flex;
   align-items: center;
   padding: 0;
   cursor: inherit;
   outline: 0;
   font: inherit;
   color: currentColor;
   min-width: 100px;
   span.fa{
     padding-left: 5px;
    }
    &:focus{
      outline: 2px dotted #aeb0b5;
      outline-offset: 3px;
      box-shadow: none;
    }
 }

 .sam-sort-header-arrow {
   height: $sam-sort-header-arrow-container-size;
   width: $sam-sort-header-arrow-container-size;
   min-width: $sam-sort-header-arrow-container-size;
   position: relative;
   display: flex;

   &,
   [dir='rtl'] .sam-sort-header-position-before & {
     margin: 0 0 0 $sam-sort-header-arrow-margin;
   }

   .sam-sort-header-position-before &,
   [dir='rtl'] & {
     margin: 0 $sam-sort-header-arrow-margin 0 0;
   }
 }

 .sam-sort-header-stem {
   background: currentColor;
   height: $sam-sort-header-arrow-stem-size;
   width: $sam-sort-header-arrow-thickness;
   margin: auto;
   display: flex;
   align-items: center;
 }

 .sam-sort-header-indicator {
   width: 100%;
   height: $sam-sort-header-arrow-thickness;
   display: flex;
   align-items: center;
   position: absolute;
   top: 0;
   left: 0;
 }

 .sam-sort-header-pointer-middle {
   margin: auto;
   height: $sam-sort-header-arrow-thickness;
   width: $sam-sort-header-arrow-thickness;
   background: currentColor;
   transform: rotate(45deg);
 }

 .sam-sort-header-pointer-left,
 .sam-sort-header-pointer-right {
   background: currentColor;
   width: $sam-sort-header-arrow-pointer-length;
   height: $sam-sort-header-arrow-thickness;
   position: absolute;
   top: 0;
 }

 .sam-sort-header-pointer-left {
   transform-origin: right;
   left: 0;
 }

 .sam-sort-header-pointer-right {
   transform-origin: left;
   right: 0;
 }

 /**
 * sam-styles custom
 */
 .sam.large.table{
   overflow-x: auto;
 }

.sam-datatable-horizontal{
  overflow-x: auto;
}
.sam-datatable-horizontal::-webkit-scrollbar {
  height: 7px;
}
.sam-datatable-horizontal::-webkit-scrollbar-thumb {
  border-radius: 2px;
}
