:root {
    --karigreen: rgb(3, 87, 42);
}
.view table {
    max-width: 1200px;        /* max table width */
    width: 100%;             /* fills available width */
    overflow-x: auto;        /* scroll if too wide */
    margin: 0 auto;          /* centers table horizontally */
    border-collapse: separate;
    border-spacing: 0;
    border: 2px solid var(--karigreen);
    border-radius: 8px;
}

.view thead th {
  color: var(--karigreen); /* dark green text */
}

.view td {
  border-bottom: 1px solid var(--karigreen);
  padding-left: 16px;   /* space on the left */
  padding-right: 16px;  /* space on the right */
}

.view thead th {
    color: var(--karigreen);
    padding: 16px;
    border-bottom: 4px solid var(--karigreen); /* thick bottom border */
}

.view tbody td:nth-child(2) {
  color: var(--karigreen);
  font-style: italic;
}

.view .view-header {
  display: none !important;
}

/* ============================================
   GENERAL FIX — all normal .tantargyak-collapse-wrapper tables
   ============================================ */
.tantargyak-collapse-wrapper {
  display: block !important;
  max-width: 100%;
}

.tantargyak-collapse-wrapper .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tantargyak-collapse-wrapper .table-responsive table {
  width: max-content;
  min-width: 100%;
}

@media (max-width: 767px) {
  .tantargyak-collapse-wrapper {
    min-width: 0 !important;
    width: 100%;
  }
}

/* ============================================
   SPECIAL-CASE FIX — Törzstárgyak's nested unclassed
   inline-flex wrapper (ECTS badge + table)
   ============================================ */
#collapse-field_torzstargyak div[style*="inline-flex"] {
  display: block !important;
  max-width: 100%;
}

#collapse-field_torzstargyak .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#collapse-field_torzstargyak .table-responsive table {
  width: max-content;
  min-width: 100%;
}

@media (max-width: 767px) {
  #collapse-field_torzstargyak div[style*="inline-flex"] {
    width: 100% !important;
    min-width: 0 !important;
  }
}


