/*! Frontend Styles */

/*? Reset */
.fusion-tb-header {
   isolation: isolate;
   z-index: 200;
}

.fusion-tb-header:not(:has(.fusion-sticky-container)) {
   position: relative;
}


main {
   /* fix sticky header slipping under content */
   isolation: isolate;
   /* fix fixed content being overlapped by footer*/
   z-index: 100;
}

p:empty {
   display: none !important;
}

textarea {
   resize: vertical;
}

:is(h1, h2, h3, h4, h5, h6) {
   text-wrap: balance;
}

/* admin bar */
#wpadminbar {

   & #wp-admin-bar-root-default .ab-icon {
      float: none !important;
   }

   & li[role] {
      margin: 0 8px 0 0 !important;
   }

   & .ab-item {
      height: fit-content !important;
   }

   & .ab-submenu {

      /* user dropdown */
      & .display-name {
         display: inline-block !important;
         /* padding-right: 1ch !important; */

         &:first-child::after {
            content: '-';
            display: inline-block;
            padding-inline: 1ch;
         }
      }

      & .display-name+.username {
         /* display: inline-block !important; */
         display: none !important;
         /*don't show login name, in case of screen sharing*/
         color: inherit !important;
         font-style: italic;

         &::before {
            content: "(";
            display: inline-block;
         }

         &::after {
            content: ') -';
            display: inline-block;
            padding-right: 1ch;
         }
      }

      &+.ab-submenu {
         border-top: 1px solid silver;
      }
   }
}

/* content more specific */

.fusion-text :where(li, p) {
   text-wrap: pretty;
}

#boxed-wrapper>.fusion-wrapper {
   /* ensure footer is pushed down to the bottom of the screen, regardless of the amount of content */
   display: flex;
   flex-direction: column;
   min-height: 100vh;
}

#boxed-wrapper>.fusion-wrapper>main {
   margin-bottom: auto;
}

/* remove margin when not inline */
.fusion-form-recaptcha-field:has(.recaptcha-container:not([data-badge="inline"])) {
   margin: 0 !important;
}

/* fix overlap issue w/ submit button */
.fusion-form-recaptcha-field [data-badge="bottomleft"] .grecaptcha-badge {
   z-index: 1000;
}

/*? Helper functions */

.contents {
   display: contents;
}

.block {
   display: block;
}

.none {
   display: none !important;
}

.no-cursor {
   cursor: default;
}

.l33-sr,
.l33-no-label .fusion-form-label-wrapper {
   pointer-events: none !important;
   position: absolute !important;
   width: 1px !important;
   height: 1px !important;
   overflow: hidden !important;
   opacity: 0 !important;
}

/*? Modules */

#toTop {
   color: var(--privacy_bar_color);
   border: 1px solid;
   border-bottom: none;
}