.checklist-iframe-container {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 600px;
  margin: 2rem 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.checklist-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .checklist-iframe-container {
    height: 80vh;
    min-height: 400px;
  }
}

/* Checklist Table Styles */
.checklist-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  position: relative;
}

.checklist-table th,
.checklist-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.checklist-table th {
  font-weight: 600;
  background-color: var(--color-background-alt);
}

.checklist-table th:first-child {
  width: 20%;
}

.checklist-table th:nth-child(2) {
  width: 12%;
}

.checklist-table th:nth-child(3) {
  width: 35%;
}

.checklist-table th:nth-child(4) {
  width: 25%;
}

.checklist-table th:last-child {
  width: 5%;
  text-align: center;
}

.checklist-table td:last-child {
  text-align: center;
}

.checklist-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-mint);
}

.checklist-table tbody tr:nth-child(even) {
  background-color: #f9f9f9; /* Alternate row shading */
}

.checklist-table tbody tr:hover {
  /* background-color: transparent; */
}

.checklist-table td:first-child {
  font-weight: 500;
  color: #222;
}

/* Responsible pills styling - matching tools and patterns */
.responsible-pills {
  
}

.responsible-pills span {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e6f1fb;
  border-radius: 1rem;
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--color-text-secondary);
  margin-right: 10px;
  margin-bottom: 5px;
}

.responsible-pills span:last-child {
  margin: 0;
}

.checklist-title {
  margin-top: 2rem;
}

/* Checklist sidebar navigation */
.checklist-sidebar {
  position: sticky;
  top: 70px;
  height: fit-content;
}

.checklist-sidebar h2 {
  position: static; /* Override any sticky positioning */
  margin-bottom: 1rem;
}

.checklist-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-gray-200);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  padding-top: 0.5rem;

}

.checklist-sidebar li {
  margin-bottom: 0.5rem;
}

.checklist-sidebar a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: calc(0.875rem + (((1.5 - 0.875) * ((100vw - 320px) / (2048 - 320))) * 10));

}

.checklist-sidebar a:hover {
  /* background-color: #f5f5f5; */
  color: var(--color-blue);
  text-decoration: underline;
}

.checklist-sidebar a.active {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 600;
}

.checklist-sidebar a:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .checklist-table {
    font-size: 0.8rem;
  }
  
  .checklist-table th,
  .checklist-table td {
    padding: 0.5rem;
  }

  .checklist-sidebar {
    top: 60px;
  }

  .checklist-sidebar ul {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .checklist-sidebar li {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .checklist-sidebar a {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }

  .checklist-table h3 {
    top: 60px; /* Adjust for smaller header on mobile */
  }
} 


.checklist-section {
  position: relative;
}

.checklist-section h2,
.checklist-section h3 {
  
  background: white;
  padding: 2rem 0 1rem 0;
  margin: 0;
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
}

/* Dark mode support */
.dark .checklist-section h2,
.dark .checklist-section h3 {
  background: var(--color-gray-900);
}

@media (min-width: 768px) {
  .checklist-section h2,
  .checklist-section h3 {
    position: sticky;
    top: 70px; /* Adjust based on your header height */
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .checklist-section h3 {
    top: 60px; /* Adjust for smaller header on mobile */
  }
}

/* Ensure the section has enough space for sticky headers */
.checklist-section .col-10 {
  position: relative;
  z-index: 1;
}

.completion-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-mint);
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.completion-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.9rem;
}

.completion-stats span {
  padding: 0 1rem;
}

.completion-stats .total {
  font-weight: bold;
  border-left: 1px solid var(--color-border);
  margin-left: 1rem;
}

@media (max-width: 768px) {
  .completion-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .completion-stats span {
    padding: 0 0.5rem;
  }
}