@media (max-width: 600px) {
  .tabulator {
    font-size: 0.85rem; /* smaller text */
  }
  .tabulator-header, .tabulator-row {
    white-space: normal; /* wrap long text */
  }
}

body
{
    background-color:var(--themeColour);
    font-family: 'Lato', sans-serif;
    color:white;
}
.logo
{
      max-height:75%;
      width:800px;
      max-width:60%;
      display: block;
      margin-left: auto;
      margin-right: auto;
}
.overText
{
      position: absolute;
      bottom: 5%;
      left: 70%;
      color:red;
      font-size:50px;
      text-align: center;
      font-weight:bold;
}
.tag
{
      color:red;
      font-size:50px;
      text-align: center;
      font-weight:bold;
}
.tagContainer
{
    display: block;
    width:100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 1200px; /* keeps it from stretching too wide on desktop */
    margin: 0 auto;
    padding: 1rem;
}
.linkContainer
{
    justify-content: center;
    align-items: center;
    width:100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 1200px; /* keeps it from stretching too wide on desktop */
    margin: 0 auto;
    padding: 1rem;
}
.menuContainer
{
    color:white;
    font-size:20px;
    width:100%;
    max-width: 1200px; /* keeps it from stretching too wide on desktop */
    margin: 0 auto;
    padding: 1rem;
}
.search
{
    width: 100%;
    max-width: 400px;
    padding: 12px 60px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 20px;
    background-image: url('img/magnifier.png');
    background-position: 10px 2px; 
    background-size: contain;
    background-repeat: no-repeat;
}
.searchButton
{
    padding: 0.4rem 0.8rem;
    border: none;
    background-color: #0077cc;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    /*padding: 12px 12px 12px 12px;
    border-radius: 10px;
    height:30px;
    background-color:white;
    display: inline-flex;
    align-items: center;
    font-size:20px;*/
}

.summaryTitle
{
    font-size:30px;
    font-weight:bold;
    text-align:center;
    margin-top:20px;
    margin-bottom:10px;
}

.summaryPrimary
{
    font-size:24px;
    font-weight:bold;
    text-align:center;
    margin-top:10px;
    margin-bottom:5px;
}

.summarySecondary
{
    font-size:18px;
    font-weight:normal;
    text-align:center;
    margin-top:5px;
    margin-bottom:20px;
}

#results {
    display: block; /* allows width to shrink to fit content */
    width: 100%;
    max-width: 100%; /* prevents overflow on small screens */
    margin:0 auto;
    overflow-x: hidden;
}

#results-container {
    text-align: center;  /* centers inline-block children horizontally */
}

#topbar {
  display: flex;
  align-items: center;     /* Vertically center items */
  text-align: center;
  justify-content: space-between; /* Spread items across */
  gap: 0.5rem;             /* Space between elements */
  flex-wrap: wrap;         /* Allow wrapping on small screens */
  padding: 0.5rem 1rem;
  background: var(--themeColour);     /* Example background */
  border-bottom: 1px solid #ddd;
}

/* Logo */
#topbar #logo {
  height: 40px;
  width: auto;
}

/* Search box */
#topbar input[type="text"],
#topbar input[type="search"] {
  flex: 1;                 /* Take available space */
  min-width: 150px;
  padding: 12px 60px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 18px;
}

/* Button container */
#topbar .buttons {
  display: flex;
  gap: 0.5rem;
}

#browseButton {
  cursor: pointer;
}

/* Flex container for input + buttons */
.searchRow {
    display: flex;
    flex-wrap: wrap;         /* allows wrapping on small screens */
    gap: 10px;               /* space between input and buttons */
    align-items: center;     /* vertically center buttons with input */
}

/* Input grows to fill remaining space */
.searchRow .search {
    flex: 1 1 300px; /* grow and shrink; min width 300px */
}

/* Buttons stay in a row */
.buttonRow {
    display: flex;
    gap: 10px;
    flex: 0 0 auto; /* don’t shrink */
}

/* Responsive tweak for small screens */
@media (max-width: 600px) {
    .searchRow {
        flex-direction: column; /* stack input + buttons */
        align-items: stretch;
    }

    .buttonRow {
        justify-content: center;
    }

    .searchRow .search {
        width: 100%;
    }
}

#topbar button {
  padding: 0.4rem 0.8rem;
  border: none;
  background-color: #0077cc;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

#topbar button:hover {
  background-color: #005fa3;
}

/* 📱 Responsive tweak for mobile */
@media (max-width: 600px) {
  #topbar {
    flex-direction: column;
    align-items: stretch;
  }

  #topbar input[type="text"],
  #topbar input[type="search"] {
    width: 100%;
  }

  #topbar .buttons {
    justify-content: center;
  }
}

.tabulator-responsive-collapse {
  color: black !important;
}

/* Also make sure inner text elements inherit the color */
.tabulator-responsive-collapse * {
  color: inherit !important;
}

/* make wrapped column cells wrap and let rows expand */
.tabulator-cell.wrap {
  white-space: normal !important;
  word-break: break-word !important;
  height: auto !important;
  overflow: visible !important;
}
.tabulator-row {
  height: auto !important;
}

.tabulator-row .clickable {
    cursor: pointer;
    color: blue;
}

.tabulator-row .clickable:hover {
    text-decoration: underline;
}

.tabulator-cell.wrapClickable {
    white-space: normal !important;
    word-break: break-word !important;
    height: auto !important;
    overflow: visible !important;
    cursor: pointer;
    color: blue;
}

.tabulator-cell.wrapClickable:hover {
    text-decoration: underline;
}
