.quick-settings {
  border-radius: $buttons_radius + $container_padding * 3 !important;
  margin-top: $container_padding !important;

  @if $laptop == 'false' {
    padding: 10px + $container_padding 6px + $container_padding * 2 14px + $container_padding !important;
  } @else {
    padding: 8px + $container_padding 6px + $container_padding * 2 12px + $container_padding !important;
  }

  .icon-button, .button {
    padding: $container_padding * 1.5;
    
    StIcon {
      icon-size: 16px;
    }
  }
}

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

.quick-toggle {
  border-radius: $buttons_radius;
  min-width: 12em;
  max-width: 12em;
  min-height: $container_padding * 3 + 22px;
  padding: 0;
  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.15) !important;
  }

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

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

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

  & > 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: rgba($fg_color, 0.06) !important;
    padding: $container_padding $container_padding * 2;

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

    &:ltr { border-radius: 0 $buttons_radius $buttons_radius 0; }
    &:rtl { border-radius: $buttons_radius 0 0 $buttons_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;
  }

  .icon-button {
    min-width: 22px;
    min-height: 22px;
    background-color: transparent;
    color: $fg_color !important;

    &:hover {
      background-color: rgba($fg_color, 0.06);
    }

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

.quick-toggle-menu {
  background-color: lighten($base_color, 5%) !important;
  color: $fg_color !important;
  border-radius: $menu_radius !important;
  padding: $container_padding * 2;
  margin: $container_padding * 2 $container_padding * 2 + 8px 0 !important;

  .popup-menu-item {
    border-radius: $buttons_radius !important;
    margin: 0 !important;

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

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

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

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

    & .icon {
      icon-size: 16px * 1.5; // a non-standard symbolic size but ok
      border-radius: $buttons_radius;
      padding: 1.5 * $container_padding;
      background-color: rgba($fg_color, 0.06) !important;

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

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

  .icon-button {
    background-color: $divider_color;
    color: $fg_color;
    border-radius: $buttons_radius;
    min-height: 22px;
    min-width: 22px;

    &:hover {
      background-color: $visit_color;
    }

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

    > StIcon {
      -st-icon-style: symbolic;
      icon-size: 16px;
    }
  }

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

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

.nm-network-item {
  .wireless-secure-icon { icon-size: 0.5 * 16px; }
}
