/* FILE PURPOSE: Additional component styles, spacing utilities, and small refinements layered over style.css */

.ess-post { margin-bottom: 32px; }
.ess-post .entry-title { margin-bottom: 8px; }
.ess-post .entry-meta { color: var(--ess-muted); font-size: 0.9rem; margin-bottom: 12px; }

.ess-sr-only { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.ess-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  z-index: 90;
}
.ess-menu-overlay[aria-hidden="false"] { display: block; }

#ess-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100vw; /* Full width on mobile */
  background: var(--ess-bg);
  border-left: 1px solid var(--ess-border);
  box-shadow: -12px 0 24px rgba(0,0,0,0.18);
  padding: 16px;
  display: block;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.25s ease;
  z-index: 100;
  overflow-y: auto; /* Allow panel to scroll independently */
  /* Account for mobile status bar */
  padding-top: calc(16px + env(safe-area-inset-top));
  /* Prevent overshoot: include padding in width calculation */
  box-sizing: border-box;
}

/* Tablet and larger: normal width */
@media (min-width: 768px) {
  #ess-mobile-menu {
    width: min(88vw, 360px);
    padding-top: 16px; /* Reset padding-top for tablets */
  }
}

/* Phones: avoid 100vw scrollbar overshoot */
@media (max-width: 767px) {
  #ess-mobile-menu {
    width: 100%;
  }
}

/* Search off-canvas panel */
.ess-search-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100vw; /* full on mobile */
  background: var(--ess-bg);
  border-left: 1px solid var(--ess-border);
  box-shadow: -12px 0 24px rgba(0,0,0,0.18);
  padding: 16px;
  display: block;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.25s ease;
  z-index: 100;
  overflow-y: auto;
  padding-top: calc(16px + env(safe-area-inset-top));
  box-sizing: border-box;
}

/* Tablet/Desktop width for search panel */
@media (min-width: 768px) {
  .ess-search-panel {
    width: min(88vw, 720px);
    padding-top: 16px;
  }
}

.ess-search-title {
  font-weight: 700;
  color: var(--ess-text);
  font-size: 1rem;
}

.ess-search-body {
  padding: 0;
}

.ess-search-input {
  width: 100%;
  margin: 0 0 12px 0;
}

/* Search results grid unified with archive cards */
.ess-search-results {
  margin-top: 12px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) {
  .ess-search-results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ess-search-results { grid-template-columns: 1fr; }
}

/* Open state */
.ess-search-panel[aria-hidden="false"] {
  transform: translate3d(0, 0, 0);
}
#ess-mobile-menu[aria-hidden="false"] { transform: translate3d(0, 0, 0); }

/* Mobile menu header with close button */
.ess-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ess-border);
}

.ess-mobile-menu-title {
  font-weight: 700;
  color: var(--ess-text);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ess-mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--ess-border);
  background: transparent;
  color: var(--ess-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ess-mobile-menu-close:hover {
  background: rgba(0,0,0,0.04);
  border-color: var(--ess-theme-color);
}

html[data-theme="dark"] .ess-mobile-menu-close:hover {
  background: rgba(255,255,255,0.06);
}

/* Lock background scroll when off-canvas is open */
.ess-lock { overflow: hidden !important; }

/* Mobile off-canvas nav styles */
#ess-mobile-menu .menu,
#ess-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#ess-mobile-menu li {
  border-bottom: 1px solid var(--ess-border);
}
#ess-mobile-menu li:last-child { border-bottom: 0; }
#ess-mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px;
  color: var(--ess-text);
  text-decoration: none;
}
#ess-mobile-menu a:hover { color: var(--ess-theme-color); }

/* Submenus collapsed by default on mobile; expand when li.open */
#ess-mobile-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  background: var(--ess-bg);
}
#ess-mobile-menu li.open > .sub-menu {
  max-height: 800px; /* sufficient for typical submenus */
}
#ess-mobile-menu li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  /* Use mask + currentColor so indicator matches link color */
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}
#ess-mobile-menu li.open > a::after {
  /* Up chevron when open */
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18,15 12,9 6,15'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18,15 12,9 6,15'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Home page sections */
.ess-site-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--ess-text);
  text-align: left;
}
@media (max-width: 768px) {
  .ess-site-title {
    font-size: 2rem;
    margin-bottom: 24px;
  }
}

.ess-section-title { 
  font-size: 1.5rem; 
  margin: 32px 0 16px; 
  color: var(--ess-text); 
  text-align: left; 
}

/* Category sections */
.ess-category-section {
  margin-bottom: 32px;
}

.ess-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ess-section-header .ess-section-title {
  margin: 0;
  flex-grow: 1;
}

.ess-view-all {
  color: var(--ess-theme-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--ess-theme-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.ess-view-all:hover {
  background: var(--ess-theme-color);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 640px) {
  .ess-section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }
  
  .ess-view-all {
    flex-shrink: 0;
    margin-left: 12px;
  }
}

/* Featured post section */
.ess-home-featured { margin-bottom: 32px; }
.ess-featured-card { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 24px; 
  border: 1px solid var(--ess-border); 
  border-radius: 12px; 
  overflow: hidden; 
  background: var(--ess-bg); 
}
@media (max-width: 768px) {
  .ess-featured-card { grid-template-columns: 1fr; }
  .ess-featured-media { 
    height: 200px !important; /* Force height on mobile */
    min-height: 200px; /* Ensure minimum height */
  }
  .ess-aspect-featured {
    height: 100% !important; /* Force full height */
    min-height: 200px; /* Ensure minimum height */
  }
}
.ess-featured-media { display: block; height: 100%; }
.ess-aspect-featured { 
  display: block; 
  position: relative; 
  width: 100%; 
  height: 100%; 
  overflow: hidden; 
}
.ess-aspect-featured img { 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.ess-featured-content { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.ess-featured-cats { margin-bottom: 12px; }
.ess-chip-featured { 
  background: var(--ess-theme-color) !important; 
  color: var(--ess-chip-text-color, #fff) !important; 
  border-color: var(--ess-theme-color) !important; 
}
.ess-featured-title { margin: 0 0 12px; font-size: 1.5rem; color: #000000; }
.ess-featured-title a { color: #000000; }
.ess-featured-title a:hover { color: var(--ess-theme-color); }
html[data-theme="dark"] .ess-featured-title,
html[data-theme="dark"] .ess-featured-title a { color: #ffffff; }
html[data-theme="dark"] .ess-featured-title a:hover { color: var(--ess-theme-color); }
.ess-featured-excerpt { color: var(--ess-muted); margin-bottom: 16px; }
.ess-btn-featured { 
  align-self: flex-start; 
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #000000;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ess-btn-featured:hover {
  color: var(--ess-theme-color);
  text-decoration: none;
}
html[data-theme="dark"] .ess-btn-featured {
  color: #ffffff;
}
html[data-theme="dark"] .ess-btn-featured:hover {
  color: var(--ess-theme-color);
}
.ess-btn-featured::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12,5 19,12 12,19'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  transition: transform 0.2s ease;
}
.ess-btn-featured:hover::after {
  transform: translateX(2px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232a7ae2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12,5 19,12 12,19'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Categories section */
.ess-home-categories { margin-bottom: 32px; }
.ess-categories-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: 16px; 
}
.ess-category-card { 
  display: block; 
  padding: 20px; 
  border: 1px solid var(--ess-border); 
  border-radius: 8px; 
  background: var(--ess-bg); 
  text-decoration: none; 
  transition: all 0.2s ease; 
}
.ess-category-card:hover { 
  border-color: var(--ess-theme-color); 
  transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.ess-category-card:hover .ess-category-name { 
  color: var(--ess-theme-color); 
}
.ess-category-name { 
  margin: 0 0 4px; 
  font-size: 1.1rem; 
  color: #000000; 
}
html[data-theme="dark"] .ess-category-name { 
  color: #ffffff; 
}
html[data-theme="dark"] .ess-category-card:hover .ess-category-name { 
  color: var(--ess-theme-color); 
}
.ess-category-count { 
  margin: 0; 
  color: var(--ess-muted); 
  font-size: 0.9rem; 
}

/* Recent posts section */
.ess-home-recent { margin-bottom: 32px; }

/* Archive grid */
.ess-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .ess-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ess-archive-grid { grid-template-columns: 1fr; }
}

.ess-archive-card { border: 1px solid var(--ess-border); border-radius: 10px; overflow: hidden; background: var(--ess-bg); }
.ess-card-media { display: block; }
.ess-aspect-3-2 { display: block; position: relative; width: 100%; padding-top: 66.6667%; overflow: hidden; }
.ess-aspect-3-2 img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.ess-card-body { padding: 12px; display: grid; gap: 8px; }
.ess-card-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.ess-chip { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--ess-border); border-radius: 999px; font-size: 12px; color: var(--ess-text); }
.ess-card-title { margin: 0; font-size: 1.05rem; color: #000000; }
.ess-card-title a { color: #000000; }
.ess-card-title a:hover { color: var(--ess-theme-color); }
html[data-theme="dark"] .ess-card-title,
html[data-theme="dark"] .ess-card-title a { color: #ffffff; }
html[data-theme="dark"] .ess-card-title a:hover { color: var(--ess-theme-color); }
.ess-card-actions { margin-top: 4px; }
.ess-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #000000;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ess-btn:hover {
  color: var(--ess-theme-color);
  text-decoration: none;
}
html[data-theme="dark"] .ess-btn {
  color: #ffffff;
}
html[data-theme="dark"] .ess-btn:hover {
  color: var(--ess-theme-color);
}
.ess-btn::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12,5 19,12 12,19'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  transition: transform 0.2s ease;
}
.ess-btn:hover::after {
  transform: translateX(2px);
}

/* Dark mode arrow colors */
html[data-theme="dark"] .ess-btn::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12,5 19,12 12,19'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Hover state arrow colors - will be dynamically updated by JavaScript */
.ess-btn:hover::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232a7ae2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12,5 19,12 12,19'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Table of Contents */
.ess-toc {
  margin: 24px 0;
  border: 1px solid var(--ess-border);
  border-radius: 8px;
  background: var(--ess-bg);
  overflow: hidden;
}

.ess-toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--ess-border);
}

html[data-theme="dark"] .ess-toc-header {
  background: rgba(255,255,255,0.02);
}

.ess-toc-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ess-text);
}

.ess-toc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ess-border);
  border-radius: 6px;
  background: transparent;
  color: var(--ess-text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.ess-toc-toggle:hover {
  background: rgba(0,0,0,0.04);
  border-color: var(--ess-theme-color);
}

html[data-theme="dark"] .ess-toc-toggle:hover {
  background: rgba(255,255,255,0.06);
}

.ess-toc-icon {
  transition: transform 0.2s ease;
}

.ess-toc.collapsed .ess-toc-icon {
  transform: rotate(-90deg);
}

.ess-toc-nav {
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.ess-toc.collapsed .ess-toc-nav {
  display: none;
}

.ess-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.ess-toc-item {
  margin: 0;
}

.ess-toc-link {
  display: block;
  padding: 8px 12px;
  color: var(--ess-text);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ess-toc-link:hover {
  background: rgba(0,0,0,0.04);
  color: var(--ess-theme-color);
  text-decoration: none;
}

html[data-theme="dark"] .ess-toc-link:hover {
  background: rgba(255,255,255,0.06);
}

.ess-toc-link:focus {
  outline: 2px solid var(--ess-theme-color);
  outline-offset: 2px;
}

/* Enhanced hierarchy for different heading levels */
.ess-toc-level-1 .ess-toc-link { 
  padding-left: 12px; 
  font-weight: 600;
  font-size: 1rem;
  color: var(--ess-text);
}

.ess-toc-level-2 .ess-toc-link { 
  padding-left: 24px; 
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ess-text);
}

.ess-toc-level-3 .ess-toc-link { 
  padding-left: 36px; 
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(var(--ess-text-rgb), 0.85);
}

.ess-toc-level-4 .ess-toc-link { 
  padding-left: 48px; 
  font-weight: 400;
  font-size: 0.85rem;
  color: rgba(var(--ess-text-rgb), 0.75);
}

.ess-toc-level-5 .ess-toc-link { 
  padding-left: 60px; 
  font-weight: 400;
  font-size: 0.8rem;
  color: rgba(var(--ess-text-rgb), 0.65);
}

.ess-toc-level-6 .ess-toc-link { 
  padding-left: 72px; 
  font-weight: 400;
  font-size: 0.75rem;
  color: rgba(var(--ess-text-rgb), 0.55);
}

/* Add visual hierarchy indicators */
.ess-toc-level-1 .ess-toc-link::before {
  content: "●";
  margin-right: 8px;
  color: var(--ess-theme-color);
  font-size: 0.8rem;
}

.ess-toc-level-2 .ess-toc-link::before {
  content: "○";
  margin-right: 8px;
  color: var(--ess-theme-color);
  font-size: 0.7rem;
}

.ess-toc-level-3 .ess-toc-link::before {
  content: "▪";
  margin-right: 8px;
  color: rgba(var(--ess-theme-color-rgb), 0.7);
  font-size: 0.6rem;
}

.ess-toc-level-4 .ess-toc-link::before {
  content: "▫";
  margin-right: 8px;
  color: rgba(var(--ess-theme-color-rgb), 0.6);
  font-size: 0.5rem;
}

.ess-toc-level-5 .ess-toc-link::before {
  content: "•";
  margin-right: 8px;
  color: rgba(var(--ess-theme-color-rgb), 0.5);
  font-size: 0.4rem;
}

.ess-toc-level-6 .ess-toc-link::before {
  content: "·";
  margin-right: 8px;
  color: rgba(var(--ess-theme-color-rgb), 0.4);
  font-size: 0.3rem;
}

/* Smooth scroll behavior for TOC links */
html {
  scroll-behavior: smooth;
}

/* Offset for fixed header when scrolling to headings */
.ess-toc-link[href^="#"] {
  scroll-margin-top: calc(var(--ess-header-height) + env(safe-area-inset-top) + 20px);
}

/* Ensure headings can be focused and have proper scroll offset */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: calc(var(--ess-header-height) + env(safe-area-inset-top) + 20px);
}

h1[id]:focus, h2[id]:focus, h3[id]:focus, h4[id]:focus, h5[id]:focus, h6[id]:focus {
  outline: 2px solid var(--ess-theme-color);
  outline-offset: 2px;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .ess-toc-header {
    padding: 12px 16px;
  }
  
  .ess-toc-nav {
    padding: 12px 16px;
  }
  
  .ess-toc-title {
    font-size: 1rem;
  }
  
  .ess-toc-toggle {
    padding: 4px 8px;
    font-size: 0.85rem;
  }
  
  /* Reduce indentation on mobile while maintaining hierarchy */
  .ess-toc-level-1 .ess-toc-link { 
    padding-left: 8px; 
    font-size: 0.95rem;
  }
  .ess-toc-level-2 .ess-toc-link { 
    padding-left: 16px; 
    font-size: 0.9rem;
  }
  .ess-toc-level-3 .ess-toc-link { 
    padding-left: 24px; 
    font-size: 0.85rem;
  }
  .ess-toc-level-4 .ess-toc-link { 
    padding-left: 32px; 
    font-size: 0.8rem;
  }
  .ess-toc-level-5 .ess-toc-link { 
    padding-left: 40px; 
    font-size: 0.75rem;
  }
  .ess-toc-level-6 .ess-toc-link { 
    padding-left: 48px; 
    font-size: 0.7rem;
  }
  
  /* Adjust hierarchy indicators for mobile */
  .ess-toc-level-1 .ess-toc-link::before { font-size: 0.7rem; }
  .ess-toc-level-2 .ess-toc-link::before { font-size: 0.6rem; }
  .ess-toc-level-3 .ess-toc-link::before { font-size: 0.5rem; }
  .ess-toc-level-4 .ess-toc-link::before { font-size: 0.4rem; }
  .ess-toc-level-5 .ess-toc-link::before { font-size: 0.3rem; }
  .ess-toc-level-6 .ess-toc-link::before { font-size: 0.25rem; }
}

/* Mobile Share Button */
.ess-mobile-share-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ess-theme-color);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 1000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.ess-mobile-share-btn:hover {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ess-mobile-share-btn:active {
  transform: scale(0.95);
}

/* Share button is only rendered on tablet/mobile devices (<= 1024px) */

/* Share Toast Notification */
.ess-share-toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 280px;
  word-wrap: break-word;
}

.ess-share-toast.error {
  background: #dc3545;
}