/* CSS for NetSTORM IDF tables */
/* 8/22 class Left added for gage metadata table */
/* 8/24 - add IDF map page styles */
/* 8/25 - add borders for standard tables to improve IDF/CI tables; add Left2 class for banner and metadata  */

/* General Table Styling */
table {
  border-collapse: collapse;
  font-family: serif;
}

th, td {
  padding: 5px;
  text-align: center;
  border: 1px solid #ddd;
}

/* Add extra left padding to all columns except first */
th:not(:first-child), 
td:not(:first-child) {
  padding-left: calc(5px + 1ch); /* 1 character space + original padding */
}

th {
  background-color: skyblue;
  position: sticky;
  top: 0;
  font-weight: bold; /* Header rows should be bold */
  text-transform: none; /* Ensure no text transformation */
}

/* Left-justify first column of headers */
th:first-child {
  text-align: left;
}

tr:hover {
  background-color: silver;
}

td {
  padding: 1px;
  text-align: right;
  white-space: nowrap;
}

/* Caption Styling */
caption {
  display: table-caption;
  text-align: left;
  font-weight: bold;
  width: 100%;
  margin-bottom: 10px;
}

/* Button Styling */
.button {
  background-color: transparent;
  border: 2px solid #008CBA;
  padding: 6px 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer; /* Changed from 'copy' to standard pointer */
  font-family: serif;
  text-align: left;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #008CBA;
  color: white;
}

/* Alignment Classes */
.left {
  text-align: left;
}

.Left1 td:first-child {
  text-align: left;
}

/* Left2 class - borderless tables with left-aligned first column */
.Left2 {
  border: none;
  border-collapse: collapse;
}

.Left2 th, 
.Left2 td {
  border: none; text-align: left;
}

/*
.Left2 td:first-child {
  text-align: left;
  font-weight: bold; 
} 
*/

/* Remove hover effects for borderless tables */
.Left2 tr:hover {
  background-color: transparent;
}

/* Media Query for Print */
@media print {
  .pagebreak {
    page-break-after: always;
  }
  
  /* Ensure table headers print on each page */
  th {
    position: static;
  }
  
  /* Remove hover effects in print */
  tr:hover {
    background-color: transparent;
  }
}

/* Link Styling */
a {
  text-decoration: none;
  color: #008CBA;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: #5a6c7d;
}

/* Info Box Styling */
.info {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.9); /* Slightly more opaque */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid #e0e0e0;
}

.info h4 {
  margin: 0 0 8px 0;
  color: #555;
  font-size: 16px;
}

/* Legend Styling */
.legend {
  line-height: 28px;
  color: #555;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 3px;
  }
  
  .button {
    font-size: 16px;
    padding: 4px 8px;
  }
}

/* Toggle button styles */
.toggle-controls {
  position: absolute;
  bottom: 40px;
  right: 10px;
  z-index: 1000;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.toggle-button {
  display: block;
  margin: 5px 0;
  padding: 5px 10px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.toggle-button.active {
  background: #4CAF50;
  color: white;
  border-color: #45a049;
}

.toggle-button:hover {
  background: #e0e0e0;
}

.toggle-button.active:hover {
  background: #45a049;
}

.toggle-button img {
  vertical-align: middle;
  margin-right: 8px;
}