/* HG Edu v18.29-RC1: desktop-only sidebar typography and icon system. */
.hg-sidebar-desktop-icon {
  display: none;
}

#appSidebar .hg-smart-student-mobile-icon {
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex: 0 0 22px;
}

#appSidebar .hg-smart-student-mobile-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  :root {
    --hg-desktop-sidebar-text: #ffffff;
    --hg-desktop-sidebar-muted: #cbd5e1;
    --hg-desktop-sidebar-font-size: 13px;
    --hg-desktop-sidebar-menu-font-size: 12.5px;
    --hg-desktop-sidebar-icon-size: 18px;
  }

  html[data-theme="cream"] {
    --hg-desktop-sidebar-text: #ffffff;
    --hg-desktop-sidebar-muted: #d8eae4;
  }

  #appSidebar .sideBrand strong {
    color: var(--hg-desktop-sidebar-text);
    font-size: var(--hg-desktop-sidebar-font-size) !important;
    line-height: 1.25;
  }

  #appSidebar .navLabel {
    color: var(--hg-desktop-sidebar-muted);
    font-size: 10px !important;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 1.15px;
  }

  #appSidebar button[data-page] {
    align-items: center;
    gap: 9px !important;
    padding: 8px 9px !important;
    color: var(--hg-desktop-sidebar-text) !important;
    font-size: var(--hg-desktop-sidebar-menu-font-size) !important;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal !important;
  }

  html[data-theme="cream"] #appSidebar button[data-page] {
    color: var(--hg-desktop-sidebar-text) !important;
    font-weight: 500;
  }

  #appSidebar button[data-page] > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #appSidebar button[data-page].active {
    font-weight: 600;
  }

  html[data-theme="cream"] #appSidebar button[data-page].active {
    font-weight: 600;
  }

  #appSidebar button[data-page]:focus-visible {
    outline: 2px solid #f9d77f;
    outline-offset: -2px;
  }

  #appSidebar .hg-sidebar-legacy-icon {
    display: none;
  }

  #appSidebar .hg-sidebar-desktop-icon {
    display: block;
    width: var(--hg-desktop-sidebar-icon-size);
    height: var(--hg-desktop-sidebar-icon-size);
    min-width: var(--hg-desktop-sidebar-icon-size);
    flex: 0 0 var(--hg-desktop-sidebar-icon-size);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #appSidebar .hg-smart-student-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-basis: 22px;
  }

  /* The receipt entry is created by the existing runtime after HTML parsing. */
  #appSidebar #hg30ReceiptNav {
    gap: 0 !important;
    font-size: 0 !important;
  }

  #appSidebar #hg30ReceiptNav::before {
    content: "";
    display: block;
    width: var(--hg-desktop-sidebar-icon-size);
    height: var(--hg-desktop-sidebar-icon-size);
    min-width: var(--hg-desktop-sidebar-icon-size);
    margin-right: 9px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  #appSidebar #hg30ReceiptNav > span {
    font-size: var(--hg-desktop-sidebar-menu-font-size);
  }
}
