.subhead {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: $zindex-toolbar;
  width: auto;
  min-height: 43px;
  padding: 8px 1rem;
  color: var(--template-text-dark); //#0c192e;
  background: $white;
  background-image: linear-gradient(var(--toolbar-bg), var(--template-bg-dark-3));
  box-shadow: $atum-box-shadow;

  .row {
    margin-right: 0;
    margin-left: 0;
  }

  &.noshadow {
    box-shadow: none;
  }

  joomla-toolbar-button,
  .btn-group {
    margin-inline-start: .75rem;

    &:first-child {
      margin-inline-start: 0;
    }
  }

  joomla-toolbar-button {
    .btn > span,
    .dropdown-item > span {
      margin-inline-end: .5rem;
      width: 1.25em;
      text-align: center;
    }
  }

  .btn {
    --subhead-btn-accent: var(--template-text-dark);
    padding: 0 1rem;
    margin: 5px 0;
    font-size: 1rem;
    line-height: $atum-toolbar-line-height;
    color: var(--template-text-dark);
    background: var(--body-bg);
    border-color: hsl(var(--hue),20%,80%);

    > span {
      display: inline-block;
      color: var(--subhead-btn-accent);
    }

    &:not([disabled]):hover,
    &:not([disabled]):active,
    &:not([disabled]):focus {
      color: rgba(255, 255, 255, .9);
      background-color: var(--subhead-btn-accent);
      border-color: var(--subhead-btn-accent);

      > span {
        color: rgba(255, 255, 255, .9);
      }
    }

    &.btn-success {
      --subhead-btn-accent: var(--success);
    }

    &.btn-danger {
      --subhead-btn-accent: var(--danger);
    }

    &.btn-primary {
      --subhead-btn-accent: var(--template-link-color);
    }

    &.btn-secondary {
      --subhead-btn-accent: var(--template-special-color);
    }

    &.btn-info {
      --subhead-btn-accent: var(--template-bg-dark);
    }

    @if $enable-dark-mode {
      @include color-mode(dark) {
        &.btn-info {
          --subhead-btn-accent: var(--template-bg-light);

          /* stylelint-disable max-nesting-depth */
          &:hover, &:focus, &:active {
            /* stylelint-enable max-nesting-depth */
            --subhead-btn-accent: var(--template-bg-dark-60);
          }
        }
      }
    }

    &.btn-action {
      --subhead-btn-accent: var(--template-bg-dark);
      display: flex;
      align-items: center;

      &::after {
        width: 2.375rem;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        content: "\f078";
        border: 0;
      }
    }

    @if $enable-dark-mode {
      @include color-mode(dark) {
        &.btn-action {
          --subhead-btn-accent: var(--template-bg-light);

          /* stylelint-disable max-nesting-depth */
          &:hover, &:focus, &:active {
            /* stylelint-enable max-nesting-depth */
            --subhead-btn-accent: var(--template-bg-dark-60);
          }
        }
      }
    }

    &[disabled],
    &.dropdown-toggle[disabled] {
      --subhead-btn-accent: var(--template-bg-dark);
      background: rgba($gray-300, .8);
      opacity: .5;

      &:hover,
      &:active,
      &:focus {
        cursor: not-allowed;
      }
    }
  }

  @if $enable-dark-mode {
    @include color-mode(dark) {
      .btn {
        --subhead-btn-accent: var(--template-text-light);
        color: var(--template-text-light);
      }
    }
  }


  .dropdown-toggle {
    &.btn {
      padding-inline-end: 0;
    }
  }

  .btn-group:not(:last-child) > .dropdown-toggle-split {
    order: 1;
    margin-inline-start: -$border-radius;
    border-radius: 0 $border-radius $border-radius 0;
  }

  .dropdown-menu joomla-toolbar-button,
  .btn-group joomla-toolbar-button {
    margin-inline-start: 0;
  }

  .contentpane & {
    margin: -15px -15px 0;
    background-image: none;
    border-bottom: 1px solid var(--template-bg-dark-7);
  }
}

@if $enable-dark-mode {
  @include color-mode(dark) {
    .subhead {
      background-color: var(--body-bg);
      background-image: linear-gradient(var(--body-bg), var(--dark-bg));
    }
  }
}

@include media-breakpoint-down(sm) {
  joomla-tab[view=accordion] .col-md-9,
  joomla-tab[view=accordion] .col-md-3 {
    padding: .5rem 1rem !important;
  }

  #myTab {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }

  joomla-tab[view=accordion] ul li {
    width: 100%;
  }

  .toggler-toolbar {
    top: 0;
    bottom: auto;
    z-index: $zindex-alerts;
    padding: 7px 10px;
    margin: 5px;
    background-color: var(--template-bg-dark);
    border-radius: 30px;

    .toggler-toolbar-icon::before {
      font: normal normal 900 28px/1 "Font Awesome 6 Free";
      color: var(--toggle-color);
      content: "\f00d";
    }

    &.collapsed .toggler-toolbar-icon::before {
      content: "\f085";
    }
  }

  .subhead {
    padding-right: 0;
    padding-left: 0;

    joomla-toolbar-button,
    .btn-group,
    .btn {
      width: 100%;
      margin-left: 0;
      text-align: left;
    }

    .btn-toolbar > .btn-group,
    .btn-toolbar > joomla-toolbar-button {
      margin-left: 0;
    }

    .btn.btn-action::after {
      text-align: center;
      margin-inline-start: auto;
    }

    .dropdown-toggle-split {
      width: auto;
    }
  }
}
