/* ==========================================================================
   Single Condition Template Styles
   ========================================================================== */

/* ==========================================================================
   Overview Section
   ========================================================================== */

.overview-section {
  background: var(--mia-white);
  border: 1px solid var(--mia-gold-light);
  border-radius: var(--radius-lg);
  box-shadow: none;
  color: var(--mia-black);
  margin-bottom: 2rem;
  padding: 2rem 1.5rem 1.5rem;

  h2 {
    background: none;
    border-bottom: none;
    border-left: 4px solid var(--mia-gold);
    
    
    margin-bottom: 1.25rem;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0.75rem;
  }
}

.overview-content {
  line-height: 1.6;
}

.overview-item {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;

  &:last-child {
    margin-bottom: 0;
  }

  p:last-child {
    margin-bottom: 0;
  }
}

.overview-check {
  color: var(--mia-gold);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.toc-container {
  background-color: var(--mia-white);
  border: 1px solid var(--mia-gold-50);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  padding: 1.25rem;
  position: sticky;
  top: 76px;
  z-index: 2;

  h3 {
    border-bottom: 2px solid var(--mia-gold);
    
    
    margin-bottom: 1rem;
    margin-top: 0;
    padding-bottom: 0.625rem;
  }
}

body.admin-bar .toc-container {
  top: 108px;
}

.toc-list {
  list-style-type: none;
  margin-bottom: 0;
  padding-left: 0;

  .nav-item {
    margin-bottom: 0.75rem;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .nav-link {
    border-left: 3px solid transparent;
    color: var(--mia-black);
    display: block;
    font-family: var(--font-body);
    padding: 0.375rem 0.625rem;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;

    &:hover {
      background-color: rgba(0, 0, 0, 0.03);
      color: var(--mia-gold);
    }

    &.active {
      background-color: rgba(200, 178, 115, 0.05);
      border-left: 3px solid var(--mia-gold);
      color: var(--mia-gold);
      font-weight: 600;
    }
  }
}

/* ==========================================================================
   Content Headings
   ========================================================================== */

.content h2 {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.625rem;
  padding-top: 1.25rem;
}

/* ==========================================================================
   Responsive - min-width (ascending)
   ========================================================================== */

@media (min-width: 992px) {
  .toc-container {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

/* ==========================================================================
   Responsive - max-width (descending)
   ========================================================================== */

@media (max-width: 991.98px) {
  .toc-container {
    display: none;
  }

  .single-condition .overview-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1rem;
  }

  .single-condition article {
    padding-bottom: 2rem;
    padding-top: 1.5rem;
  }

  .single-condition .post-header h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
}
