/* File: carbontransparency.css */

/* Make sure the page title is centered and displayed */
.carbontransparency-index-index .page-title {
  display: block !important;
  text-align: center;
  margin-bottom: 0;
}

/* Overall container */
.carbon-transparency-dashboard {
  font-family: Arial, sans-serif;
  margin: 30px auto;
  max-width: 1100px;
  padding: 0 20px;
  color: #333;
}

/* Title & sub-title */
.carbon-transparency-dashboard h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #52853E;
  margin-bottom: 10px;
  text-align: center;
}

.carbon-transparency-dashboard .tag-line {
  text-align: center;
}

.carbon-transparency-dashboard p {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #555;
}

/* Filter section layout */
.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.filter-section label {
  font-weight: 600;
  margin-right: 5px;
}

.filter-section select,
.filter-section input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* --- Table styling updates --- */

/* 
   Use 'separate' and some vertical spacing so each row can have 
   its own background and rounded corners without borders.
*/
.carbon-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;  /* 8px vertical gap between rows, 0 horizontal */
  margin-bottom: 15px;
  border: none;
}

/* Header row: no background, no bottom border */
.carbon-table thead th {
  background-color: transparent; /* no background */
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  border: none; /* remove any default line at bottom */
}

/* Zebra striping in tbody: odd rows grey, even rows white */
.carbon-table tbody tr:nth-child(odd) {
  background-color: #f3f3f3;
}
.carbon-table tbody tr:nth-child(even) {
  background-color: #fff;
}

/* Table cells: no bottom border, consistent padding */
.carbon-table tbody td {
  padding: 10px 8px;
  border: none;
}

/* The FIRST and LAST cells in each row get rounded corners */
.carbon-table tbody tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.carbon-table tbody tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}


/* Keep the first column (Month) left aligned */
.carbon-table tbody td:first-child {
  text-align: left;
}

/* Center all other body columns */
.carbon-table tbody td:not(:first-child) {
  text-align: center;
}

/* Also center the total row’s numeric cells in the footer
   (assuming your first cell in the footer is "TOTAL" label)
*/
.carbon-table tfoot td:not(:first-child) {
  text-align: center;
}

/* Footer (TOTAL row): darker grey, also with corners */
.carbon-table tfoot tr {
  background-color: #ccc; /* darker grey for emphasis */
}

/* Foot cells: no border, bold text */
.carbon-table tfoot td {
  font-weight: 600;
  padding: 10px 8px;
  border: none;
}

.carbon-table tfoot tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.carbon-table tfoot tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* -- No wrapping for the first column (Month) -- */
/* You can also do an nth-child or target a class. This is simplest: */
.carbon-table tbody td:first-child {
  white-space: nowrap;  /* stop wrapping */
}

/* --- Pagination buttons --- */
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.pagination button {
  background-color: #5da845;
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.pagination button[disabled] {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Page info text */
#page-info {
  /* Adjust font-size if needed */
}

/* Footnotes */
/* For the superscript footnote links in the headers */
.footnote-link {
  text-decoration: none;   /* remove underline, if desired */
  color: #666;            /* a subtle color */
  font-weight: bold;
}

.footnote-link:hover {
  color: #333; /* slightly darker on hover */
}

/* For the footnote text paragraphs */
.footnotes p {
  margin-bottom: 8px;
}
.footnotes p strong {
  margin-right: 4px;
}

/* --- Top filter row container (All months + Filter + Search) --- */
.top-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes search box to the right side */
  background-color: #fafafb;      /* or #f8f8fc, depending on your mockup color */
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Left side container (All months label + Filter) */
.filter-left {
  display: flex;
  align-items: center;
  gap: 20px; /* space between “All months” and filter selection */
}

/* "All months(17)" label style */
.all-months {
  font-weight: 600;
  color: #52853E;
}

.filter-by {
  display: inline-flex; 
  align-items: center;
  gap: 6px;
}

.filter-by label {
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.filter-by select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
}

/* Right side search box */
.search-box {
  display: flex;
  align-items: center;
  background-color: #f3f4f8; 
  border-radius: 4px;
  padding: 4px 8px;
  border: 1px solid #eee;
}

.search-icon {
  margin-right: 8px;
  color: #999;
}

/* The search input */
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  padding: 6px 0;
  color: #333;
}

.search-box input::placeholder {
  color: #aaa;
}

/* Responsive Table - Enable Horizontal Scroll on Small Screens */
@media screen and (max-width: 768px) {
 .top-filter-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px; /* Add spacing between rows */
  }

  .filter-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px; /* Space between "All months" and Filter dropdown */
    width: 100%;
  }

  .search-box {
    width: 100%; /* Make search bar take full width */
    max-width: 100%;
    box-sizing: border-box;
  }

.search-box input {
    width: 100%; /* Ensures it fits inside .search-box */
    max-width: calc(100% - 20px); /* Prevents overflow, adjusts for padding */
    border: none;
    background: transparent;
    outline: none;
    padding: 6px 10px;
    color: #333;
    box-sizing: border-box;
}
  .carbon-transparency-dashboard {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

.table-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }

 .carbon-table thead th {
    position: sticky;
    top: 0;
    background: white; /* Keep the background visible while scrolling */
    z-index: 10;
    text-align: center;
    width: auto;
  }

  .carbon-table {
    display: table;
    min-width: 800px;
    width: 100%;
    table-layout: fixed;
  }



  .carbon-table thead {
    display: table-header-group; /* Keeps headers aligned with columns */
    width: 100%;
  }

  .carbon-table tbody {
    display: table-row-group;
    width: 100%;
  }

  .carbon-table tfoot {
    display: table-footer-group;
    width: 100%;
  }


  .carbon-table tbody tr,
  .carbon-table tfoot tr {
    display: table;
    width: 100%;
  }

  /* Ensure proper spacing for readability */
  .carbon-table th,
  .carbon-table td {
    padding: 10px;
    min-width: 120px; /* Adjust for readability */
  }
}
