@import "../colors";
@import "../fonts";

.ltx_tabular {
  @include font-sans();

  border-collapse: collapse;

  margin: 2em 0;

  .ltx_td,
  .ltx_th {
    // Some tables define their own padding which produces squished, awful tables.
    // This might break some tables, but makes, e.g., 1512.03385 render much better.
    padding: 0.3em 0.8em !important;

    @media (min-width: 768px) {
      padding: 0.5em 0.8em !important;
    }

    // Don't let anything justify a table cell because it looks like ass
    &.ltx_align_justify {
      text-align: left;
    }
  }

  // Normal borders
  .ltx_border_t {
    border-top: 1px solid $borderColor;
  }
  .ltx_border_r {
    border-right: 1px solid $borderColor;
  }
  .ltx_border_b {
    border-bottom: 1px solid $borderColor;
  }
  .ltx_border_l {
    border-left: 1px solid $borderColor;
  }

  // Double borders
  // For now, make these just the same as normal borders.
  .ltx_border_tt {
    border-top: 1px solid $borderColor;
  }
  .ltx_border_rr {
    border-right: 1px solid $borderColor;
  }
  .ltx_border_bb {
    border-bottom: 1px solid $borderColor;
  }
  .ltx_border_ll {
    border-left: 1px solid $borderColor;
  }

  // Light borders
  .ltx_border_T {
    border-top: 1px solid $lightBorderColor;
  }
  .ltx_border_R {
    border-right: 1px solid $lightBorderColor;
  }
  .ltx_border_B {
    border-bottom: 1px solid $lightBorderColor;
  }
  .ltx_border_L {
    border-left: 1px solid $lightBorderColor;
  }
}
