/*
Theme Name:   Milwaukee Arborist Child
Theme URI:    https://milwaukeearborist.com/
Description:  GeneratePress child theme for Milwaukee Arborist. Adds the call and text bars, the LocalBusiness schema, the footer line, and a one click page importer under Tools.
Author:       Milwaukee Arborist
Template:     generatepress
Version:      1.0.2
Text Domain:  milwaukee-arborist-child
*/

/* Milwaukee Arborist top bars.
   The bars print right after <body> (wp_body_open), above the GeneratePress
   header. The GeneratePress header is not sticky, so the bars stick at the very
   top of the viewport (top: 0) with nothing else to offset. The only offset
   needed is for the WordPress admin bar when an editor is logged in. */
.ma-topbars {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  font-family: inherit;
}

.ma-callbar,
.ma-textbar {
  text-align: center;
  line-height: 1.3;
}

.ma-callbar {
  background: #c41e3a;
  color: #fff;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
}

.ma-textbar {
  background: #8e1028;
  color: #fff;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 600;
}

.ma-callbar a,
.ma-textbar a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 2px 4px;
}

.ma-callbar a:hover,
.ma-callbar a:focus,
.ma-textbar a:hover,
.ma-textbar a:focus {
  text-decoration: underline;
  color: #fff;
}

/* Admin bar offsets: 32px on desktop, 46px on tablets. At 600px and below the
   admin bar scrolls away with the page, so the bars go back to top: 0. */
body.admin-bar .ma-topbars {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .ma-topbars {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar .ma-topbars {
    top: 0;
  }
  .ma-callbar {
    font-size: 15px;
    padding: 10px 10px;
  }
  .ma-textbar {
    font-size: 14px;
    padding: 8px 10px;
  }
}

/* Keep jump links from landing under the sticky bars. */
html {
  scroll-padding-top: 90px;
}

/* Long Service Areas dropdown: scroll inside the menu instead of running off
   the screen. Desktop only; the mobile menu opens inline and scrolls with the page. */
@media (min-width: 769px) {
  .main-navigation:not(.toggled) .main-nav ul li:hover > ul.sub-menu,
  .main-navigation:not(.toggled) .main-nav ul li.sfHover > ul.sub-menu,
  .main-navigation:not(.toggled) .main-nav ul li:focus-within > ul.sub-menu,
  .main-navigation:not(.toggled) .main-nav ul ul.sub-menu.toggled-on {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* Call link in the main menu, styled as a solid red button. */
.main-navigation .main-nav ul li.ma-menu-call > a {
  background: #c41e3a;
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.2;
  padding-top: 10px;
  padding-bottom: 10px;
  margin: 10px 0 10px 10px;
}

.main-navigation .main-nav ul li.ma-menu-call > a:hover,
.main-navigation .main-nav ul li.ma-menu-call > a:focus {
  background: #8e1028;
  color: #fff;
}

@media (max-width: 768px) {
  .main-navigation .main-nav ul li.ma-menu-call > a {
    display: block;
    text-align: center;
    margin: 10px;
  }
}

/* Footer line */
.ma-footer-line a {
  text-decoration: underline;
}

/* 1.0.1 fixes: solid dropdowns, space under buttons, blog heading */
.main-navigation .main-nav ul ul.sub-menu,
.main-navigation .main-nav ul ul.sub-menu li a {
  background-color: #ffffff;
  opacity: 1;
}
.main-navigation .main-nav ul ul.sub-menu {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.main-navigation .main-nav ul ul.sub-menu li a {
  color: #222222;
}
.main-navigation .main-nav ul ul.sub-menu li a:hover,
.main-navigation .main-nav ul ul.sub-menu li a:focus {
  background-color: #f3f3f3;
  color: #c41e3a;
}
.entry-content .wp-block-buttons {
  margin-top: 1.25em;
  margin-bottom: 2em;
}
.ma-blog-heading {
  margin: 0 0 1em;
}
