/* Default CSS */
/* Generated by the Swanland u3a */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Base table styling */
table.center {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

table.center th, 
table.center td {
  padding: 10px;
  border: 1px solid ##7d7d7d;
}

/* ==========================================
   MOBILE RESPONSIVE STYLES (768px and below)
   ========================================== */
@media screen and (max-width: 768px) {
  /* Force table, rows, and cells to behave like block elements */
  table.center, 
  table.center thead, 
  table.center tbody, 
  table.center th, 
  table.center td, 
  table.center tr { 
    display: block; 
  }
  
  /* Hide table header visually but keep for accessibility */
  table.center thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  /* Format each row into a distinct card */
  table.center tbody tr {
    margin-bottom: 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    background: #ffffff;
    overflow: hidden;
  }
  
  /* Style individual cells inside card layout */
  table.center td { 
    border: none;
    border-bottom: 1px solid #eee; 
    position: relative;
    padding-left: 35%; /* Reserve space on left for labels */
    text-align: left !important;
    min-height: 40px;
  }
  
  table.center td:last-child {
    border-bottom: none;
  }
  
  /* Inject the column labels from data-title attribute */
  table.center td::before { 
    content: attr(data-title);
    position: absolute;
    top: 10px;
    left: 12px;
    width: 30%; 
    padding-right: 10px; 
    white-space: nowrap;
    font-weight: bold;
    color: #444;
  }

  /* Optimize images (QR codes) for mobile cards */
  table.center td img {
    max-width: 80px;
    height: auto;
    display: inline-block;
  }
}