// Tables
//
// Located in `wyrm_core/_tables.sass`. Table classes are additive so you can mix and match as you need.
//
// Markup:
// <table class="wy-table {$modifiers}">
//  <thead>
//    <tr>
//      <th>Game</th>
//      <th>Developer</th>
//      <th>Description</th>
//    </tr>
//  </thead>
//  <tbody>
//    <tr>
//      <td>
//        Baldur's Gate II
//      </td>
//      <td>
//        Bioware
//      </td>
//      <td>
//        Boo has a space hamster. Imoen whines a bunch.
//      </td>
//    </tr>
//    <tr>
//      <td>
//        Icewind Dale II
//      </td>
//      <td>
//        Black Isle
//      </td>
//      <td>
//        Fly around on an airship, then kill tons of ice monsters.
//      </td>
//    </tr>
//    <tr>
//      <td>
//        Temple of Elemental Evil
//      </td>
//      <td>
//        Trokia
//      </td>
//      <td>
//        Turn based! Do everything 10 times slower.
//      </td>
//    </tr>
//  </tbody>
// </table>
//
// .full-width                - 100% width
// .wy-table-bordered         - Border the table itself.
// .wy-table-bordered-rows    - Border just the rows.
// .wy-table-bordered-all     - Border the columns, rows, and the table.
// .wy-table-striped          - Alternating row colors.
//
// Styleguide 3


.wy-table
  border-collapse: collapse
  border-spacing: 0
  empty-cells: show
  margin-bottom: $base-line-height
  caption
    color: #000
    font: italic 85%/1 arial, sans-serif
    padding: 1em 0
    text-align: center
  td, th
    font-size: $table-font-size
    margin: 0
    overflow: visible
    padding: $table-padding-size
  td:first-child, th:first-child
    border-left-width: 0
  thead
    color: #000
    text-align: left
    vertical-align: bottom
    white-space: nowrap
    th
      font-weight: $base-font-family-bold
      border-bottom: solid 2px $table-border-color
  td
    background-color: transparent
    vertical-align: middle

.wy-table td p
  line-height: $base-line-height * .75
  &:last-child
    margin-bottom: 0
.wy-table .wy-table-cell-min
  width: 1%
  padding-right: 0
  input[type=checkbox], input[type=checkbox]
    margin: 0

.wy-table-secondary
  color: $text-medium
  font-size: 90%
.wy-table-tertiary
  color: $text-medium
  font-size: 80%

// Striped

.wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td
  background-color: $table-stripe-color

.wy-table-backed
  background-color: $table-stripe-color


/* BORDERED TABLES

.wy-table-bordered-all
  border: 1px solid $table-border-color
  td
    border-bottom: 1px solid $table-border-color
    border-left: 1px solid $table-border-color
  tbody > tr:last-child td
    border-bottom-width: 0

.wy-table-bordered
  border: 1px solid $table-border-color

.wy-table-bordered-rows
  td
    border-bottom: 1px solid $table-border-color
  tbody > tr:last-child td
    border-bottom-width: 0

.wy-table-horizontal
  tbody > tr:last-child td
    border-bottom-width: 0
  td, th
    border-width: 0 0 1px 0
    border-bottom: 1px solid $table-border-color
  tbody > tr:last-child td
    border-bottom-width: 0
/* RESPONSIVE TABLES

.wy-table-responsive
  margin-bottom: $base-line-height
  max-width: 100%
  overflow: auto
  table
    margin-bottom: 0 !important
    td, th
      white-space: nowrap
