﻿/* Remove scrollbar style from bootstrap */
@media (max-width: 650px) {
  .table-responsive {
    overflow-x: hidden;
  }
}

.table-responsive {
  overflow-x: unset;
}

/* Set minimum height if td is blank */
@media (max-width: 650px) {
  #no-more-tables td {
    min-height: 100px;
  }
}

/* Overwrite bootstrap behaviour between 767px - 650px */
@media (max-width: 767px) {
  .table-responsive > .table-bordered {
    border: 1px solid #dddddd;
  }
}

@media (max-width: 650px) {
  /* Remove table border again */
  .table-responsive > .table-bordered {
    border: none;
  }

  /* Align with other elements on vieworder page - might as well apply to all instances */
  #no-more-tables {
    padding: 10px;
  }

  /* Force table to not be like tables anymore */
  #no-more-tables table,
  #no-more-tables thead,
  #no-more-tables tbody,
  #no-more-tables th,
  #no-more-tables td,
  #no-more-tables tr {
    display: block;
  }

  /* Hide table headers (but not display: none;, for accessibility) */
  #no-more-tables thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* Border/radius style */
  #no-more-tables tr {
    border: 1px solid #d9e7f0;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  #no-more-tables td {
    /* Behave like a "row" */
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
    white-space: normal;
    text-align: center !important;
  }

  #no-more-tables td:before {
    /* Now like a table header */
    position: absolute;
    /* Top/left values mimic padding */
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }

  /* Label the data */
  #no-more-tables td:before {
    content: attr(data-title);
  }
}
