/* --- WordPress Admin Bar Overlap Fix --- */
body.admin-bar header.sticky {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar header.sticky {
    top: 46px;
  }
}
/* Optionally, if WP 6.3+ exposes the variable, you can use:
body.admin-bar header.sticky {
  top: var(--wp-admin--admin-bar--height, 32px);
}
*/
/* File: aiAssist/style.css */
/*
Theme Name: aiAssist Portal Theme
Theme URI: [Your Website URL]
Author: Gemini
Author URI: [Your Website URL]
Description: A clean, custom application theme based on Tailwind CSS, designed to match the aiAssist Portal aesthetic.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-layout, full-width, application
Text Domain: aiassist
*/

/*
  Ensure clear, consistent visual distinction between heading levels
  inside post/page content and block content. These rules are intentionally
  specific to content areas to avoid interfering with other UI headings.
*/
.entry-content :is(h1,h2,h3,h4,h5,h6),
.post-content :is(h1,h2,h3,h4,h5,h6),
.wp-block-post-content :is(h1,h2,h3,h4,h5,h6),
.wp-block-heading :is(h1,h2,h3,h4,h5,h6) {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  font-weight: 700;
  color: #0f172a; /* slate-900 */
}

.entry-content h1, .post-content h1 { font-size: 2.25rem; line-height: 1.1; }
.entry-content h2, .post-content h2 { font-size: 1.875rem; line-height: 1.15; }
.entry-content h3, .post-content h3 { font-size: 1.5rem; line-height: 1.2; }
.entry-content h4, .post-content h4 { font-size: 1.25rem; line-height: 1.25; }
.entry-content h5, .post-content h5 { font-size: 1rem; line-height: 1.3; font-weight: 600; }
.entry-content h6, .post-content h6 { font-size: 0.875rem; line-height: 1.3; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;}

/* Make sure heading block specific utility classes don't override sizes */
.wp-block-heading h1, .wp-block-heading h2, .wp-block-heading h3, .wp-block-heading h4, .wp-block-heading h5, .wp-block-heading h6 {
  margin: 0;
}

/* Small screens adjustments */
@media (max-width: 640px) {
  .entry-content h1, .post-content h1 { font-size: 1.75rem; }
  .entry-content h2, .post-content h2 { font-size: 1.5rem; }
  .entry-content h3, .post-content h3 { font-size: 1.25rem; }
}

/* ==================================================================================
   LIST HIERARCHY STYLES - Global standardized list formatting
   Ensures consistent nested list behavior across all content areas
   ================================================================================== */

/* GLOBAL ENTRY CONTENT LIST BASE STYLES */
.entry-content ul,
.entry-content ol {
  list-style: inherit;
  margin-left: 20px;
  margin-bottom: 16px;
  padding-left: 20px;
}

.entry-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* RULE 1: Top-level ordered lists use decimal (1, 2, 3...) */
.entry-content > ol {
  list-style-type: decimal;
  margin-left: 20px;
  padding-left: 20px;
  margin-bottom: 16px;
}

.entry-content > ol > li {
  list-style-type: decimal;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* RULE 2: Top-level unordered lists use disc (bullets) */
.entry-content > ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-bottom: 16px;
}

.entry-content > ul > li {
  list-style-type: disc;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* RULE 3: Nested unordered lists under ordered items switch to disc (bullets) */
.entry-content ol li ul,
.entry-content ul li ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.entry-content ol li ul li,
.entry-content ul li ul li {
  list-style-type: disc;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Nested ordered lists under unordered items use decimal */
.entry-content ul li ol {
  list-style-type: decimal;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.entry-content ul li ol li {
  list-style-type: decimal;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* RULE 4: Three-level-deep ordered lists switch to lower-alpha (a, b, c...) */
.entry-content ol li ol li ol {
  list-style-type: lower-alpha;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.entry-content ol li ol li ol li {
  list-style-type: lower-alpha;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* RULE 5: Four-level-deep lists - restore disc for unordered */
.entry-content ol li ol li ol li ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

/* Indentation for deeply nested lists */
.entry-content ul li ul li ul {
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

/* ==================================================================================
   USER MANUAL TEMPLATE (#manual-main-content) — lists inside section wrappers
   MD→HTML / ACF output wraps each block in <section class="user-manual-md-section">, so <ul>/<ol>
   are not direct children of .entry-content. The .entry-content rules above do not apply.
   Match the same hierarchy so pasted manual HTML shows bullets and numbers on the front end.
   ================================================================================== */

#manual-main-content ul,
#manual-main-content ol {
  list-style-position: outside;
  margin-left: 20px;
  margin-bottom: 16px;
  padding-left: 20px;
}

#manual-main-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Lists are often not direct children of section (e.g. intro <p> then <ul>). */
#manual-main-content .user-manual-md-section ol,
#manual-main-content section ol {
  list-style-type: decimal !important;
}

#manual-main-content .user-manual-md-section ol > li,
#manual-main-content section ol > li {
  list-style-type: decimal !important;
}

#manual-main-content .user-manual-md-section ul,
#manual-main-content section ul {
  list-style-type: disc !important;
}

#manual-main-content .user-manual-md-section ul > li,
#manual-main-content section ul > li {
  list-style-type: disc !important;
}

#manual-main-content ol li ul,
#manual-main-content ul li ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
}

#manual-main-content ol li ul li,
#manual-main-content ul li ul li {
  list-style-type: disc;
  margin-bottom: 8px;
  line-height: 1.6;
}

#manual-main-content ul li ol {
  list-style-type: decimal;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

#manual-main-content ol li ol li ol li ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

#manual-main-content ul li ul li ul {
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

/* ==================================================================================
   SIDEBAR STICKY HEADER AND SCROLLABLE BODY
   Fixes issue where sidebar headers ("Groups" and "Active Group") would scroll out 
   of view when scrolling through group list. Header remains fixed at top while 
   list scrolls underneath.
   ================================================================================== */

.sidebar-body {
  overflow-y: auto;
  flex: 1;
}

.sidebar-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}
  margin-bottom: 16px;
}

#manual-main-content ul li ol li {
  list-style-type: decimal;
  margin-bottom: 8px;
  line-height: 1.6;
}

#manual-main-content ol li ol li ol {
  list-style-type: lower-alpha;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
}

#manual-main-content ol li ol li ol li {
  list-style-type: lower-alpha;
  margin-bottom: 8px;
  line-height: 1.6;
}

#manual-main-content ol li ol li ol li ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

#manual-main-content ul li ul li ul {
  margin-left: 20px;
  padding-left: 20px;
  margin-top: 8px;
}

/* ==================================================================================
   SIDEBAR STICKY HEADER AND SCROLLABLE BODY
   Fixes issue where sidebar headers ("Groups" and "Active Group") would scroll out 
   of view when scrolling through group list. Header remains fixed at top while 
   list scrolls underneath.
   ================================================================================== */

.sidebar-body {
  overflow-y: auto;
  flex: 1;
}

.sidebar-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}