/* ========================================
   0. GLOBAL FOUNDATION (Docs Only)
======================================== */

html {
  font-size: 16px;
}

/* Override global layout grid for docs pages */
.layout__main.docs-main {
  display: block;
  padding-top: 24px;
}


/* ========================================
   1. SUB NAV (Docs Home link)
======================================== */

.docs-subnav {
  margin-top: 10px;
  margin-bottom: 18px;
}

.docs-subnav a {
  font-size: 0.95rem;
  color: #5a2ca0;
  text-decoration: none;
}

.docs-subnav a:hover {
  text-decoration: underline;
}


/* ========================================
   2. SEARCH
======================================== */

.docs-search-wrapper {
  margin-bottom: 20px;
}

#docsSearch {
  width: 100%;
  max-width: 420px;
  padding: 8px 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}


/* ========================================
   3. ELEMENT INDEX GRID
======================================== */

.docs-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  /* align-content: start; */ /* new */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  row-gap: 10px;
  column-gap: 28px;
}

.docs-list li {
  list-style: none;
}

.docs-list a {
  display: block;
  padding: 4px 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 500;
  color: #2a2f36;
  text-decoration: none;
}

.docs-list a:hover {
  text-decoration: underline;
}

/* Slightly wider columns on large screens */
@media (min-width: 900px) {
  .docs-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}


/* ========================================
   4. DOC LEVEL INDICATORS
======================================== */

/* Basic */
.docs-list li.doc-basic a::after {
  content: " 📄";
  opacity: 0.7;
}

/* Extended */
.docs-list li.doc-extended a::after {
  content: " 📘";
}

.docs-list li.doc-extended a {
  font-weight: 600;
  color: #3c1c85;
}

/* Super */
.docs-list li.doc-super a::after {
  content: " ⭐";
}


/* ========================================
   5. ELEMENT DETAIL PAGE
======================================== */

.docs-image-wrapper {
  position: relative;
  margin-top: 20px;
}

.docs-image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

.element-overlay {
  position: absolute;
  border: 2px solid red;
  pointer-events: none;
}


/* ========================================
   6. ELEMENT NOTES
======================================== */

.element-note {
  margin-top: 20px;
  padding: 12px 14px;
  background: #f4f4f6;
  border-left: 4px solid #5a2ca0;
  border-radius: 6px;
}

.element-note p {
  margin: 6px 0 0 0;
  line-height: 1.5;
}


/* ========================================
   7. HEADER TYPOGRAPHY SAFETY
======================================== */

.app-header h1 {
  line-height: 1.2;
  word-break: break-word;
}

/* ========================================
   FIX: Remove grid layout for docs pages
======================================== */

.docs__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/*
.layout__container.docs-layout {
  display: block;
  min-height: auto;
}
*/




/* New css since adding 11ty */

.element-preview {
  max-width: 900px;
  margin: 1rem 0;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

.image-wrapper img {
  max-width: 100%;
  border: 1px solid #ccc;
}

.highlight {
  position: absolute;
  border: 3px solid red;
  box-sizing: border-box;
  pointer-events: none;
}