/* ==========================================================================
   Wills Wing Table Styles
   Consolidated from easy-table-base.css, easy-table.css (Bootstrap 2.0.3
   subset), and ww-custom.css section 1. Uses brand CSS variables.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tablesorter Header (from easy-table-base.css)
   -------------------------------------------------------------------------- */
table.tablesorter thead tr .easy-table-header {
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center right;
}
table.tablesorter thead tr .easy-table-header:hover { background-image: none; }
table.tablesorter thead tr .headerSortUp,
table.tablesorter thead tr .headerSortDown:hover { background-image: none; }
table.tablesorter thead tr .headerSortDown,
table.tablesorter thead tr .headerSortUp:hover { background-image: none; }

/* --------------------------------------------------------------------------
   2. Base Table Layout
   -------------------------------------------------------------------------- */
table.easy-table {
  max-width: 100%;
  width: 100%;
  background-color: transparent;
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 18px;
}

.easy-table th,
.easy-table td {
  padding: 8px 12px;
  line-height: 18px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--ww-border-light);
}

.easy-table thead th { vertical-align: bottom; }

.easy-table caption + thead tr:first-child th,
.easy-table caption + thead tr:first-child td,
.easy-table colgroup + thead tr:first-child th,
.easy-table colgroup + thead tr:first-child td,
.easy-table thead:first-child tr:first-child th,
.easy-table thead:first-child tr:first-child td { border-top: 0; }

.easy-table tbody + tbody { border-top: 2px solid var(--ww-border-light); }

table.easy-table caption { font-weight: bold; }

/* Condensed variant */
.table-condensed th,
.table-condensed td { padding: 4px 5px; }

/* Bordered variant */
.table-bordered {
  border: 1px solid var(--ww-border-light);
  border-collapse: separate;
  border-left: 0;
  border-radius: 4px;
}
.table-bordered th,
.table-bordered td { border-left: 1px solid var(--ww-border-light); }

.table-bordered caption + thead tr:first-child th,
.table-bordered caption + tbody tr:first-child th,
.table-bordered caption + tbody tr:first-child td,
.table-bordered colgroup + thead tr:first-child th,
.table-bordered colgroup + tbody tr:first-child th,
.table-bordered colgroup + tbody tr:first-child td,
.table-bordered thead:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child td { border-top: 0; }

.table-bordered thead:first-child tr:first-child th:first-child,
.table-bordered tbody:first-child tr:first-child td:first-child { border-top-left-radius: 4px; }
.table-bordered thead:first-child tr:first-child th:last-child,
.table-bordered tbody:first-child tr:first-child td:last-child { border-top-right-radius: 4px; }
.table-bordered thead:last-child tr:last-child th:first-child,
.table-bordered tbody:last-child tr:last-child td:first-child { border-bottom-left-radius: 4px; }
.table-bordered thead:last-child tr:last-child th:last-child,
.table-bordered tbody:last-child tr:last-child td:last-child { border-bottom-right-radius: 4px; }

/* Striped variant */
.table-striped tbody tr:nth-child(odd) td,
.table-striped tbody tr:nth-child(odd) th { background-color: #f9f9f9; }

/* --------------------------------------------------------------------------
   3. Brand Styling (from ww-custom.css section 1)
   -------------------------------------------------------------------------- */
.easy-table th {
  background-color: var(--ww-table-header-bg);
  color: var(--ww-table-header-color);
  font-weight: 600;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border-top: none;
}

.easy-table td {
  font-size: 14px;
  border-color: var(--ww-table-border);
}

.easy-table tbody tr:nth-child(even) {
  background-color: var(--ww-table-alt-row);
}

.easy-table tbody tr:hover td,
.easy-table tbody tr:hover th {
  background-color: var(--ww-table-hover);
}

/* Options table: description + part number layout */
.easy-table .col-description { width: 70%; }
.easy-table .col-partno { width: 15%; }
.easy-table .col-price { width: 15%; }

/* Spec tables: center values for merged cells */
.easy-table td[colspan] { text-align: center; }

/* --------------------------------------------------------------------------
   4. Responsive Table (mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .table-responsive {
    width: 100%;
    margin-bottom: 15px;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--ww-border-light);
  }
  .table-responsive > .table { margin-bottom: 0; }
  .table-responsive > .table > thead > tr > th,
  .table-responsive > .table > tbody > tr > th,
  .table-responsive > .table > tfoot > tr > th,
  .table-responsive > .table > thead > tr > td,
  .table-responsive > .table > tbody > tr > td,
  .table-responsive > .table > tfoot > tr > td { white-space: nowrap; }
  .table-responsive > .table-bordered { border: 0; }
  .table-responsive > .table-bordered > thead > tr > th:first-child,
  .table-responsive > .table-bordered > tbody > tr > th:first-child,
  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
  .table-responsive > .table-bordered > thead > tr > td:first-child,
  .table-responsive > .table-bordered > tbody > tr > td:first-child,
  .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; }
  .table-responsive > .table-bordered > thead > tr > th:last-child,
  .table-responsive > .table-bordered > tbody > tr > th:last-child,
  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
  .table-responsive > .table-bordered > thead > tr > td:last-child,
  .table-responsive > .table-bordered > tbody > tr > td:last-child,
  .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; }
  .table-responsive > .table-bordered > tbody > tr:last-child > th,
  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
  .table-responsive > .table-bordered > tbody > tr:last-child > td,
  .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; }
}
