/*
Theme Name: Kadence Child
Template: kadence
Description: A child theme for Kadence
Author: Mike Vahldieck
Version: 1.0.0
*/

/* Import the parent theme’s stylesheet */
@import url("../kadence/style.css");

/* ================================================
   Documentation Sidebar Styles
   ================================================ */

/* Remove bullets and reset spacing */
.docs-nav,
.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Hide all submenus by default */
.docs-nav ul.sub-menu {
  display: none;
  margin-left: 1em;
  padding-left: 0;
}

/* Show submenus when open or current */
.docs-nav .menu-item-has-children.open > ul.sub-menu,
.docs-nav .current-menu-parent > ul.sub-menu,
.docs-nav .current-menu-ancestor > ul.sub-menu {
  display: block;
}

/* --- Link styling --- */

/* Top-level links */
.docs-nav > li > a {
  display: block;
  padding: 6px 0;
  font-weight: 500;
  color: var(--global-palette3, #333);
  text-decoration: none;
}

/* Nested links */
.docs-nav ul.sub-menu a {
  display: block;
  padding: 4px 0 4px 1em;
  font-weight: 400;
  color: var(--global-palette3, #333);
  text-decoration: none;
}

/* Hover and active link states */
.docs-nav a:hover,
.docs-nav .current-menu-item > a {
  color: var(--global-palette1, #0073aa);
  text-decoration: underline;
}

/* --- Arrows for expandable items --- */
.docs-nav .menu-item-has-children > a::after {
  content: "▸";
  float: right;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

/* Rotate arrow when open or current */
.docs-nav .menu-item-has-children.open > a::after,
.docs-nav .current-menu-parent > a::after,
.docs-nav .current-menu-ancestor > a::after {
  transform: rotate(90deg);
  opacity: 1;
}

/* --- Interaction --- */

/* Make parent links clickable areas */
.docs-nav .menu-item-has-children > a {
  cursor: pointer;
}

/* Sidebar container spacing and alignment */
.docs-sidebar {
  margin-left: 2rem; /* roughly 32px, scales with font size */
  position: sticky;
  top: 100px;
  align-self: flex-start;
}