/* Checker Categories New Component Styles */

:root {
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --purple-100: #f3e8ff;
  --purple-50: #faf5ff;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --green-500: #10b981;
  --blue-500: #3b82f6;
}

.checker-categories-new {
  padding: 40px 0px;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

/* Ensure parent section doesn't interfere with sticky */
.checker-categories {
  overflow: visible !important;
  position: relative;
}

/* Override section class that has position: relative !important */
.checker-categories .checker-categories-new.section,
.checker-categories .section.checker-categories-new,
.checker-categories-new.section {
  overflow: visible !important;
  /* Keep position relative but ensure it doesn't break sticky children */
  position: relative !important;
}

.checker-categories .checker-categories-new.section,
.checker-categories .checker-categories-new {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  isolation: auto !important;
}

/* Layout */
.checker-categories-new .content-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* Sidebar wrapper to maintain layout space */
.checker-categories-new .sidebar-wrapper {
  grid-column: 1;
  width: 100%;
  height: fit-content;
}

/* Sidebar */
.checker-categories-new .sidebar {
  position: relative;
  align-self: start;
  height: fit-content;
  max-height: calc(100vh - 48px);
  z-index: 10;
  transition: none;
  width: 100%;
}

.checker-categories-new .sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #d4d4d4;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Ensure no positioning that could interfere */
  position: relative;
}

.checker-categories-new .sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.checker-categories-new .nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checker-categories-new .nav-item {
  border-radius: 8px;
}

.checker-categories-new .nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-align: right;
}

.checker-categories-new .nav-item button:focus-visible {
  outline: 2px solid var(--purple-600);
  outline-offset: 2px;
}

.checker-categories-new .nav-item button:hover {
  background: var(--gray-50);
}

.checker-categories-new .nav-item.active button {
  background: var(--purple-100);
  color: #8e56dc;
  border: 1px solid #8e56dc;
}

.checker-categories-new .nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  flex-shrink: 0;
}

.checker-categories-new .nav-count {
  margin-right: auto;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.checker-categories-new .nav-item.active .nav-count {
  background: var(--purple-600);
  color: white;
}

/* Mobile Dropdown */
.checker-categories-new .mobile-dropdown {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.checker-categories-new .dropdown-button {
  width: 100%;
  padding: 12px 16px;
  background: var(--purple-100);
  color: var(--purple-700);
  border: none;
  border-radius: 8px;
  font-size: 0.938rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}

.checker-categories-new .dropdown-button svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.checker-categories-new .dropdown-button.open svg,
.checker-categories-new
  .mobile-dropdown:has(.dropdown-content.show)
  .dropdown-button
  svg {
  transform: rotate(180deg);
}

.checker-categories-new .dropdown-content {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.checker-categories-new .dropdown-content.show {
  display: flex;
}

/* Content Area */
.checker-categories-new .content-area {
  background: white;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #d4d4d4;
  min-height: 600px;
}

.checker-categories-new .category-content {
  display: none;
}

.checker-categories-new .category-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category Header */
.checker-categories-new .category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.checker-categories-new .category-icon-large {
  width: 56px;
  height: 56px;
  background: linear-gradient(
    84.42deg,
    #8e56dc 22.16%,
    rgba(142, 86, 220, 0.7) 76.47%
  );

  box-shadow: 0px 1.99px 5.97px 0px #8e56dc7a;

  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checker-categories-new .category-icon-large svg {
  width: 30px;
  height: 30px;
}

.checker-categories-new .category-title {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: #595959;
}

.checker-categories-new .category-desc {
  font-size: 0.938rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Checks List */
.checker-categories-new .checks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Check Item */
.checker-categories-new .check-item {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  background: white;
}

.checker-categories-new .check-item:hover {
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08);
}

.checker-categories-new .check-item.active {
  border-color: #8e56dc;
}

.checker-categories-new .check-header {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  background: #f8f8f8;
  transition: background 0.2s;
}

.checker-categories-new .check-header:hover {
  background: var(--gray-50);
}

.checker-categories-new .check-item.active .check-header {
  background: #eee6fa;
}

.checker-categories-new .check-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.checker-categories-new .check-icon {
  width: 30px;
  height: 30px;
  background: #8e56dc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 400;
  color: white;
  flex-shrink: 0;
}

.checker-categories-new .check-title {
  text-align: right;
  font-size: 0.938rem;
  font-weight: 600;
  color: #595959;
  line-height: 1.3;
}

.checker-categories-new .check-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checker-categories-new .wcag-tag {
  padding: 4px 8px;
  background: white;
  color: var(--gray-700);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  font-family: monospace;
  border: 1px solid #bcbcbc;
}

.checker-categories-new .level-badge {
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 400;
  border-radius: 6px;
  color: white;
}

.checker-categories-new .level-a {
  background: #467756;
}

.checker-categories-new .level-aa {
  background: #467756;
}

.checker-categories-new .level-aaa {
  background: #467756;
}

.checker-categories-new .expand-icon {
  width: 20px;
  height: 20px;
  stroke: #989898;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.checker-categories-new .check-item.active .expand-icon {
  transform: rotate(180deg);
  stroke: var(--purple-600);
}

/* Expandable Content */
.checker-categories-new .check-content {
  margin-bottom: -27px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.checker-categories-new .check-item.active .check-content {
  max-height: 500px;
}

.checker-categories-new .check-inner {
  padding-top: 24px;
  padding-bottom: 24px;
  background: white;
}

.checker-categories-new .check-desc {
  font-size: 0.938rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 400;
}

.checker-categories-new .details-grid {
  display: grid;
  gap: 20px;
}

.checker-categories-new .detail-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checker-categories-new .detail-icon {
  width: 19px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checker-categories-new .detail-icon svg {
  width: 100%;
  height: 100%;
}

.checker-categories-new .detail-label {
  font-size: 0.813rem;
  font-weight: 700;
  color: var(--purple-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  margin-top: 3px;
}

.green-highlight {
  font-weight: 700;
  color: #467756;
}

.checker-categories-new .detail-content {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
  .checker-categories-new {
    padding: 32px 16px;
  }

  .checker-categories-new .content-wrapper {
    grid-template-columns: 250px 1fr;
    gap: 20px;
  }

  .checker-categories-new .content-area {
    padding: 28px;
  }
}

@media (max-width: 1024px) {
  .checker-categories-new .content-wrapper {
    grid-template-columns: 220px 1fr;
    gap: 16px;
  }

  .checker-categories-new .sidebar-card {
    padding: 18px;
  }

  .checker-categories-new .category-icon-large {
    width: 52px;
    height: 52px;
  }

  .checker-categories-new .category-title {
    font-size: 1.5rem;
  }

  .checker-categories-new .category-desc {
    font-size: 0.9rem;
  }

  .checker-categories-new .checks-list {
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .checker-categories {
    padding: 0;
  }
  .checker-categories-new .content-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .checker-categories-new .sidebar {
    display: none;
    position: static;
  }

  .checker-categories-new .mobile-dropdown {
    display: block;
  }

  .checker-categories-new .content-area {
    padding: 24px;
  }

  .checker-categories-new .category-title {
    font-size: 1.5rem;
  }

  .checker-categories-new .check-header {
    padding: 14px 16px;
  }

  .checker-categories-new .check-right {
    gap: 6px;
  }

  .checker-categories-new .check-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .checker-categories-new .check-inner {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .checker-categories-new {
    padding: 28px 14px;
  }

  .checker-categories-new .dropdown-button {
    font-size: 0.875rem;
    padding: 11px 14px;
  }

  .checker-categories-new .content-area {
    padding: 20px;
  }

  .checker-categories-new .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .checker-categories-new .category-title {
    font-size: 1.35rem;
  }

  .checker-categories-new .category-desc {
    margin-bottom: 20px;
  }

  .checker-categories-new .check-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    /* padding-right: 56px; */
  }

  .checker-categories-new .check-right {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .checker-categories-new .check-header .expand-icon {
    position: absolute;
    top: 14px;
    left: 18px;
  }
}

@media (max-width: 480px) {
  .checker-categories {
    padding: 0;
  }
  .checker-categories-new {
    padding: 24px 12px;
  }

  .checker-categories-new .mobile-dropdown {
    padding: 14px;
  }

  .checker-categories-new .dropdown-button span {
    font-size: 0.85rem;
  }

  .checker-categories-new .content-area {
    padding: 18px;
  }

  .checker-categories-new .category-icon-large {
    width: 46px;
    height: 46px;
  }

  .checker-categories-new .check-inner {
    padding: 18px 16px;
  }

  .checker-categories-new .check-desc {
    font-size: 0.875rem;
  }

  .checker-categories-new .detail-grid {
    gap: 16px;
  }
}

@media (max-width: 380px) {
  .checker-categories-new .check-title {
    max-width: 130px;
  }
}
