/* Basic Reset */
body, h1, h2, table, th, td {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: #f0f0f0;
  color: #333;
  padding: 10px;
  font-size: 16px; /* Set a base font size for better readability */
}

/* Flex container for the content section */
.table_dates_container {
  flex-grow: 1;
  padding: 20px;
  overflow-x: auto; /* Allow horizontal scroll for the table if needed */
}

/* Headings */
h1 {
  color: #004d99;
  border-bottom: 3px solid #004d99;
  padding-bottom: 10px;
  margin-bottom: 30px;
  font-size: 1.5rem; /* Use rem for responsive font size */
  text-transform: uppercase;
}

h2 {
  color: #004d99;
  font-size: 1.25rem; /* Use rem for responsive font size */
  margin-bottom: 20px;
}

/* Table styling */
table {
  width: 100%; /* Full width for better responsiveness */
  margin-bottom: 40px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  table-layout: auto; /* Let the table layout adjust to content */
  margin-left: 0;  /* Align table to the left */
  margin-right: auto; /* Center the table */
}

th, td {
  padding: 8px 15px; /* Slightly larger padding for better touch accuracy */
  text-align: center;
  border-bottom: 1px solid #ddd;
  white-space: nowrap; /* Prevent wrapping in cells */
  font-size: 0.9rem; /* Use rem for table text size */
}

/* Ensure table columns adjust to the widest element */
th {
  font-weight: bold;
}

thead {
  background-color: #004d99;
  color: #fff;
}

tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

tbody tr:nth-child(even) {
  background-color: #ffffff;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

/* Hover Effect for Non-editable Cells */
td[contenteditable="false"]:hover {
  color: rgb(255, 0, 0);
  cursor: not-allowed; /* Show that it's non-editable */
}

/* Hover Effect for Editable Cells */
td[contenteditable="true"]:hover {
  background-color: #04AA6D;
  color: white;
  cursor: text; /* Indicate that it can be edited */
}

/* Scrollable table for small screens */
.table_dates_container {
  overflow-x: auto; /* Allow horizontal scroll */
}

/* Media Query for Smaller Screens */
@media screen and (max-width: 600px) {
  /* Adjust font sizes for mobile */
  body {
    font-size: 14px; /* Slightly smaller font for mobile */
  }

  h1 {
    font-size: 1.3rem; /* Smaller size for mobile */
  }

  h2 {
    font-size: 1.1rem; /* Smaller size for mobile */
  }

  th, td {
    padding: 5px 10px; /* Reduce padding for smaller screens */
    font-size: 0.8rem; /* Adjust text size for table cells */
  }
}
