/**
 * Responsive tables
 *
 * @see http://bootsnipp.com/snippets/featured/no-more-tables-respsonsive-table
 */
@media only screen and (max-width: 992px) {
  /* 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;
    right: -9999px;
  }

  .no-more-tables tr { border: 1px solid #ccc; }

  .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: right;
  }
  [dir=rtl] .no-more-tables td {
    text-align: left;
    padding-left: initial;
    padding-right: 50%;
  }

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

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

  /* handle long content. prevent overlap with th */
  .no-more-tables td[data-long-content] {
    padding-top: 2.5em;
  }
}

@media only screen and (max-width: 800px) {
  .no-more-tables tbody tr {
    margin-top: 1.8em;
  }
  .no-more-tables caption {
    display: block !important;
  }
}

/**
 * Allow undoing the no-more-tables by the `undo-no-more-tables` class
 */
@media only screen and (max-width: 992px) {
  /* Force table to not be like tables anymore */
  table.undo-no-more-tables,
  table.undo-no-more-tables thead,
  table.undo-no-more-tables tbody,
  table.undo-no-more-tables th,
  table.undo-no-more-tables td,
  table.undo-no-more-tables tr {
    display: revert;
  }
  table.undo-no-more-tables thead tr {
    position: static;
  }
  table.undo-no-more-tables td {
    border: initial;
    border-bottom: initial;
    position: static;
    padding-right: initial;
    white-space: normal;
    text-align: initial;
  }
  table.undo-no-more-tables td:before {
    position: static;
    width: auto;
    padding-left: initial;
  }
  table.undo-no-more-tables td:before {
    content: '';
  }
}
