/* Reset and full height for page */
html, body, #root, #react-entry-point {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.full-height-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 15px;
}

.table-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
}

#_dash-app-content > div {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.col-12 {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0; /* important to allow scrolling inside */
}

/* Container fills available space */
.container-fluid {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 15px; /* Bootstrap default padding */
  overflow: hidden; /* Hide overflow to prevent scroll */
}

/* Last row containing the graph grows and hides overflow */
.container-fluid > .row:last-child {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
}

/* Wrapper around the graph: flex-grow + scroll */
.graph-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 10px;
}

/* Graph fills its wrapper */
#table-graph {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden;
}

/* Center text inside headers and paragraphs */
h1, h4, p {
  text-align: center;
  margin-bottom: 1rem;
  margin-top: 0;
  padding-top: 0;
}

#team-filter, .daq-toggle-switch {
  max-width: 100%;
}

.daq-toggle-switch {
  margin-top: 5px;
  white-space: nowrap;
}

.daq-toggle-switch__label {
  font-size: 1rem; /* same as bootstrap base font */
  font-weight: 500;
  margin-bottom: 0;
}

/* Center button group */
.btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Table cells border styling */
th, td {
  border: 1px solid #444;
  padding: 8px;
}

/* Row centering */
.row {
  justify-content: center !important;
  /*text-align: center;*/
}

/* Responsive tweak for smaller screens */
@media (max-width: 991.98px) {
  #table-graph {
    max-width: 100%;
  }
}

#table-header {
  margin-top: 0;
  padding-top: 0;
}

/* Fix left alignment of markdown links */
#table-graph .cell-markdown {
  justify-content: flex-start !important;
  text-align: left !important;
}

#table-graph .cell-markdown p {
  margin: 0;
  padding: 0;
  line-height: 1.3 !important;
  text-align: left !important;
}

#table-graph .cell-markdown p a {
  display: inline !important;
  text-align: left !important;
}

#table-graph .dash-cell-value,
#table-graph .dash-cell-value p,
#table-graph .dash-cell-value div {
    line-height: 1.3 !important;
    margin: 0;
    padding: 0;
}

#table-graph .dash-spreadsheet-inner {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.dash-table-container .dash-spreadsheet-container {
  height: 100% !important;
  overflow-y: auto !important;
}
