/* Beeskraal mobile menu — match free theme behavior */
:root {
  --primary-theme-color: #DC2751;
  --secondary-theme-color: #151515;
}

@media screen and (min-width: 769px) {
  .menu-toggle,
  button.close-menu {
    display: none !important;
  }
  #main-menu {
    display: block !important;
  }
}

@media screen and (max-width: 768px) {
  /*
   * Pro loads fontawesome-all.min.js which replaces <i class="fa-bars"> with
   * <svg class="svg-inline--fa">. Free theme uses CSS webfonts so .menu-toggle i
   * (pink 50x50 + white) works there; on Pro those rules never match the SVG,
   * leaving a ~14px black icon on #151515 — effectively invisible.
   * Put the pink chip on the button and force white fill on i/svg.
   */
  .menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    padding: 0 !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    background: var(--primary-theme-color) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    cursor: pointer !important;
    vertical-align: middle !important;
  }
  .menu-toggle > span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  .menu-toggle i,
  .menu-toggle svg,
  .menu-toggle .svg-inline--fa,
  .menu-toggle svg.svg-inline--fa {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    line-height: 1 !important;
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    fill: #fff !important;
    font-size: 20px !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle !important;
  }
  .menu-toggle svg path {
    fill: currentColor !important;
  }

  /* Panel hidden until JS show() */
  #main-menu {
    display: none;
    background: #fff !important;
    position: absolute;
    z-index: 999999;
    width: 100%;
    left: 0;
    top: 0;
    height: auto;
    min-height: 100vh;
    padding-top: 50px;
  }
  .admin-bar #main-menu {
    padding-top: 96px;
  }

  #main-menu ul.primary-menu,
  #main-menu ul {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  #main-menu ul.primary-menu > li,
  #main-menu ul > li {
    float: none !important;
    width: 100% !important;
    display: block !important;
  }
  #main-menu ul.primary-menu > li:nth-child(even),
  #main-menu ul > li:nth-child(even) { background: #f5f5f5; }
  #main-menu ul.primary-menu > li:nth-child(odd),
  #main-menu ul > li:nth-child(odd) { background: #e5e5e5; }
  #main-menu ul.primary-menu a,
  #main-menu ul li a {
    display: block !important;
    float: none !important;
    color: #121212 !important;
    -webkit-text-fill-color: #121212 !important;
    background: none !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  button.close-menu {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    width: 50px !important;
    height: 50px !important;
    background: var(--primary-theme-color) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    z-index: 2;
  }
  button.close-menu i,
  button.close-menu svg,
  button.close-menu .svg-inline--fa {
    color: #fff !important;
    fill: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  .admin-bar button.close-menu { top: 32px; }

  /* Keep header chrome readable on mobile */
  #site-navigation .top-header {
    justify-content: space-between !important;
    flex-wrap: wrap;
  }
}
