/* SDS Page Styles - Mirrored from Glossary Layout */

.sds-page {
  padding: 2rem 1rem;
  padding-top: 8rem; /* Account for fixed navigation header */
  min-height: 60vh;
}

@media (min-width: 768px) {
  .sds-page {
    padding-top: 9rem; /* More space on larger screens */
  }
}

@media (min-width: 1024px) {
  .sds-page {
    padding-top: 10rem; /* Extra space on desktop */
  }
}

.sds-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .sds-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .sds-container {
    padding: 0 2rem;
  }
}

/* Header */
.sds-header {
  margin-bottom: 1.5rem;
}

.sds-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .sds-title {
    font-size: 2.25rem;
  }
}

.sds-description {
  font-size: 0.875rem;
  color: #4b5563;
  max-width: 48rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .sds-description {
    font-size: 1rem;
  }
}

.sds-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Search and Filters */
.sds-filters {
  margin-bottom: 2%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Search Bar */
.sds-search-wrapper {
  position: relative;
  max-width: 42rem;
}

.sds-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #6b7280;
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

.sds-search {
  width: 100% !important;
  padding-left: 3.5rem !important; /* 1rem (icon left) + 1.25rem (icon width) + 1.25rem (gap) = 3.5rem */
  padding-right: 1rem !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  font-size: 1rem !important;
  color: #111827 !important;
  background-color: #fff !important;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  max-width: none !important;
  box-shadow: none !important;
  font-weight: 400 !important;
}

.sds-search:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sds-search::placeholder {
  color: #9ca3af;
  font-size: 1rem;
}

.sds-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #9ca3af;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.sds-search-clear:hover {
  background-color: #f3f4f6;
}

.sds-search-clear svg {
  width: 1rem;
  height: 1rem;
}

/* A-Z Navigation */
.sds-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  padding-bottom: 0.5rem;
}

.sds-letters-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #4b5563;
  margin-right: 0.25rem;
}

.sds-letter-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  background-color: #f3f4f6;
  color: #374151;
  white-space: nowrap;
  line-height: 1.2;
  min-height: auto;
}

.sds-letter-btn:hover {
  background-color: #e5e7eb;
}

.sds-letter-btn.active {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.sds-letter-clear {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  background-color: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  line-height: 1.2;
}

.sds-letter-clear:hover {
  background-color: #e5e7eb;
}

.sds-letter-clear svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Active Filters - Hidden since buttons show active state */
.sds-active-filters {
  display: none !important;
}

/* Results Count */
.sds-results {
  margin-bottom: 0.5rem;
}

.sds-results-text {
  font-size: 0.875rem;
  color: #4b5563;
}

.sds-results-count {
  font-weight: 600;
  color: #111827;
}

/* SDS Items Display */
.sds-items-container {
  margin-bottom: 2rem;
}

.sds-letter-section {
  scroll-margin-top: 8rem; /* Offset for fixed navigation header */
}

.sds-letter-section:first-of-type {
  margin-top: 0;
}

.sds-letter-section:first-of-type .sds-letter-heading {
  margin-top: 0;
}

.sds-letter-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #d1d5db;
}

.sds-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .sds-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sds-items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* SDS Item Card */
.sds-item-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.2s;
}

.sds-item-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.sds-item-card.sds-item-highlight {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}

.sds-item-link {
  text-decoration: none;
  color: #111827;
  display: block;
}

.sds-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  transition: color 0.2s;
  margin: 0;
}

.sds-item-card:hover .sds-item-title {
  color: #2563eb;
}

/* Empty State */
.sds-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.sds-empty-title {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.sds-empty-text {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Footer CTA */
.sds-footer-cta {
  margin-top: 4rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.sds-footer-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111827;
}

.sds-footer-cta p {
  color: #374151;
  margin-bottom: 1.5rem;
}

.sds-footer-cta-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .sds-footer-cta-links {
    flex-direction: row;
  }
}

.sds-footer-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
  min-height: 44px;
}

.sds-footer-cta-link-primary {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.sds-footer-cta-link-primary:hover {
  background-color: #1d4ed8;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sds-footer-cta-link-secondary {
  background-color: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.sds-footer-cta-link-secondary:hover {
  background-color: #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Hide A-Z navigation when searching */
.sds-letters-container.hidden {
  display: none;
}

/* ============================================================================
   SDS Side Navigation - Letter Navigation
   ============================================================================ */

/* Side Navigation */
.sds-side-nav {
  display: none;
}

@media (min-width: 1280px) {
  .sds-side-nav {
    display: block;
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    width: 2.5rem;
    z-index: 45;
    pointer-events: auto;
    margin-top: 3rem; /* Start below header */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  }
  
  .sds-side-nav.visible {
    opacity: 1;
    visibility: visible;
  }
}

.sds-side-nav-inner {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sds-side-nav-content {
  width: 100%;
  padding: 0;
}

.sds-side-nav-content > div {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(229, 231, 235, 0.5);
  padding: 0.375rem;
  overflow-y: visible;
  height: auto;
  overflow-x: hidden;
}

/* Letter Navigation List */
.sds-letter-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  align-items: center;
}

.sds-letter-nav-list li {
  margin: 0;
  width: 100%;
}

/* Letter Navigation Links */
.sds-letter-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  transition: all 0.2s;
  text-decoration: none;
  color: #6b7280;
  background: transparent;
}

.sds-letter-nav-link:hover {
  color: #2563eb;
  background: #f3f4f6;
}

.sds-letter-nav-link-active {
  background: #2563eb;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sds-letter-nav-link-active:hover {
  background: #1d4ed8;
  color: white;
}

/* Scroll indicator for active letter */
.sds-letter-nav-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.2rem;
  height: 1.25rem;
  background: #2563eb;
  border-radius: 0 0.2rem 0.2rem 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.sds-letter-nav-link-active .sds-letter-nav-indicator {
  opacity: 1;
}
