/* ==========================================
   DVORAK CI CHART – CSS
========================================== */

.marine-table {
  width: 100%;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Base table */
#main-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #ffffff;
}

/* Header */
#main-table thead th {
  background-color: #005ea2;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid #cfcfcf;
  white-space: normal;
}

/* Body cells */
#main-table td {
  padding: 0.65rem 0.5rem;
  text-align: center;
  border: 1px solid #d9d9d9;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
}

/* Remove any forced heights */
#main-table tr {
  height: auto !important;
}

/* Optional zebra striping */
#main-table tbody tr:nth-child(even) {
  background-color: #f5f5f5;
}

/* Subhead styling */
.subhead {
  font-size: 0.8rem;
  font-weight: 400;
  display: block;
}

/* ==========================================
   Mobile Stacked Layout
========================================== */

@media (max-width: 768px) {

  /* Hide header row */
  #main-table thead {
    display: none;
  }

  /* Convert structure */
  #main-table,
  #main-table tbody,
  #main-table tr,
  #main-table td {
    display: block;
    width: 100%;
  }

  /* Each row becomes a card */
  #main-table tr {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
  }

  /* Each cell stacks */
  #main-table td {
    border: none;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    padding: 0.5rem 0;
  }

  #main-table td:last-child {
    border-bottom: none;
  }

  /* Label above value */
  #main-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1b1b1b;
  }

  /* ==========================================
     This section is a quick fix for empty 
     cells in responsive view
  ========================================== */

  #main-table td:empty::before {
    content: attr(data-label) ": —";
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    color: #777;
  }

}
