.quick-settings {
  padding: $container_padding * 3 !important;
  border-radius: 20px + $container_padding * 3 !important;
  margin-top: $container_padding / 2 !important;
  border: none;

  .icon-button, .button {
    padding: 12px;
  }
}

.quick-settings-grid {
  spacing-rows: $container_padding * 2;
  spacing-columns: $container_padding * 2;
}

.quick-toggle {
  border-radius: $circular_radius;
  min-width: 12em;
  max-width: 12em;
  min-height: $container_padding * 4 + 16px;
  border: none;
  background-color: rgba($fg_color, 0.06) !important;

  &:hover {
    background-color: rgba($fg_color, 0.12) !important;
  }

  &:active {
    background-color: rgba($fg_color, 0.24) !important;
  }

  &:checked {
    background-color: $primary_color !important;
    color: $light_fg_color;

    &:hover {
      background-color: mix($fg_color, $primary_color, 10%) !important;
      color: $light_fg_color;
    }

    &:active {
      background-color: mix($fg_color, $primary_color, 20%) !important;
      color: $light_fg_color;
    }
  }

  & > StBoxLayout { spacing: $container_padding; }

  /* Move padding into the box; this is to allow menu arrows
     to extend to the border */
  &.button { padding: 0; }
  & > StBoxLayout { padding: 0 $container_padding * 2; }
  &:ltr > StBoxLayout { padding-left: $container_padding * 2.5; }
  &:rtl > StBoxLayout { padding-right: $container_padding * 2.5; }

  .quick-toggle-label { font-weight: bold; }
  .quick-toggle-icon, .quick-toggle-arrow { icon-size: 16px; }
}

.quick-menu-toggle {
  &:ltr > StBoxLayout { padding-right: 0; }
  &:rtl > StBoxLayout { padding-left: 0; }

  .quick-toggle-arrow {
    background-color: $divider_color !important;
    padding: $container_padding $container_padding * 1.75;

    &:active {
      background-color: $track_color !important;
    }

    &:ltr { border-radius: 0 $circular_radius $circular_radius 0; }
    &:rtl { border-radius: $circular_radius 0 0 $circular_radius; }
  }
}

.quick-slider {
  padding: 0 $container_padding;

  > StBoxLayout { spacing: $container_padding; }

  .slider-bin {
    &:focus { @include button(focus); }
    min-height: 16px; // slider size
    padding: $container_padding;
    border-radius: $circular_radius;
  }

  .quick-toggle-icon {
    icon-size: 16px;
  }
}

.quick-toggle-menu {
  background-color: white !important;
  color: rgba(black, 0.65) !important;
  border-radius: $container_padding * 5 !important;
  padding: $container_padding * 2;
  margin: $container_padding * 2 $container_padding * 3.5 0;

  .popup-menu-item {
    border-radius: $circular_radius !important;
    color: rgba(black, 0.65) !important;

    &:focus, &:hover, &.selected {
      color: rgba(black, 0.75) !important;
      background-color: rgba(black, 0.1) !important;
    }

    &:active {
      color: rgba(black, 0.75) !important;
      background-color: rgba(black, 0.2) !important;
    }

    > StIcon { -st-icon-style: symbolic; }

    & > :first-child {
      &:ltr {
        padding-left: $container_padding  + $container_margin !important;
      }

      &:rtl {
        padding-right: $container_padding + $container_margin !important;
      }
    }

    .popup-separator-menu-item-separator {
      background-color: rgba(black, 0.1) !important;
    }

    @if $variant == 'dark' {
      .toggle-switch {
        background-image: url("assets/menu-toggle-off.svg");
      }
    }
  }

  & .header {
    spacing-rows: 0.5 * $container_padding;
    spacing-columns: $container_padding * 2;
    padding-bottom: 2 * $container_padding;

    & .icon {
      icon-size: 24px; // a non-standard symbolic size but ok
      border-radius: $circular_radius;
      padding: 1.5 * $container_padding;
      background-color: rgba(black, 0.08) !important;

      &.active {
        background-color: $primary_color !important;
        color: $light_fg_color;
      }
    }
  }
}

.quick-settings-system-item {
  & > StBoxLayout { spacing: 2 * $container_padding; }

  .icon-button {
    background-color: rgba($fg_color, 0.06);

    &:hover { background-color: rgba($fg_color, 0.12); }
    &:active { background-color: rgba($fg_color, 0.24); }

    > StIcon { -st-icon-style: symbolic; }
  }

  & .power-item {
    min-height: 0;
    min-width: 0;

    &:insensitive {
      @include button(normal);
      background-color: transparent;
    }
  }
}

.nm-network-item {
  .wireless-secure-icon { icon-size: 8px; }
}
