.ag-theme-alpine {
  --ag-foreground-color: rgb(0, 50, 73);
  --ag-background-color: rgb(255, 255, 255);
  --ag-header-foreground-color: rgb(255, 255, 255);
  --ag-header-background-color: rgb(0, 50, 73);
  --ag-odd-row-background-color: rgba(0, 0, 0, 0.03);
  --ag-header-column-resize-handle-color: rgb(0, 50, 73);
  --ag-header-cell-hover-background-color: rgb(0, 42, 54);
  --ag-row-hover-color: rgba(101, 187, 169, 0.1);
  --ag-font-size: 12px;
  --ag-secondary-foreground-color: rgb(101, 187, 169);
  --ag-control-panel-background-color: rgb(255, 255, 255);
  --ag-header-cell-moving-background-color: rgb(63, 66, 66);
  font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Grid container with fixed height */
#ag-grid {
  width: 100%;          /* Full width */
  height: 800px;        /* Fixed height */
  overflow-y: auto;     /* Enable vertical scrolling */
  overflow-x: auto;     /* Enable horizontal scrolling if needed */
  position: relative;
}

/* Sticky status bar */
.ag-theme-alpine .ag-status-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background-color: #fff; /* Match background */
}
.ag-header-cell-label,
.ag-cell {
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.ag-header-cell-label,
.ag-header-group-text {
  font-weight: normal; 
  font-size: 12px; 
  white-space: normal !important;
}

.ag-root-wrapper{
  margin-left:20px;
  margin-right:20px;
}

.ag-root-wrapper-body {
  min-height: 400px;
}

.ag-cell {
  font-size: 12px;
}


.ag-filter-toolpanel-group-title {
  color: #00354b; 
}

.ag-theme-alpine .ag-filter-toolpanel-header {
  color: #65BBA9;
}

.ag-theme-alpine .ag-status-bar {
  color: #00354b;
}

.ag-label-ellipsis {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: initial !important;
}

#searchContainer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
  margin-left:20px;
  margin-right:20px;
}

#searchInput {
  flex: 1;
  font-family: Lato, Helvetica, Arial, sans-serif;
  padding: 8px;
  border: 1px solid #ccc;
  margin-right: 10px;
  box-sizing: border-box;
  border-radius: 0;
}

#searchInput:focus {
  outline: none;
  border: 1px solid #00354b;
}

.button-group {
  display: flex;
  gap: 10px; /* Add spacing between buttons */
}

#deselectAllButton, #exportSelectedButton, #selectAllButton, #clearFiltersButton {
  font-family: Lato, Helvetica, Arial, sans-serif;
  color: white;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, height 0.2s ease-in-out;
}

#selectAllButton {
  background-color: #00354b;
}

#deselectAllButton {
  background-color: #599db2;
}

#exportSelectedButton {
  background-color: #65BBA9;
}

#clearFiltersButton {
  background-color: #53a5a1;
}

#deselectAllButton:hover, #exportSelectedButton:hover, #selectAllButton:hover, #clearFiltersButton:hover {
  background-color: #002a36;
}

#deselectAllButton.show, #exportSelectedButton.show, #selectAllButton.show, #clearFiltersButton.show {
  visibility: visible;
  opacity: 1;
  height: auto;
}

.ag-filter-body {
  width: auto !important;
}

.ag-theme-alpine .ag-menu {
  width: 400px;
}

/* Styles for the AG Grid container */
#ag-grid-container {
  padding: 0 20px; /* Add padding to the left and right */
}

/* Styles for smaller screens (Mobile) */
@media (max-width: 768px) {
  #searchContainer {
    flex-direction: column;
    align-items: stretch;
  }
  
  #searchInput {
    margin: 0 0 10px 0;
    width: 100%;
  }
  
  .button-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  
  #deselectAllButton, 
  #exportSelectedButton, 
  #selectAllButton, 
  #clearFiltersButton {
    flex: 1 0 48%;
    margin: 5px 1%;
    padding: 10px 0;
    text-align: center;
    visibility: visible;
    opacity: 1;
    height: auto;
  }

  .ag-theme-alpine .ag-side-bar .ag-tool-panel-wrapper {
    max-width: 300px !important;
  }
}

/* Styles for disabled buttons */
button.disabled {
  background-color: #ccc!important;
  color: #666!important;
  cursor: not-allowed!important;
}

/* Ensure disabled buttons don't change appearance on hover */
button.disabled:hover {
  background-color: #ccc!important;
}

.ag-side-button-label{
  transform: rotate(180deg);
}

.ag-paging-panel>* {
  color:#00354b;
}

.datasheet-note {
  font-size: 14px;
  color: #00354b;
  margin-top: 10px;
  margin-left:20px;
  font-family: Lato, Helvetica, Arial, sans-serif;
  font-style: italic;
}

/* Underline effect on hover */
.accuracy-cell:hover {
  text-decoration: underline;
  color: #00354b; /* Optional: Change color to indicate interactivity */
}

/* Fade-in animation for the modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease-in-out; /* Fade-in effect */
}

.image-modal.show {
  display: block;
  opacity: 1;
}

.image-modal-content {
  position: relative; /* Parent for positioning the close button */
  margin: 15% auto;
  display: flex;
  flex-direction: column; /* Stack content vertically */
  justify-content: center;
  align-items: center;
  background: #00354b; /* Background color */
  width: 80%;
  max-width: 600px;
  border-radius: 0;
  overflow: hidden;
  animation: fadeIn 0.3s ease-in-out;
}


.modal-text {
  width: 90%; /* Full width of modal content */
  text-align: center; /* Center-align the text */
  padding: 10px; /* Add padding for spacing */
  font-family: 'Lato', Helvetica, Arial, sans-serif; /* Use selection tool font */
  font-size: 14px; /* Adjust font size */
  font-weight: bold; /* Make the text bold */
  color: #ffffff; /* Set text color to white */
  background-color: #00354b; /* Same background as modal */
}


.image-modal img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.close-button {
  position: absolute; /* Ensure it is positioned relative to its nearest parent with relative positioning */
  top: 10px; /* Inside the modal-text area */
  right: 10px; /* Align to the right edge of the modal-content */
  font-size: 20px; /* Clean, slightly smaller font size */
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 1001; /* Ensure it stays above other elements */
  background: none;
  border: none;
  line-height: 1; /* Prevent spacing issues */
}

.modal-close-text {
  display: none; /* Default: hidden on desktop */
  width: 100%; /* Full width of modal */
  text-align: center; /* Center the text */
  padding: 10px; /* Add some padding */
  font-family: 'Lato', Helvetica, Arial, sans-serif; /* Match modal font */
  font-size: 12px; /* Adjust font size */
  font-weight: bold;
  color: #ffffff; /* White text */
  background-color: #00354b; /* Match modal background color */
  text-decoration: underline; /* Underline the text for interactivity */
  cursor: pointer; /* Indicate it's clickable */
}

@media (max-width: 768px) {
  .modal-close-text {
      display: block; /* Show on mobile */
  }

  .close-button {
    display: none; /* Hide the close button on mobile */
}
}



/* Optional fade-in keyframes for the content */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: scale(0.95);
  }
  to {
      opacity: 1;
      transform: scale(1);
  }
}


/* Underline effect for cells with images */
.accuracy-cell {
  cursor: pointer;
  text-decoration: underline;
  color: #00354b; /* Optional: Indicates interactivity */
}

/* No underline for cells without images */
.accuracy-cell.no-image {
  text-decoration: none;
  cursor: default;
}

/* Show copy icon on row hover */
.ag-theme-alpine .ag-row:hover .copy-icon {
    opacity: 1 !important;
}

/* Ensure smooth transition */
.copy-icon {
    transition: opacity 0.2s ease !important;
}