/* Global Styling */
body {
  font-family: "Open Sans", sans-serif;
  color: #333;
}

.navbar-title {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 1px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-align: center;
}

/* Ensure the header spans the full width */
#_dash-app-content > div > nav {
  height: 60px; /* Decrease the height */
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  background: linear-gradient(90deg, #4a90e2, #1464f6); /* Same gradient */
  padding: 10px 0; /* Less padding */
}

/* Header container adjustments */
#_dash-app-content > div > nav {
  height: auto; /* Let it adjust automatically */
  padding: 10px 0; /* Padding reduction */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
  background: linear-gradient(90deg, #4a90e2, #1464f6);
}

/* Adjust header text styling */
.navbar-title.navbar-brand {
  font-size: 28px; /* Default size */
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

/* Responsive header adjustments */
@media (max-width: 768px) {
  .navbar-title.navbar-brand {
    font-size: 22px; /* Reduce font size for smaller screens */
    padding: 4px 10px; /* Compact padding */
  }
}
/* Ensure responsiveness */
@media (max-width: 768px) {
  .navbar-title.navbar-brand {
    font-size: 28px; /* Reduce font size on smaller screens */
  }
  .navbar-container {
    padding: 10px 0; /* Less padding for mobile screens */
  }
}

/* Ensure responsiveness */
@media (max-width: 768px) {
  .navbar-title.navbar-brand {
    font-size: 28px; /* Slightly reduce font size on smaller screens */
  }
}

/* Optional Logo for header */
.header-logo {
  width: 60px; /* Slightly bigger logo */
  height: auto;
  margin-right: 15px; /* Adjust space between logo and text */
  display: inline-block;
  vertical-align: middle; /* Align logo with the text */
}

.linter-header span {
  display: inline-block;
  vertical-align: middle; /* Align text with logo */
}

.content-wrapper,
.content-full-width {
  padding: 0;
  margin: 0;
  margin-left: 220px; /* Sidebar width for non-mobile */
  min-height: 100vh;
  width: calc(100% - 220px);
  max-width: 1200px; /* Limit content width for large screens */
  box-sizing: border-box;
  transition: margin-left 0.3s ease-in-out;
}

@media (max-width: 1200px) {
  .content-wrapper {
    margin-left: 180px;
    width: calc(100% - 180px);
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    margin-left: 0;
    width: 100%;
  }
}

/* Sidebar adjustments */
.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  height: 100vh;
  padding: 15px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  background-color: #2e3c4a;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap; /* Allow items to wrap */
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%; /* Full width on mobile */
    height: auto;
    position: relative; /* Make it inline on mobile */
  }
}
.sidebar-hidden {
  display: none;
}

.content-wrapper-expanded {
  margin-left: 0 !important;
}

/* Sidebar content wrapper for dynamic display */
.sidebar-wrapper {
  background-color: #f5f7fa;
  padding: 20px;
  width: 200px;
  height: 80vh;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f7fa, #e6e9ed);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-title {
  font-size: 22px; /* Adjusted size */
  font-weight: bold;
  color: #00bfa5;
  text-align: center;
  padding: 10px;
  word-wrap: break-word;
  width: 100%;
  margin: 0;
}

.logo-container {
  margin-top: 50px; /* Increase margin to push the logo further down */
  padding-top: 20px; /* Additional padding for separation */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.logo {
  width: 50%;
  height: auto;
  margin: 0 auto;
  padding-bottom: 10px;
  display: block;
}

.modal-content-wrapper {
  padding: 15px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bs-body-color);
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header styling */
.modal-header {
  background-color: var(--bs-gray-100);
  border-bottom: 1px solid var(--bs-gray-300);
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
  color: var(--bs-dark);
}

/* Resource section styling */
.modal-resource {
  font-weight: bold;
  color: #0d47a1;
  padding: 5px 10px;
  background-color: #e3f2fd;
  border-radius: 5px;
  margin-top: 10px;
  display: inline-block;
  font-size: 15px;
}

/* Description section styling */
.modal-description {
  font-weight: bold;
  color: var(--bs-dark);
  font-size: 18px;
  margin: 10px 0 8px; /* Reduced margin */
}

/* Context styling */
.modal-context {
  color: var(--bs-gray);
  font-style: italic;
  margin: 10px 0 8px; /* Reduced margin */
}

/* Links section styling */
.modal-links a {
  display: block;
  margin: 5px 0; /* Reduced margin between links */
  padding: 5px 0;
  color: #3399f3;
  text-decoration: underline;
}

.modal-links a:hover {
  color: #297ac2;
  text-decoration: none;
}

/* Button Styling */
.modal-footer .btn-close {
  background-color: #007bff;
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 16px;
}

.modal-footer .btn-close:hover {
  background-color: #0056b3;
  color: #fff;
}

/* Additional Styling for the Close Button */
.modal-footer {
  padding-top: 15px;
  text-align: right;
}

@media (max-width: 768px) {
  .logo {
    width: 30%; /* Make the logo smaller on smaller screens */
  }
}

@media (max-width: 576px) {
  .logo {
    width: 25%; /* Even smaller for very small devices */
  }
}

.nav-link {
  color: #b0bec5;
  font-size: 16px;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s ease;
}

.nav-link:hover {
  background-color: #0056b3;
  color: white;
}

/* Active state for nav links */
.nav-link.active {
  background-color: #0056b3;
  color: white;
}

/* Home Icon Styling */
/* Styling for the home icon button */
.home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px; /* Adjust padding for a rounded shape */
  border-radius: 20px; /* Increase border-radius for softer corners */
  background-color: #2e3c4a; /* Background color */
  color: #b0bec5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.home-link:hover,
.home-link.active {
  background-color: #0056b3;
  color: #ffffff;
}

/* Sidebar nav link styling for rounded edges */
.nav-link {
  padding: 10px 20px;
  border-radius: 20px; /* More rounded corners */
  color: #b0bec5;
  background-color: transparent;
  transition: background-color 0.3s, color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  background-color: #0056b3;
  color: #ffffff;
}

.home-icon {
  width: 24px;
  height: 24px;
  margin: 0;
  display: block;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

@media (max-width: 576px) {
  .home-icon {
    width: 18px;
    height: 18px;
  }
}

/* Active state for the home icon */
.nav-link.active .home-icon {
  background-color: #0056b3;
  color: white;
}

/* Table Styling */
#linting-table {
  width: 100% !important;
  min-width: 100%;
  max-width: 100%;
}

.styled-table {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: auto;
  background-color: #fff;
  border-collapse: separate;
  margin-top: 20px;
}

.styled-table th {
  background-color: #007bff;
  color: white;
  font-weight: bold;
  text-align: left;
  padding: 10px;
  font-size: 1.1em;
}

.styled-table td:nth-child(3) {
  width: 120px; /* Reduced width for Severity column */
}

.styled-table td:nth-child(7) {
  width: 400px; /* Increased width for Links */
}

.styled-table td {
  white-space: normal;
  height: auto;
  text-align: left;
  padding: 10px;
  max-width: 300px; /* Adjusted for better width management */
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #dee2e6;
}

.dash-cell {
  padding: 10px; /* Add padding for better readability */
  border-bottom: 1px solid #dee2e6; /* Consistent border for cells */
}

/* Adjusting the style of the specific column (e.g., column-2, Severity column) */
.dash-cell.column-2 {
  width: 100px; /* Narrower width for the Severity column */
  text-align: center; /* Centering the content in the Severity column */
  background-color: #f7f7f7; /* Light background to highlight the severity */
  color: #ff5e57; /* Example: Setting color to emphasize Severity */
}

/* Adjusting for Description column (longer width) */
.dash-cell.column-3 {
  width: 400px; /* Increase width for description */
  word-wrap: break-word; /* Ensure long descriptions wrap properly */
  white-space: normal; /* Enable wrapping */
}

/* Adjusting for Links column (longer width) */
.dash-cell.column-4 {
  width: 350px; /* Wider width for the Links column */
  white-space: normal; /* Ensure URLs wrap properly */
  word-wrap: break-word; /* Handle long URLs */
}

/* Styling for table rows on hover */
.styled-table tr:hover {
  background-color: #f1f1f1; /* Light background on row hover */
  transition: background-color 0.3s ease;
}

/* Center align specific table columns if needed */
.styled-table td:nth-child(3),  /* Example: Severity column */
.styled-table td:nth-child(2) {
  /* Example: Line column */
  text-align: center; /* Center text alignment for these columns */
}

/* Sidebar Responsive Adjustments */
@media (max-width: 1200px) {
  .sidebar {
    width: 180px;
  }

  .content-wrapper {
    margin-left: 180px;
    width: calc(100% - 180px);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative; /* Sidebar as a dropdown for mobile */
  }

  .sidebar-wrapper {
    display: none; /* Hidden on small screens */
  }

  .content-wrapper {
    margin-left: 0;
    width: 100% !important;
  }
}

/* Sidebar Adjustments for Smaller Screens */
@media (max-width: 576px) {
  .sidebar-wrapper {
    width: 150px;
  }

  .logo {
    width: 35px;
  }

  .home-icon {
    width: 20px;
  }

  .sidebar-title {
    font-size: 18px;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px;
  }
}

.footer-container {
  background-color: #f8f9fa;
  color: #333;
  text-align: center;
  padding: 10px 0;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-size: 14px;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

/* Table Hover and Other Styling */
.dash-table-container .dash-spreadsheet-container .dash-cell:hover {
  background-color: #e0e0e0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Center Pie Chart title */
.infolayer .g-gtitle {
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #343a40;
  margin-top: 20px;
  margin-bottom: 10px;
}

.modal-resource {
  font-weight: bold;
  color: #0056b3;
  padding: 5px 10px;
  background-color: #f0f4f8;
  border-radius: 5px;
  margin-top: 15px;
}

.modal-divider {
  border-top: 1px solid #e0e0e0;
  margin: 15px 0;
}

/* Set a wider width for the modal */
/* Add padding to the top of the modal */
.modal-dialog {
  max-width: 60%;
  margin: 30px auto; /* Adds 30px space at the top, can adjust as needed */
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .modal-dialog {
    max-width: 90%;
    margin: 15px auto; /* Slightly less top padding on smaller screens */
  }
}

.modal-links a {
  color: #3399f3;
  font-weight: 500;
  text-decoration: none;
}

.modal-links a:hover {
  text-decoration: underline;
  color: #0056b3;
}

.modal-content-wrapper {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

/* Sidebar font size adjustment for smaller screens */
@media (max-width: 768px) {
  .nav-link {
    font-size: 14px; /* Reduce font size for smaller screens */
    padding: 8px 16px; /* Adjust padding for smaller touch targets */
  }

  .sidebar-title {
    font-size: 20px; /* Reduce the sidebar title font size */
  }

  .logo {
    width: 30%; /* Make the logo smaller */
  }

  .sidebar {
    width: 180px; /* Reduce the width of the sidebar */
  }
}

/* Sidebar font and icon size adjustment for extra small screens */
@media (max-width: 576px) {
  .nav-link {
    font-size: 12px; /* Further reduce the font size for smaller devices */
    padding: 6px 12px; /* Adjust padding for mobile */
  }

  .logo {
    width: 25%; /* Further reduce logo size */
  }

  .sidebar-title {
    font-size: 18px; /* Further reduce sidebar title font size */
  }

  .home-icon {
    width: 20px; /* Reduce icon size */
    height: 20px;
  }

  .sidebar {
    width: 150px; /* Make the sidebar narrower for very small screens */
  }
}

/* Increase the size of the pie chart on small screens */
@media (max-width: 768px) {
  .pie-chart-container {
    width: 60% !important; /* Increase pie chart size */
  }
}

@media (max-width: 576px) {
  .pie-chart-container {
    width: 70% !important; /* Increase pie chart size for very small screens */
  }
}
